mirror of
https://github.com/mue/mue.git
synced 2026-07-20 23:44:07 +02:00
new
This commit is contained in:
Binary file not shown.
|
Before Width: | Height: | Size: 2.0 KiB |
BIN
src/assets/img/logo.png
Normal file
BIN
src/assets/img/logo.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 2.5 KiB |
File diff suppressed because one or more lines are too long
@@ -46,11 +46,11 @@ module.exports = class Func {
|
||||
|
||||
static setRandQuote() {
|
||||
const id = util.getRandIndex(quotes.authors);
|
||||
if (util.contains.call(codes.itcodes, nal)) util.setHTMLContent('blockquote', `"${quotes.ita[id]}"`); //Italian
|
||||
if (util.contains.call(codes.ptcodes, nal)) util.setHTMLContent('blockquote', `"${quotes.pt[id]}"` || `"${quotes.eng[id]}"`); //Portuguese
|
||||
if (util.contains.call(codes.spcodes, nal)) util.setHTMLContent('blockquote', `"${quotes.spa[id]}"`); //Spanish
|
||||
else util.setHTMLContent('blockquote', `"${quotes.eng[id]}"`); //English
|
||||
util.setHTMLContent('cite', quotes.authors[id]);
|
||||
if (util.contains.call(codes.itcodes, nal)) document.querySelector('blockquote').innerHTML = `"${quotes.it[id]}"`; //Italian
|
||||
if (util.contains.call(codes.ptcodes, nal)) document.querySelector('blockquote').innerHTML = `"${quotes.pt[id]}"` || `"${quotes.eng[id]}"`; //Portuguese
|
||||
if (util.contains.call(codes.spcodes, nal)) document.querySelector('blockquote').innerHTML = `"${quotes.sp[id]}"`; //Spanish
|
||||
else document.querySelector('blockquote').innerHTML = `"${quotes.eng[id]}"`; //English
|
||||
document.querySelector('cite').innerHTML = quotes.authors[id];
|
||||
}
|
||||
|
||||
static setTime() {
|
||||
@@ -62,6 +62,6 @@ module.exports = class Func {
|
||||
];
|
||||
// joins all of the array elements into a string using the ':' separator
|
||||
// example: [16, 32, 03] -> "16:32:03"
|
||||
util.setHTMLContent('time', time.join(':'));
|
||||
document.querySelector('time').innerHTML = time.join(':');
|
||||
}
|
||||
};
|
||||
@@ -16,8 +16,7 @@
|
||||
█████████████████████████████████████████████████████████████
|
||||
*/
|
||||
|
||||
const hour = new Date().getHours(); // Get the current hour
|
||||
const { setHTMLContent } = require('./util.js');
|
||||
const hour = new Date().getHours(); // Get the current hour
|
||||
|
||||
module.exports = class Msg {
|
||||
// English
|
||||
@@ -25,14 +24,14 @@ module.exports = class Msg {
|
||||
let time = 'Good evening'; // Set the default time string to "Good evening"
|
||||
if (hour < 12) time = 'Good morning'; //If it's before 12am, set the time string to "Good morning"
|
||||
else if (hour < 18) time = 'Good afternoon'; //If it's before 6pm, set the time string to "Good afternoon"
|
||||
setHTMLContent('.greeting', time); // Write the string contents to the HTML
|
||||
document.querySelector('.greeting').innerHTML = time; // Write the string contents to the HTML
|
||||
}
|
||||
|
||||
// Italian
|
||||
static itMsgSet() {
|
||||
let time = 'Buongiorno'; // Set the default time string
|
||||
if (hour > 18) time = 'Buonasera'; // In Italian there is just Buongiorno or Buonasera
|
||||
setHTMLContent('.greeting', time); // Write the string contents to the HTML
|
||||
document.querySelector('.greeting').innerHTML = time; // Write the string contents to the HTML
|
||||
}
|
||||
|
||||
// Dutch
|
||||
@@ -40,7 +39,7 @@ module.exports = class Msg {
|
||||
let time = 'Goedemiddag'; // Set the default time string to "Good evening"
|
||||
if (hour < 12) time = 'Goedemorgen'; //If it's before 12am, set the time string to "Good morning"
|
||||
else if (hour > 18) time = 'Goedenavond'; //If it's before 6pm, set the time string to "Good afternoon"
|
||||
setHTMLContent('.greeting', time); // Write the string contents to the HTML
|
||||
document.querySelector('.greeting').innerHTML = time; // Write the string contents to the HTML
|
||||
}
|
||||
|
||||
// French
|
||||
@@ -48,7 +47,7 @@ module.exports = class Msg {
|
||||
let time = 'Bonsoir'; // Set the default time string to "Good evening"
|
||||
if (hour < 12) time = 'Bonjour'; //If it's before 12am, set the time string to "Good morning"
|
||||
else if (hour > 18) time = 'Bonne après-midi'; //If it's before 6pm, set the time string to "Good afternoon"
|
||||
setHTMLContent('.greeting', time); // Write the string contents to the HTML
|
||||
document.querySelector('.greeting').innerHTML = time; // Write the string contents to the HTML
|
||||
}
|
||||
|
||||
// Spanish
|
||||
@@ -56,7 +55,7 @@ module.exports = class Msg {
|
||||
let time = 'Buenas Tardes'; // Set the default time string to "Good evening"
|
||||
if (hour < 12) time = 'Buenos Días'; // If it's before 12am, set the time string to "Good morning"
|
||||
else if (hour > 18) time = 'Buenas Noches'; // If it's before 6pm, set the time string to "Good afternoon"
|
||||
setHTMLContent('.greeting', time); // Write the string contents to the HTML
|
||||
document.querySelector('.greeting').innerHTML = time; // Write the string contents to the HTML
|
||||
}
|
||||
|
||||
// Finnish
|
||||
@@ -64,7 +63,7 @@ module.exports = class Msg {
|
||||
let time = 'Hyvää iltaa'; // Set the default time string to "Good evening"
|
||||
if (hour < 12) time = 'Hyvää huomenta'; // If it's before 12am, set the time string to "Good morning"
|
||||
else if (hour > 18) time = 'Hyvää iltapäivää'; // If it's before 6pm, set the time string to "Good afternoon"
|
||||
setHTMLContent('.greeting', time); // Write the string contents to the HTML
|
||||
document.querySelector('.greeting').innerHTML = time; // Write the string contents to the HTML
|
||||
}
|
||||
|
||||
// German
|
||||
@@ -72,7 +71,7 @@ module.exports = class Msg {
|
||||
let time = 'Guten Abend'; // Set the default time string to "Good evening"
|
||||
if (hour < 12) time = 'Guten Morgen'; // If it's before 12am, set the time string to "Good morning"
|
||||
else if (hour > 18) time = 'Guten Nachmittag'; // If it's before 6pm, set the time string to "Good afternoon"
|
||||
setHTMLContent('.greeting', time); // Write the string contents to the HTML
|
||||
document.querySelector('.greeting').innerHTML = time; // Write the string contents to the HTML
|
||||
}
|
||||
|
||||
// Hebrew
|
||||
@@ -80,7 +79,7 @@ module.exports = class Msg {
|
||||
let time = 'ערב טוב'; // Set the default time string to "Good evening"
|
||||
if (hour < 12) time = 'בוקר טוב'; // If it's before 12am, set the time string to "Good morning"
|
||||
else if (hour > 18) time = 'אחר הצהריים טובים'; // If it's before 6pm, set the time string to "Good afternoon"
|
||||
setHTMLContent('.greeting', time); // Write the string contents to the HTML
|
||||
document.querySelector('.greeting').innerHTML = time; // Write the string contents to the HTML
|
||||
}
|
||||
|
||||
// Russian
|
||||
@@ -88,7 +87,7 @@ module.exports = class Msg {
|
||||
let time = 'Добрый Вечер'; // Set the default time string to "Good evening"
|
||||
if (hour < 12) time = 'добрый утро'; // If it's before 12am, set the time string to "Good morning"
|
||||
else if (hour > 18) time = 'добрый день'; // If it's before 6pm, set the time string to "Good afternoon"
|
||||
setHTMLContent('.greeting', time); // Write the string contents to the HTML
|
||||
document.querySelector('.greeting').innerHTML = time; // Write the string contents to the HTML
|
||||
}
|
||||
|
||||
// Arabic
|
||||
@@ -96,13 +95,13 @@ module.exports = class Msg {
|
||||
let time = 'مساء الخير'; // Set the default time string to "Good evening"
|
||||
if (hour < 12) time = 'صباح الخير'; // If it's before 12am, set the time string to "Good morning"
|
||||
else if (hour > 18) time = 'مساء الخير'; // If it's before 6pm, set the time string to "Good afternoon"
|
||||
setHTMLContent('.greeting', time); // Write the string contents to the HTML
|
||||
document.querySelector('.greeting').innerHTML = time; // Write the string contents to the HTML
|
||||
}
|
||||
|
||||
// Swedish
|
||||
static svMsgSet() {
|
||||
let time = 'God kväll'; // Set the default time string to "Good evening"
|
||||
if (hour < 12) time = 'God morgon'; // If it's before 12am, set the time string to "Good morning"
|
||||
setHTMLContent('.greeting', time); // Write the string contents to the HTML
|
||||
document.querySelector('.greeting').innerHTML = time; // Write the string contents to the HTML
|
||||
}
|
||||
};
|
||||
@@ -37,7 +37,7 @@ module.exports = {
|
||||
'Motivation comes from working on things we care about.',
|
||||
'With the right kind of coaching and determination you can accomplish anything.',
|
||||
'Some people look for a beautiful place. Others make a place beautiful.',
|
||||
'Life is like riding a bicycle. To keep your balance, you must keep moving.',
|
||||
'Life is like riding a bicycle. To keep your balance, you must keep moving.'
|
||||
|
||||
],
|
||||
ita: [
|
||||
@@ -81,14 +81,14 @@ module.exports = {
|
||||
'Un campeón se define no por sus victorias, sino por cómo pueden recuperarse cuando caen',
|
||||
'La motivación viene de trabajar en cosas que nos importan',
|
||||
'Con el entrenamiento y la determinación adecuados, puedes lograr cualquier cosa',
|
||||
'Algunas personas buscan un lugar hermoso. Otras, hacen un lugar hermoso.',
|
||||
'Algunas personas buscan un lugar hermoso. Otras, hacen un lugar hermoso.'
|
||||
],
|
||||
pt: [
|
||||
'O tempo continua. Então o que quer que você vai fazer,faça. Faça agora. Não espere.',
|
||||
'Todos os sonhos podem virar verdade,se tivermos a coragem de persegui-los.',
|
||||
'Não importa o quão devagar você for,desde que você não pare.',
|
||||
'Acredite em si mesmo. Você é mais corajoso que pensa,mais talentoso que sabe,e capaz de mais que imagina.',
|
||||
'Se você acredita que vai dar certo,você verá oportunidades. Se você acredita que não vai,você vera obstáculos.',
|
||||
'Se você acredita que vai dar certo,você verá oportunidades. Se você acredita que não vai,você vera obstáculos.'
|
||||
],
|
||||
authors: [
|
||||
'Robert De Niro',
|
||||
|
||||
@@ -22,11 +22,6 @@ module.exports = class Util {
|
||||
return unit < 10 ? '0' + unit : unit;
|
||||
}
|
||||
|
||||
// setHTMLContent is the kind of function that is referred to as a 'wrapper'
|
||||
static setHTMLContent(selector, content) {
|
||||
return document.querySelector(selector).innerHTML = content;
|
||||
}
|
||||
|
||||
// Get random item
|
||||
static getRandIndex(array) {
|
||||
return Math.floor(Math.random() * (array.length - 1));
|
||||
|
||||
Reference in New Issue
Block a user