diff --git a/README.md b/README.md
index 546ad8ae..a57a881f 100644
--- a/README.md
+++ b/README.md
@@ -31,8 +31,11 @@ Development: Read the [Development](#development) section
git clone https://github.com/ohlookitsderpy/Mue (If you don't have Git just go to Clone or
download and click Download ZIP)
+
Open a terminal and run these commands: (in the Mue directory)
yarn (or npm install)
yarn run sass-watch (or npm run sass-watch)
+
Open another terminal and run this command: (in the Mue directory)
+
yarn run js-watch (or npm run js-watch)
Start developing! (See the sections below for how to set it up with your browser)
diff --git a/package.json b/package.json
index c6af20fe..77504262 100644
--- a/package.json
+++ b/package.json
@@ -5,9 +5,12 @@
"license": "MIT",
"repository": "https://github.com/ohlookitsderpy/Mue",
"scripts": {
- "sass-watch": "sass --watch src/assets/scss:src/assets/css --style compressed"
+ "sass-watch": "sass --watch src/assets/scss:src/assets/css --style compressed",
+ "js-watch": "webpack --progress --watch"
},
"devDependencies": {
- "sass": "1.16.1"
+ "sass": "1.16.1",
+ "webpack": "4.29.0",
+ "webpack-cli": "3.2.1"
}
}
diff --git a/src/assets/css/index.css b/src/assets/css/base.css
similarity index 96%
rename from src/assets/css/index.css
rename to src/assets/css/base.css
index 334b34a3..dbac9bb3 100644
--- a/src/assets/css/index.css
+++ b/src/assets/css/base.css
@@ -1 +1 @@
-.mountain{background-image:url("../img/1.jpeg")}.sunrise{background-image:url("../img/2.jpeg")}.butterfly{background-image:url("../img/3.jpeg")}.leaves{background-image:url("../img/4.jpeg")}.river{background-image:url("../img/5.jpeg")}.sea{background-image:url("../img/6.jpeg")}.space{background-image:url("../img/7.jpeg")}.ice{background-image:url("../img/8.jpeg")}.waterfall{background-image:url("../img/9.jpeg")}.river{background-image:url("../img/10.jpeg")}.sunset{background-image:url("../img/11.jpeg")}.desert{background-image:url("../img/12.jpeg")}.canyon{background-image:url("../img/13.jpeg")}.rose{background-image:url("../img/14.jpeg")}.forest{background-image:url("../img/15.jpeg")}.cherry{background-image:url("../img/16.jpeg")}.clouds{background-image:url("../img/17.jpeg")}.winter{background-image:url("../img/18.jpeg")}.autumn{background-image:url("../img/19.jpeg")}.flowers{background-image:url("../img/20.jpeg")}.sunrise{background-image:url("../img/21.jpeg")}.rocks{background-image:url("../img/22.jpeg")}.trees{background-image:url("../img/23.jpeg")}.mountains{background-image:url("../img/24.jpeg")}.beach{background-image:url("../img/25.jpeg")}.quote{--shadow-shift: 0.125rem;width:37.5%;max-width:37.5rem;font-size:1.5rem;text-align:center}.quote blockquote{margin:0 0 .25rem 0;line-height:1.125}.quote blockquote ::before{content:"“";margin-right:.25ch}.quote blockquote ::after{content:"”";margin-left:.25ch}.quote cite{font-size:83.33%}.greeting{--shadow-shift: 0.2rem;font-size:3.25rem}time{--shadow-shift: 0.4rem;font-size:12rem}html,body{height:100%}body{display:flex;flex-direction:column;justify-content:space-around;align-items:center;margin:0;background-size:cover;background-position:50%;background-color:#000;font-family:"Roboto";color:#fff;overflow:hidden;-moz-user-select:none;user-select:none}@font-face{font-family:"Roboto";font-style:normal;font-weight:400;src:local("Roboto"),local("Roboto-Regular"),url("../font/roboto-v18-latin-regular.woff2") format("woff2")}:root{--shadow-color: #111111CC}.greeting,time,.quote{filter:drop-shadow(var(--shadow-shift) var(--shadow-shift) 0 var(--shadow-color))}/*# sourceMappingURL=index.css.map */
+.mountain{background-image:url("../img/1.jpeg")}.sunrise{background-image:url("../img/2.jpeg")}.butterfly{background-image:url("../img/3.jpeg")}.leaves{background-image:url("../img/4.jpeg")}.river{background-image:url("../img/5.jpeg")}.sea{background-image:url("../img/6.jpeg")}.space{background-image:url("../img/7.jpeg")}.ice{background-image:url("../img/8.jpeg")}.waterfall{background-image:url("../img/9.jpeg")}.river{background-image:url("../img/10.jpeg")}.sunset{background-image:url("../img/11.jpeg")}.desert{background-image:url("../img/12.jpeg")}.canyon{background-image:url("../img/13.jpeg")}.rose{background-image:url("../img/14.jpeg")}.forest{background-image:url("../img/15.jpeg")}.cherry{background-image:url("../img/16.jpeg")}.clouds{background-image:url("../img/17.jpeg")}.winter{background-image:url("../img/18.jpeg")}.autumn{background-image:url("../img/19.jpeg")}.flowers{background-image:url("../img/20.jpeg")}.sunrise{background-image:url("../img/21.jpeg")}.rocks{background-image:url("../img/22.jpeg")}.trees{background-image:url("../img/23.jpeg")}.mountains{background-image:url("../img/24.jpeg")}.beach{background-image:url("../img/25.jpeg")}.quote{--shadow-shift: 0.125rem;width:37.5%;max-width:37.5rem;font-size:1.5rem;text-align:center}.quote blockquote{margin:0 0 .25rem 0;line-height:1.125}.quote blockquote ::before{content:"“";margin-right:.25ch}.quote blockquote ::after{content:"”";margin-left:.25ch}.quote cite{font-size:83.33%}.greeting{--shadow-shift: 0.2rem;font-size:3.25rem}time{--shadow-shift: 0.4rem;font-size:12rem}html,body{height:100%}body{display:flex;flex-direction:column;justify-content:space-around;align-items:center;margin:0;background-size:cover;background-position:50%;background-color:#000;font-family:"Roboto";color:#fff;overflow:hidden;-moz-user-select:none;user-select:none}@font-face{font-family:"Roboto";font-style:normal;font-weight:400;src:local("Roboto"),local("Roboto-Regular"),url("../font/roboto-v18-latin-regular.woff2") format("woff2")}:root{--shadow-color: #111111CC}.greeting,time,.quote{filter:drop-shadow(var(--shadow-shift) var(--shadow-shift) 0 var(--shadow-color))}/*# sourceMappingURL=base.css.map */
diff --git a/src/assets/css/index.css.map b/src/assets/css/base.css.map
similarity index 71%
rename from src/assets/css/index.css.map
rename to src/assets/css/base.css.map
index bd243423..72dfc0d0 100644
--- a/src/assets/css/index.css.map
+++ b/src/assets/css/base.css.map
@@ -1 +1 @@
-{"version":3,"sourceRoot":"","sources":["../scss/modules/_background.scss","../scss/modules/_quote.scss","../scss/modules/_time-greeting.scss","../scss/index.scss"],"names":[],"mappings":"CAAA,gDACA,+CACA,iDACA,8CACA,6CACA,2CACA,6CACA,2CACA,iDACA,8CACA,+CACA,+CACA,+CACA,6CACA,+CACA,+CACA,+CACA,+CACA,+CACA,gDACA,gDACA,8CACA,8CACA,kDACA,8CCxBA,OAEI,yBAEA,YACA,kBAEA,iBACA,kBAEA,kBAEI,oBAEA,kBAEA,2BACI,YACA,mBAGJ,0BACI,YACA,kBAIR,YACI,iBC1BR,UAEC,uBAEA,kBAMD,KAEC,uBAEA,gBCOD,sBACA,KAEC,aACA,sBACA,6BACA,mBAEA,SAEA,sBACA,wBACA,sBAEA,qBACA,WAEA,gBAEC,sBACD,iBAID,WACC,qBACA,kBACA,gBACA,0GAKD,MACC,0BAGD,sBAGC","file":"index.css"}
\ No newline at end of file
+{"version":3,"sourceRoot":"","sources":["../scss/modules/_background.scss","../scss/modules/_quote.scss","../scss/modules/_time-greeting.scss","../scss/base.scss"],"names":[],"mappings":"CAkBA,gDACA,+CACA,iDACA,8CACA,6CACA,2CACA,6CACA,2CACA,iDACA,8CACA,+CACA,+CACA,+CACA,6CACA,+CACA,+CACA,+CACA,+CACA,+CACA,gDACA,gDACA,8CACA,8CACA,kDACA,8CCxBA,OAEI,yBAEA,YACA,kBAEA,iBACA,kBAEA,kBAEI,oBAEA,kBAEA,2BACI,YACA,mBAGJ,0BACI,YACA,kBAIR,YACI,iBC1BR,UAEC,uBAEA,kBAMD,KAEC,uBAEA,gBCXD,sBACA,KAEC,aACA,sBACA,6BACA,mBAEA,SAEA,sBACA,wBACA,sBAEA,qBACA,WAEA,gBAEC,sBACD,iBAID,WACC,qBACA,kBACA,gBACA,0GAKD,MACC,0BAGD,sBAGC","file":"base.css"}
\ No newline at end of file
diff --git a/src/assets/js/base.js b/src/assets/js/base.js
new file mode 100644
index 00000000..d80d3472
--- /dev/null
+++ b/src/assets/js/base.js
@@ -0,0 +1 @@
+!function(e){var o={};function t(a){if(o[a])return o[a].exports;var n=o[a]={i:a,l:!1,exports:{}};return e[a].call(n.exports,n,n.exports,t),n.l=!0,n.exports}t.m=e,t.c=o,t.d=function(e,o,a){t.o(e,o)||Object.defineProperty(e,o,{enumerable:!0,get:a})},t.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},t.t=function(e,o){if(1&o&&(e=t(e)),8&o)return e;if(4&o&&"object"==typeof e&&e&&e.__esModule)return e;var a=Object.create(null);if(t.r(a),Object.defineProperty(a,"default",{enumerable:!0,value:e}),2&o&&"string"!=typeof e)for(var n in e)t.d(a,n,function(o){return e[o]}.bind(null,n));return a},t.n=function(e){var o=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(o,"a",o),o},t.o=function(e,o){return Object.prototype.hasOwnProperty.call(e,o)},t.p="",t(t.s=1)}([function(e,o){e.exports=class{static formatTimeUnit(e){return e<10?"0"+e:e}static setHTMLContent(e,o){return document.querySelector(e).innerHTML=o}static getRandIndex(e){return Math.floor(Math.random()*(e.length-1))}static pickFromArray(e){return e[Math.floor(Math.random()*(e.length-1))]}static contains(e){let o,t=e!=e;return(o=t||"function"!=typeof Array.prototype.indexOf?e=>{let o=-1,a=-1;for(o=0;o-1}}},function(e,o,t){e.exports=t(2)},function(e,o,t){const a=t(3);document.addEventListener("DOMContentLoaded",()=>{a.setDaytimeMessage(),a.setRandomBackground(),a.setRandomQuote(),a.setTime();setInterval(a.setTime,1e3)}),document.oncontextmenu=function(){return!1}},function(e,o,t){const a=t(0),n=t(4),i=t(5),s=t(6),r=t(7);let u=navigator.language;e.exports=class{static setDaytimeMessage(){a.contains.call(r.itcodes,u)?n.itMessageSet():a.contains.call(r.nlcodes,u)?n.nlMessageSet():a.contains.call(r.frcodes,u)?n.frMessageSet():a.contains.call(r.ptcodes,u)?n.ptMessageSet():a.contains.call(r.spcodes,u)?n.spMessageSet():n.engMessageSet()}static setRandomBackground(){let e=a.pickFromArray(s);document.body.classList.add(e)}static setRandomQuote(){let e=a.getRandIndex(i.authors);a.contains.call(r.itcodes,u)?a.setHTMLContent("blockquote",`"${i.ita[e]}"`):a.contains.call(r.ptcodes,u)?a.setHTMLContent("blockquote",`"${i.pt[e]}"`||`"${i.eng[e]}"`):a.contains.call(r.spcodes,u)?a.setHTMLContent("blockquote",`"${i.spa[e]}"`):a.setHTMLContent("blockquote",`"${i.eng[e]}"`),a.setHTMLContent("cite",i.authors[e])}static setTime(){let e=new Date,o=[a.formatTimeUnit(e.getHours()),a.formatTimeUnit(e.getMinutes()),a.formatTimeUnit(e.getSeconds())];a.setHTMLContent("time",o.join(":"))}}},function(e,o,t){const{setHTMLContent:a}=t(0);e.exports=class{static engMessageSet(){let e=(new Date).getHours(),o="Good evening";e<12?o="Good morning":e>18&&(o="Good afternoon"),a(".greeting",o)}static itMessageSet(){let e="Buongiorno";(new Date).getHours()>18&&(e="Buonasera"),a(".greeting",e)}static nlMessageSet(){let e=(new Date).getHours(),o="Goedemiddag";e<12?o="Goedemorgen":e>18&&(o="Goedenavond"),a(".greeting",o)}static frMessageSet(){let e=(new Date).getHours(),o="Bonsoir";e<12?o="Bonjour":e>18&&(o="Bonne après-midi"),a(".greeting",o)}static spMessageSet(){let e=(new Date).getHours(),o="Buenas Tardes";e<12?o="Buenos Días":e>20&&(o="Buenas Noches"),a(".greeting",o)}}},function(e,o){e.exports={eng:["Time goes on. So whatever you’re going to do, do it. Do it now. Don’t wait.","All our dreams can come true, if we have the courage to pursue them.","It does not matter how slowly you go as long as you do not stop.","Believe in yourself. You are braver than you think, more talented than you know, and capable of more than you imagine.","If you believe it will work out, you’ll see opportunities. If you believe it won’t, you will see obstacles","Everything you’ve ever wanted is on the other side of fear.","Success is not final, failure is not fatal: it is the courage to continue that counts.","There is only one thing that makes a dream impossible to achieve: the fear of failure.","Your true success in life begins only when you make the commitment to become excellent at what you do.","Believe in yourself, take on your challenges, dig deep within yourself to conquer fears. Never let anyone bring you down. You got to keep going.","Too many of us are not living our dreams because we are living our fears.","Hard times don’t create heroes. It is during the hard times when the ‘hero’ within us is revealed.","If you can tune into your purpose and really align with it, setting goals so that your vision is an expression of that purpose, then life flows much more easily.","Whatever the mind can conceive and believe, it can achieve.","Don’t wish it were easier. Wish you were better.","A champion is defined not by their wins but by how they can recover when they fall.","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."],ita:["Il tempo passa. Quindi qualunque cosa che farai, falla. Falla ora. Non aspettare","Tutti i nostri sogni possono diventare reali, se abbiamo il coraggio di seguirli.","Non importa quanto lentamente vai fino a quando non ti fermi","Credi in te stesso. Sei più coraggioso di quanto pensi, più talentuoso di quanto credi, e capace più di quanto puoi immaginare.","Se ci credi funzionerà, vedrai delle opportunità. Se non ci credi, vedrai solamente ostacoli","Tutti i tuoi desideri sono opposti alla paura","Il successo non è la fine, il fallimento non è fatale: è il coraggio per continuare quello che conta.","C'è solo una cosa che fa i sogni impossibili: la paura di fallire","Il vero successo nella tua vita inizia solo quando fai il sacrificio per diventare eccellente a quello che ami.","Credi in te stesso, sfida i tuoi problemi, scava nel profondo del tuo io per sconfiggere le tue paure. Mai arrendersi per qualcun'altro. Tu devi continuare.","Troppe persone non vivono i loro sogni per vivere nelle loro paure",'Tempi difficili non fanno eroi. È durante i tempi duri che "l\'eroe" in noi viene rivelato.',"Se puoi sintonizzare sul tuo senso e allinearti a quest'ultimo, impostando i tuoi obiettivi in modo che la tua visione sia un'espressione di quel senso, La tua vita scorre molto più facilmente","Qualunque cosa la mente può immaginare e crederese, si può realizzare","Non desiderare che fosse stato più facile. Desidera che tu fossi stato migliore.","Un campione si definisce non dalle sue vittorie ma da come recupera quando cade","La motivazione viene dal lavorare so cose che amiamo","Con il giusto tipo di allenamento e determinazione puoi fare tutto","Alcune persone cercano un posto indimenticabile. Altre lo transformano in un posto mozzafiato.","La vita è come andare in bicicletta. Per tenerti in equilibrio, devi continuare a muoverti"],spa:["El tiempo continúa. Así que lo que sea que vayas a hacer, hazlo. Hazlo ahora. No esperes","Todos nuestros sueños pueden hacerse realidad, si tenemos el coraje de perseguirlos.","No importa qué tan lento vayas, siempre y cuando no te detengas.","Cree en ti mismo. Eres más valiente de lo que crees, más talentoso de lo que sabes y capaz de más de lo que imaginas.","Si crees que funcionará, verás oportunidades. Si crees que no, verás obstáculos ","Todo lo que siempre has querido está al otro lado del miedo","El éxito no es definitivo, el fracaso no es fatal: el coraje para continuar es lo que cuenta","Solo hay una cosa que hace que un sueño sea imposible de lograr: el miedo al fracaso","Tu verdadero éxito en la vida comienza solo cuando te comprometes a ser excelente en lo que haces","Cree en ti mismo, asume tus desafíos, excava profundo dentro de ti mismo para vencer tus miedos. Nunca dejes que nadie te derribe. Tienes que seguir adelante.","Muchos de nosotros no estamos viviendo nuestros sueños porque estamos viviendo nuestros miedos","Los tiempos difíciles no crean héroes. Es durante los momentos difíciles en que se revela el héroe dentro de nosotros.","Si puedes sincornizarte con tu propósito, y realmente alinearte con él, estableciendo metas para que tu visión sea una expresión de ese propósito, entonces la vida fluye mucho más fácilmente","Lo que la mente pueda concebir y creer, lo puede lograr","No desees que sea fácil. Desea ser mejor.","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."],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."],authors:["Robert De Niro","Walt Disney","Confucius","Roy T. Bennett","Wayne Dyer","George Addair","Winston Churchill","Paulo Coelho","Brian Tracy","Chantal Sutherland","Les Brown","Bob Riley","Jack Canfield","Napoleon Hill","Jim Rohn","Serena Williams","Sheryl Sandberg","Reese Witherspoon","Hazrat Inayat Khan","Albert Einstein"]}},function(e,o){e.exports=["mountain","sunrise","butterfly","leaves","river","sea","space","ice","waterfall","river","sunset","desert","canyon","rose","forest","cherry","clouds","autumn","winter","flowers","sunrise","rocks","trees","mountains","beach"]},function(e,o){e.exports={itcodes:["it","it-IT","it-CH"],nlcodes:["nl","nl-BE"],frcodes:["fr","fr-BE","fr-CA","fr-FR","fr-LU","fr-MC","fr-CH"],ptcodes:["pt","pt-BR"],spcodes:["es","es-AR","es-BO","es-CL","es-CO","es-CR","es-DO","es-EC","es-ES","es-GT","es-HN","es-MX","es-NI","es-PA","es-PE","es-PR","es-PY","es-SV","es-UY","es-VE"]}}]);
\ No newline at end of file
diff --git a/src/assets/js/index.js b/src/assets/js/index.js
index 568da584..b8dcdb1c 100644
--- a/src/assets/js/index.js
+++ b/src/assets/js/index.js
@@ -16,313 +16,28 @@
█████████████████████████████████████████████████████████████
*/
-let contains = function(needle) {
-
- let findNaN = needle !== needle;
- let indexOf;
-
- if(!findNaN && typeof Array.prototype.indexOf === 'function') {
- indexOf = Array.prototype.indexOf;
- } else {
- indexOf = function(needle) {
- let i = -1, index = -1;
-
- for(i = 0; i < this.length; i++) {
- let item = this[i];
-
- if((findNaN && item !== item) || item === needle) {
- index = i;
- break;
- }
- }
-
- return index;
- };
- }
-
- return indexOf.call(this, needle) > -1;
-};
-
-
-let nal = navigator.language;
-
-let itcodes = ['it', 'it-IT', 'it-CH'];
-let nlcodes = ['nl', 'nl-BE'];
-let frcodes = ['fr', 'fr-BE', 'fr-CA', 'fr-FR', 'fr-LU', 'fr-MC', 'fr-CH'];
-let ptcodes = ['pt', 'pt-BR'];
-let spcodes = ['es', 'es-AR', 'es-BO', 'es-CL', 'es-CO', 'es-CR', 'es-DO',
- 'es-EC', 'es-ES', 'es-GT', 'es-HN', 'es-MX', 'es-NI', 'es-PA',
- 'es-PE', 'es-PR', 'es-PY', 'es-SV', 'es-UY', 'es-VE'];
-
-function setDaytimeMessage () {
- if ( contains.call(itcodes, nal) ) itMessageSet(); //Italian
- else if ( contains.call(nlcodes, nal) ) nlMessageSet(); //Dutch
- else if ( contains.call(frcodes, nal) ) frMessageSet(); //French
- else if ( contains.call(ptcodes, nal) ) ptMessageSet(); //Portuguese
- else if ( contains.call(spcodes, nal) ) spMessageSet(); //Spanish
- else engMessageSet(); //English
-};
-
-function setRandomBackground () {
-
- let backgroundClasses = [
-
- 'mountain',
- 'sunrise',
- 'butterfly',
- 'leaves',
- 'river',
- 'sea',
- 'space',
- 'ice',
- 'waterfall',
- 'river',
- 'sunset',
- 'desert',
- 'canyon',
- 'rose',
- 'forest',
- 'cherry',
- 'clouds',
- 'autumn',
- 'winter',
- 'flowers',
- 'sunrise',
- 'rocks',
- 'trees',
- 'mountains',
- 'beach'
-
- ],
- currentBackgroundClass = pickFromArray(backgroundClasses);
-
- document.body.classList.add(currentBackgroundClass);
-
-};
-
-function setRandomQuote () {
-
- let quotes = {
- eng: [
- 'Time goes on. So whatever you’re going to do, do it. Do it now. Don’t wait.',
- 'All our dreams can come true, if we have the courage to pursue them.',
- 'It does not matter how slowly you go as long as you do not stop.',
- 'Believe in yourself. You are braver than you think, more talented than you know, and capable of more than you imagine.',
- 'If you believe it will work out, you’ll see opportunities. If you believe it won’t, you will see obstacles',
- 'Everything you’ve ever wanted is on the other side of fear.',
- 'Success is not final, failure is not fatal: it is the courage to continue that counts.',
- 'There is only one thing that makes a dream impossible to achieve: the fear of failure.',
- 'Your true success in life begins only when you make the commitment to become excellent at what you do.',
- 'Believe in yourself, take on your challenges, dig deep within yourself to conquer fears. Never let anyone bring you down. You got to keep going.',
- 'Too many of us are not living our dreams because we are living our fears.',
- 'Hard times don’t create heroes. It is during the hard times when the ‘hero’ within us is revealed.',
- 'If you can tune into your purpose and really align with it, setting goals so that your vision is an expression of that purpose, then life flows much more easily.',
- 'Whatever the mind can conceive and believe, it can achieve.',
- 'Don’t wish it were easier. Wish you were better.',
- 'A champion is defined not by their wins but by how they can recover when they fall.',
- '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.',
-
- ],
- ita: [
- 'Il tempo passa. Quindi qualunque cosa che farai, falla. Falla ora. Non aspettare',
- 'Tutti i nostri sogni possono diventare reali, se abbiamo il coraggio di seguirli.',
- 'Non importa quanto lentamente vai fino a quando non ti fermi',
- 'Credi in te stesso. Sei più coraggioso di quanto pensi, più talentuoso di quanto credi, e capace più di quanto puoi immaginare.',
- 'Se ci credi funzionerà, vedrai delle opportunità. Se non ci credi, vedrai solamente ostacoli',
- 'Tutti i tuoi desideri sono opposti alla paura',
- 'Il successo non è la fine, il fallimento non è fatale: è il coraggio per continuare quello che conta.',
- "C'è solo una cosa che fa i sogni impossibili: la paura di fallire",
- 'Il vero successo nella tua vita inizia solo quando fai il sacrificio per diventare eccellente a quello che ami.',
- "Credi in te stesso, sfida i tuoi problemi, scava nel profondo del tuo io per sconfiggere le tue paure. Mai arrendersi per qualcun'altro. Tu devi continuare.",
- "Troppe persone non vivono i loro sogni per vivere nelle loro paure",
- "Tempi difficili non fanno eroi. È durante i tempi duri che \"l'eroe\" in noi viene rivelato.",
- "Se puoi sintonizzare sul tuo senso e allinearti a quest'ultimo, impostando i tuoi obiettivi in modo che la tua visione sia un'espressione di quel senso, La tua vita scorre molto più facilmente",
- "Qualunque cosa la mente può immaginare e crederese, si può realizzare",
- "Non desiderare che fosse stato più facile. Desidera che tu fossi stato migliore.",
- "Un campione si definisce non dalle sue vittorie ma da come recupera quando cade",
- "La motivazione viene dal lavorare so cose che amiamo",
- "Con il giusto tipo di allenamento e determinazione puoi fare tutto",
- "Alcune persone cercano un posto indimenticabile. Altre lo transformano in un posto mozzafiato.",
- "La vita è come andare in bicicletta. Per tenerti in equilibrio, devi continuare a muoverti"
- ],
- spa: [
- 'El tiempo continúa. Así que lo que sea que vayas a hacer, hazlo. Hazlo ahora. No esperes',
- 'Todos nuestros sueños pueden hacerse realidad, si tenemos el coraje de perseguirlos.',
- 'No importa qué tan lento vayas, siempre y cuando no te detengas.',
- 'Cree en ti mismo. Eres más valiente de lo que crees, más talentoso de lo que sabes y capaz de más de lo que imaginas.',
- 'Si crees que funcionará, verás oportunidades. Si crees que no, verás obstáculos ',
- 'Todo lo que siempre has querido está al otro lado del miedo',
- 'El éxito no es definitivo, el fracaso no es fatal: el coraje para continuar es lo que cuenta',
- 'Solo hay una cosa que hace que un sueño sea imposible de lograr: el miedo al fracaso',
- 'Tu verdadero éxito en la vida comienza solo cuando te comprometes a ser excelente en lo que haces',
- 'Cree en ti mismo, asume tus desafíos, excava profundo dentro de ti mismo para vencer tus miedos. Nunca dejes que nadie te derribe. Tienes que seguir adelante.',
- 'Muchos de nosotros no estamos viviendo nuestros sueños porque estamos viviendo nuestros miedos',
- 'Los tiempos difíciles no crean héroes. Es durante los momentos difíciles en que se revela el héroe dentro de nosotros.',
- 'Si puedes sincornizarte con tu propósito, y realmente alinearte con él, estableciendo metas para que tu visión sea una expresión de ese propósito, entonces la vida fluye mucho más fácilmente',
- 'Lo que la mente pueda concebir y creer, lo puede lograr',
- 'No desees que sea fácil. Desea ser mejor.',
- '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.',
- ],
- 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.',
- ],
- authors: [
- 'Robert De Niro',
- 'Walt Disney',
- 'Confucius',
- 'Roy T. Bennett',
- 'Wayne Dyer',
- 'George Addair',
- 'Winston Churchill',
- 'Paulo Coelho',
- 'Brian Tracy',
- 'Chantal Sutherland',
- 'Les Brown',
- 'Bob Riley',
- 'Jack Canfield',
- 'Napoleon Hill',
- 'Jim Rohn',
- 'Serena Williams',
- 'Sheryl Sandberg',
- 'Reese Witherspoon',
- 'Hazrat Inayat Khan',
- 'Albert Einstein'
- ]
-
- };
- let id = getRandIndex( quotes.authors );
-
- if ( contains.call(itcodes, nal) ) setHTMLContent('blockquote', quotes.ita[id]);
- else if( contains.call(ptcodes, nal) ) setHTMLContent('blockquote', quotes.pt[id] || quotes.eng[id]);
- else if( contains.call(spcodes, nal) ) setHTMLContent('blockquote', quotes.spa[id]);
- else setHTMLContent('blockquote', quotes.eng[id]);
-
- setHTMLContent('cite', quotes.authors[id]);
-
-};
-
-
-function setTime () {
-
- let date = new Date(),
-
- time = [
-
- formatTimeUnit(date.getHours()),
- formatTimeUnit(date.getMinutes()),
- formatTimeUnit(date.getSeconds())
-
- ];
-
- // joins all of the array elements into a string using the ':' separator
- // example: [16, 32, 03] -> "16:32:03"
-
- setHTMLContent('time', time.join(':'));
-
-};
-
-function init () {
+const functions = require('./modules/functions.js');
+const init = () => {
+
// init() gets executed only when the page is fully loaded
- setDaytimeMessage();
- setRandomBackground();
- setRandomQuote();
- setTime();
+ functions.setDaytimeMessage();
+ functions.setRandomBackground();
+ functions.setRandomQuote();
+ functions.setTime();
// set interval to update time every second
- let timeInterval = setInterval(setTime, 1000);
+ let timeInterval = setInterval(functions.setTime, 1000);
};
// initialize on page load through a listener
document.addEventListener('DOMContentLoaded', init);
-// UTILITY FUNCTIONS
-
-// format time
-
-function formatTimeUnit (unit) { return unit < 10 ? '0' + unit : unit };
-
-// setHTMLContent is the kind of function that is referred to as a 'wrapper'
-
-function setHTMLContent (selector, content) { return document.querySelector(selector) .innerHTML = content };
-
-function getRandIndex(array) { return Math.floor(Math.random() * (array.length - 1)) }
-
-function pickFromArray(array) { return array[Math.floor(Math.random() * (array.length - 1))] };
-
// Disable right click
document.oncontextmenu=RightMouseDown;
function RightMouseDown() { return false; }
-
-// LANGUAGE FUNCTIONS
-
-// English
-
-function engMessageSet() {
-
- let hour = new Date().getHours(); // Get the current hour
- 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 after 6pm, set the time string to "Good afternoon"
-
- setHTMLContent('.greeting', time); // Write the string contents to the HTML
-}
-
-// Italian
-function itMessageSet() {
- let hour = new Date().getHours(); // Get the current hour
- let time = 'Buongiorno';
-
- if (hour > 18) time = 'Buonasera'; //In Italian there is just Buongiorno or Buonasera
-
- setHTMLContent('.greeting', time); // Write the string contents to the HTML
-}
-
-// Dutch
-function nlMessageSet() {
- let hour = new Date().getHours(); // Get the current hour
- 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 after 6pm, set the time string to "Good afternoon"
-
- setHTMLContent('.greeting', time); // Write the string contents to the HTML
-}
-
-// French
-function frMessageSet() {
- let hour = new Date().getHours(); // Get the current hour
- 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 after 6pm, set the time string to "Good afternoon"
-
- setHTMLContent('.greeting', time); // Write the string contents to the HTML
-}
-
-// Spanish
-function spMessageSet() {
- let hour = new Date().getHours(); // Get the current hour
- 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 > 20) time = 'Buenas Noches'; // If it's after 6pm, set the time string to "Good afternoon"
-
- setHTMLContent('.greeting', time); // Write the string contents to the HTML
-}
diff --git a/src/assets/js/modules/background.js b/src/assets/js/modules/background.js
new file mode 100644
index 00000000..9a06465a
--- /dev/null
+++ b/src/assets/js/modules/background.js
@@ -0,0 +1,45 @@
+/*
+█████████████████████████████████████████████████████████████
+██ ██
+██ ███ ███ ██ ██ ███████ ██
+██ ████ ████ ██ ██ ██ ██
+██ ██ ████ ██ ██ ██ █████ ██
+██ ██ ██ ██ ██ ██ ██ ██
+██ ██ ██ ██████ ███████ ██
+██ ██
+██ ██
+██ Copyright 2018-2019 David Ralph (ohlookitsderpy) ██
+██ Licensed under MIT ██
+██ GitHub: https://github.com/ohlookitsderpy/Mue ██
+██ ██
+██ Special thanks to contributors! <3 ██
+█████████████████████████████████████████████████████████████
+*/
+
+module.exports = [
+ 'mountain',
+ 'sunrise',
+ 'butterfly',
+ 'leaves',
+ 'river',
+ 'sea',
+ 'space',
+ 'ice',
+ 'waterfall',
+ 'river',
+ 'sunset',
+ 'desert',
+ 'canyon',
+ 'rose',
+ 'forest',
+ 'cherry',
+ 'clouds',
+ 'autumn',
+ 'winter',
+ 'flowers',
+ 'sunrise',
+ 'rocks',
+ 'trees',
+ 'mountains',
+ 'beach'
+]
\ No newline at end of file
diff --git a/src/assets/js/modules/codes.js b/src/assets/js/modules/codes.js
new file mode 100644
index 00000000..7109712b
--- /dev/null
+++ b/src/assets/js/modules/codes.js
@@ -0,0 +1,28 @@
+/*
+█████████████████████████████████████████████████████████████
+██ ██
+██ ███ ███ ██ ██ ███████ ██
+██ ████ ████ ██ ██ ██ ██
+██ ██ ████ ██ ██ ██ █████ ██
+██ ██ ██ ██ ██ ██ ██ ██
+██ ██ ██ ██████ ███████ ██
+██ ██
+██ ██
+██ Copyright 2018-2019 David Ralph (ohlookitsderpy) ██
+██ Licensed under MIT ██
+██ GitHub: https://github.com/ohlookitsderpy/Mue ██
+██ ██
+██ Special thanks to contributors! <3 ██
+█████████████████████████████████████████████████████████████
+*/
+
+module.exports = {
+ itcodes: ['it', 'it-IT', 'it-CH'],
+ nlcodes: ['nl', 'nl-BE'],
+ frcodes: ['fr', 'fr-BE', 'fr-CA', 'fr-FR', 'fr-LU', 'fr-MC', 'fr-CH'],
+ ptcodes: ['pt', 'pt-BR'],
+ spcodes: ['es', 'es-AR', 'es-BO', 'es-CL', 'es-CO', 'es-CR', 'es-DO',
+ 'es-EC', 'es-ES', 'es-GT', 'es-HN', 'es-MX', 'es-NI', 'es-PA',
+ 'es-PE', 'es-PR', 'es-PY', 'es-SV', 'es-UY', 'es-VE'
+ ]
+}
\ No newline at end of file
diff --git a/src/assets/js/modules/functions.js b/src/assets/js/modules/functions.js
new file mode 100644
index 00000000..c23150d4
--- /dev/null
+++ b/src/assets/js/modules/functions.js
@@ -0,0 +1,65 @@
+/*
+█████████████████████████████████████████████████████████████
+██ ██
+██ ███ ███ ██ ██ ███████ ██
+██ ████ ████ ██ ██ ██ ██
+██ ██ ████ ██ ██ ██ █████ ██
+██ ██ ██ ██ ██ ██ ██ ██
+██ ██ ██ ██████ ███████ ██
+██ ██
+██ ██
+██ Copyright 2018-2019 David Ralph (ohlookitsderpy) ██
+██ Licensed under MIT ██
+██ GitHub: https://github.com/ohlookitsderpy/Mue ██
+██ ██
+██ Special thanks to contributors! <3 ██
+█████████████████████████████████████████████████████████████
+*/
+
+const util = require('./utility.js');
+const message = require('./message.js');
+const quotes = require('./quotes.js');
+const background = require('./background.js');
+const codes = require('./codes.js');
+
+let nal = navigator.language;
+
+module.exports = class Functions {
+ static setDaytimeMessage() {
+ if (util.contains.call(codes.itcodes, nal)) message.itMessageSet(); //Italian
+ else if (util.contains.call(codes.nlcodes, nal)) message.nlMessageSet(); //Dutch
+ else if (util.contains.call(codes.frcodes, nal)) message.frMessageSet(); //French
+ else if (util.contains.call(codes.ptcodes, nal)) message.ptMessageSet(); //Portuguese
+ else if (util.contains.call(codes.spcodes, nal)) message.spMessageSet(); //Spanish
+ else message.engMessageSet(); //English
+ };
+
+ static setRandomBackground() {
+ let currentBackgroundClass = util.pickFromArray(background);
+ document.body.classList.add(currentBackgroundClass);
+ };
+
+ static setRandomQuote() {
+ let id = util.getRandIndex(quotes.authors);
+
+ if (util.contains.call(codes.itcodes, nal)) util.setHTMLContent('blockquote', `"${quotes.ita[id]}"`);
+ else if (util.contains.call(codes.ptcodes, nal)) util.setHTMLContent('blockquote', `"${quotes.pt[id]}"` || `"${quotes.eng[id]}"`);
+ else if (util.contains.call(codes.spcodes, nal)) util.setHTMLContent('blockquote', `"${quotes.spa[id]}"`);
+ else util.setHTMLContent('blockquote', `"${quotes.eng[id]}"`);
+
+ util.setHTMLContent('cite', quotes.authors[id]);
+ };
+
+
+ static setTime() {
+ let date = new Date(),
+ time = [
+ util.formatTimeUnit(date.getHours()),
+ util.formatTimeUnit(date.getMinutes()),
+ util.formatTimeUnit(date.getSeconds())
+ ];
+ // joins all of the array elements into a string using the ':' separator
+ // example: [16, 32, 03] -> "16:32:03"
+ util.setHTMLContent('time', time.join(':'));
+ };
+}
\ No newline at end of file
diff --git a/src/assets/js/modules/message.js b/src/assets/js/modules/message.js
new file mode 100644
index 00000000..78a4163a
--- /dev/null
+++ b/src/assets/js/modules/message.js
@@ -0,0 +1,65 @@
+/*
+█████████████████████████████████████████████████████████████
+██ ██
+██ ███ ███ ██ ██ ███████ ██
+██ ████ ████ ██ ██ ██ ██
+██ ██ ████ ██ ██ ██ █████ ██
+██ ██ ██ ██ ██ ██ ██ ██
+██ ██ ██ ██████ ███████ ██
+██ ██
+██ ██
+██ Copyright 2018-2019 David Ralph (ohlookitsderpy) ██
+██ Licensed under MIT ██
+██ GitHub: https://github.com/ohlookitsderpy/Mue ██
+██ ██
+██ Special thanks to contributors! <3 ██
+█████████████████████████████████████████████████████████████
+*/
+
+const { setHTMLContent } = require('./utility.js');
+
+module.exports = class Message {
+ // English
+ static engMessageSet() {
+ let hour = new Date().getHours(); // Get the current hour
+ 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 after 6pm, set the time string to "Good afternoon"
+ setHTMLContent('.greeting', time); // Write the string contents to the HTML
+ }
+
+ // Italian
+ static itMessageSet() {
+ let hour = new Date().getHours(); // Get the current hour
+ let time = 'Buongiorno';
+ if (hour > 18) time = 'Buonasera'; //In Italian there is just Buongiorno or Buonasera
+ setHTMLContent('.greeting', time); // Write the string contents to the HTML
+ }
+
+ // Dutch
+ static nlMessageSet() {
+ let hour = new Date().getHours(); // Get the current hour
+ 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 after 6pm, set the time string to "Good afternoon"
+ setHTMLContent('.greeting', time); // Write the string contents to the HTML
+ }
+
+ // French
+ static frMessageSet() {
+ let hour = new Date().getHours(); // Get the current hour
+ 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 after 6pm, set the time string to "Good afternoon"
+ setHTMLContent('.greeting', time); // Write the string contents to the HTML
+ }
+
+ // Spanish
+ static spMessageSet() {
+ let hour = new Date().getHours(); // Get the current hour
+ 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 > 20) time = 'Buenas Noches'; // If it's after 6pm, set the time string to "Good afternoon"
+ setHTMLContent('.greeting', time); // Write the string contents to the HTML
+ }
+}
\ No newline at end of file
diff --git a/src/assets/js/modules/quotes.js b/src/assets/js/modules/quotes.js
new file mode 100644
index 00000000..a210165a
--- /dev/null
+++ b/src/assets/js/modules/quotes.js
@@ -0,0 +1,115 @@
+/*
+█████████████████████████████████████████████████████████████
+██ ██
+██ ███ ███ ██ ██ ███████ ██
+██ ████ ████ ██ ██ ██ ██
+██ ██ ████ ██ ██ ██ █████ ██
+██ ██ ██ ██ ██ ██ ██ ██
+██ ██ ██ ██████ ███████ ██
+██ ██
+██ ██
+██ Copyright 2018-2019 David Ralph (ohlookitsderpy) ██
+██ Licensed under MIT ██
+██ GitHub: https://github.com/ohlookitsderpy/Mue ██
+██ ██
+██ Special thanks to contributors! <3 ██
+█████████████████████████████████████████████████████████████
+*/
+
+module.exports = {
+ eng: [
+ 'Time goes on. So whatever you’re going to do, do it. Do it now. Don’t wait.',
+ 'All our dreams can come true, if we have the courage to pursue them.',
+ 'It does not matter how slowly you go as long as you do not stop.',
+ 'Believe in yourself. You are braver than you think, more talented than you know, and capable of more than you imagine.',
+ 'If you believe it will work out, you’ll see opportunities. If you believe it won’t, you will see obstacles',
+ 'Everything you’ve ever wanted is on the other side of fear.',
+ 'Success is not final, failure is not fatal: it is the courage to continue that counts.',
+ 'There is only one thing that makes a dream impossible to achieve: the fear of failure.',
+ 'Your true success in life begins only when you make the commitment to become excellent at what you do.',
+ 'Believe in yourself, take on your challenges, dig deep within yourself to conquer fears. Never let anyone bring you down. You got to keep going.',
+ 'Too many of us are not living our dreams because we are living our fears.',
+ 'Hard times don’t create heroes. It is during the hard times when the ‘hero’ within us is revealed.',
+ 'If you can tune into your purpose and really align with it, setting goals so that your vision is an expression of that purpose, then life flows much more easily.',
+ 'Whatever the mind can conceive and believe, it can achieve.',
+ 'Don’t wish it were easier. Wish you were better.',
+ 'A champion is defined not by their wins but by how they can recover when they fall.',
+ '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.',
+
+ ],
+ ita: [
+ 'Il tempo passa. Quindi qualunque cosa che farai, falla. Falla ora. Non aspettare',
+ 'Tutti i nostri sogni possono diventare reali, se abbiamo il coraggio di seguirli.',
+ 'Non importa quanto lentamente vai fino a quando non ti fermi',
+ 'Credi in te stesso. Sei più coraggioso di quanto pensi, più talentuoso di quanto credi, e capace più di quanto puoi immaginare.',
+ 'Se ci credi funzionerà, vedrai delle opportunità. Se non ci credi, vedrai solamente ostacoli',
+ 'Tutti i tuoi desideri sono opposti alla paura',
+ 'Il successo non è la fine, il fallimento non è fatale: è il coraggio per continuare quello che conta.',
+ "C'è solo una cosa che fa i sogni impossibili: la paura di fallire",
+ 'Il vero successo nella tua vita inizia solo quando fai il sacrificio per diventare eccellente a quello che ami.',
+ "Credi in te stesso, sfida i tuoi problemi, scava nel profondo del tuo io per sconfiggere le tue paure. Mai arrendersi per qualcun'altro. Tu devi continuare.",
+ "Troppe persone non vivono i loro sogni per vivere nelle loro paure",
+ "Tempi difficili non fanno eroi. È durante i tempi duri che \"l'eroe\" in noi viene rivelato.",
+ "Se puoi sintonizzare sul tuo senso e allinearti a quest'ultimo, impostando i tuoi obiettivi in modo che la tua visione sia un'espressione di quel senso, La tua vita scorre molto più facilmente",
+ "Qualunque cosa la mente può immaginare e crederese, si può realizzare",
+ "Non desiderare che fosse stato più facile. Desidera che tu fossi stato migliore.",
+ "Un campione si definisce non dalle sue vittorie ma da come recupera quando cade",
+ "La motivazione viene dal lavorare so cose che amiamo",
+ "Con il giusto tipo di allenamento e determinazione puoi fare tutto",
+ "Alcune persone cercano un posto indimenticabile. Altre lo transformano in un posto mozzafiato.",
+ "La vita è come andare in bicicletta. Per tenerti in equilibrio, devi continuare a muoverti"
+ ],
+ spa: [
+ 'El tiempo continúa. Así que lo que sea que vayas a hacer, hazlo. Hazlo ahora. No esperes',
+ 'Todos nuestros sueños pueden hacerse realidad, si tenemos el coraje de perseguirlos.',
+ 'No importa qué tan lento vayas, siempre y cuando no te detengas.',
+ 'Cree en ti mismo. Eres más valiente de lo que crees, más talentoso de lo que sabes y capaz de más de lo que imaginas.',
+ 'Si crees que funcionará, verás oportunidades. Si crees que no, verás obstáculos ',
+ 'Todo lo que siempre has querido está al otro lado del miedo',
+ 'El éxito no es definitivo, el fracaso no es fatal: el coraje para continuar es lo que cuenta',
+ 'Solo hay una cosa que hace que un sueño sea imposible de lograr: el miedo al fracaso',
+ 'Tu verdadero éxito en la vida comienza solo cuando te comprometes a ser excelente en lo que haces',
+ 'Cree en ti mismo, asume tus desafíos, excava profundo dentro de ti mismo para vencer tus miedos. Nunca dejes que nadie te derribe. Tienes que seguir adelante.',
+ 'Muchos de nosotros no estamos viviendo nuestros sueños porque estamos viviendo nuestros miedos',
+ 'Los tiempos difíciles no crean héroes. Es durante los momentos difíciles en que se revela el héroe dentro de nosotros.',
+ 'Si puedes sincornizarte con tu propósito, y realmente alinearte con él, estableciendo metas para que tu visión sea una expresión de ese propósito, entonces la vida fluye mucho más fácilmente',
+ 'Lo que la mente pueda concebir y creer, lo puede lograr',
+ 'No desees que sea fácil. Desea ser mejor.',
+ '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.',
+ ],
+ 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.',
+ ],
+ authors: [
+ 'Robert De Niro',
+ 'Walt Disney',
+ 'Confucius',
+ 'Roy T. Bennett',
+ 'Wayne Dyer',
+ 'George Addair',
+ 'Winston Churchill',
+ 'Paulo Coelho',
+ 'Brian Tracy',
+ 'Chantal Sutherland',
+ 'Les Brown',
+ 'Bob Riley',
+ 'Jack Canfield',
+ 'Napoleon Hill',
+ 'Jim Rohn',
+ 'Serena Williams',
+ 'Sheryl Sandberg',
+ 'Reese Witherspoon',
+ 'Hazrat Inayat Khan',
+ 'Albert Einstein'
+ ]
+};
\ No newline at end of file
diff --git a/src/assets/js/modules/utility.js b/src/assets/js/modules/utility.js
new file mode 100644
index 00000000..cfc26da2
--- /dev/null
+++ b/src/assets/js/modules/utility.js
@@ -0,0 +1,61 @@
+/*
+█████████████████████████████████████████████████████████████
+██ ██
+██ ███ ███ ██ ██ ███████ ██
+██ ████ ████ ██ ██ ██ ██
+██ ██ ████ ██ ██ ██ █████ ██
+██ ██ ██ ██ ██ ██ ██ ██
+██ ██ ██ ██████ ███████ ██
+██ ██
+██ ██
+██ Copyright 2018-2019 David Ralph (ohlookitsderpy) ██
+██ Licensed under MIT ██
+██ GitHub: https://github.com/ohlookitsderpy/Mue ██
+██ ██
+██ Special thanks to contributors! <3 ██
+█████████████████████████████████████████████████████████████
+*/
+
+module.exports = class Util {
+ // format time
+ static formatTimeUnit(unit) {
+ 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));
+ }
+
+ // pick random from array
+ static pickFromArray(array) {
+ return array[Math.floor(Math.random() * (array.length - 1))];
+ };
+
+ static contains(needle) {
+ let findNaN = needle !== needle;
+ let indexOf;
+ if (!findNaN && typeof Array.prototype.indexOf === 'function') {
+ indexOf = Array.prototype.indexOf;
+ } else {
+ indexOf = (needle) => {
+ let i = -1,
+ index = -1;
+ for (i = 0; i < this.length; i++) {
+ let item = this[i];
+ if ((findNaN && item !== item) || item === needle) {
+ index = i;
+ break;
+ }
+ }
+ return index;
+ };
+ }
+ return indexOf.call(this, needle) > -1;
+ };
+}
\ No newline at end of file
diff --git a/src/assets/scss/index.scss b/src/assets/scss/base.scss
similarity index 98%
rename from src/assets/scss/index.scss
rename to src/assets/scss/base.scss
index 0e9edd30..8b030646 100644
--- a/src/assets/scss/index.scss
+++ b/src/assets/scss/base.scss
@@ -18,7 +18,7 @@
@import 'modules/background';
@import 'modules/quote';
-@import 'modules/time-greeting';
+@import 'modules/time-greeting';
/* Body */
html, body { height: 100%; }
diff --git a/src/assets/scss/modules/_background.scss b/src/assets/scss/modules/_background.scss
index 5fd85fad..f7ff79d1 100644
--- a/src/assets/scss/modules/_background.scss
+++ b/src/assets/scss/modules/_background.scss
@@ -1,3 +1,21 @@
+/*
+█████████████████████████████████████████████████████████████
+██ ██
+██ ███ ███ ██ ██ ███████ ██
+██ ████ ████ ██ ██ ██ ██
+██ ██ ████ ██ ██ ██ █████ ██
+██ ██ ██ ██ ██ ██ ██ ██
+██ ██ ██ ██████ ███████ ██
+██ ██
+██ ██
+██ Copyright 2018-2019 David Ralph (ohlookitsderpy) ██
+██ Licensed under MIT ██
+██ GitHub: https://github.com/ohlookitsderpy/Mue ██
+██ ██
+██ Special thanks to contributors! <3 ██
+█████████████████████████████████████████████████████████████
+*/
+
.mountain { background-image: url('../img/1.jpeg'); }
.sunrise { background-image: url('../img/2.jpeg'); }
.butterfly { background-image: url('../img/3.jpeg'); }
diff --git a/src/assets/scss/modules/_quote.scss b/src/assets/scss/modules/_quote.scss
index 741a2a78..b02d759b 100644
--- a/src/assets/scss/modules/_quote.scss
+++ b/src/assets/scss/modules/_quote.scss
@@ -1,3 +1,21 @@
+/*
+█████████████████████████████████████████████████████████████
+██ ██
+██ ███ ███ ██ ██ ███████ ██
+██ ████ ████ ██ ██ ██ ██
+██ ██ ████ ██ ██ ██ █████ ██
+██ ██ ██ ██ ██ ██ ██ ██
+██ ██ ██ ██████ ███████ ██
+██ ██
+██ ██
+██ Copyright 2018-2019 David Ralph (ohlookitsderpy) ██
+██ Licensed under MIT ██
+██ GitHub: https://github.com/ohlookitsderpy/Mue ██
+██ ██
+██ Special thanks to contributors! <3 ██
+█████████████████████████████████████████████████████████████
+*/
+
.quote {
--shadow-shift: 0.125rem;
diff --git a/src/assets/scss/modules/_time-greeting.scss b/src/assets/scss/modules/_time-greeting.scss
index fc32c86e..855efd9f 100644
--- a/src/assets/scss/modules/_time-greeting.scss
+++ b/src/assets/scss/modules/_time-greeting.scss
@@ -1,3 +1,21 @@
+/*
+█████████████████████████████████████████████████████████████
+██ ██
+██ ███ ███ ██ ██ ███████ ██
+██ ████ ████ ██ ██ ██ ██
+██ ██ ████ ██ ██ ██ █████ ██
+██ ██ ██ ██ ██ ██ ██ ██
+██ ██ ██ ██████ ███████ ██
+██ ██
+██ ██
+██ Copyright 2018-2019 David Ralph (ohlookitsderpy) ██
+██ Licensed under MIT ██
+██ GitHub: https://github.com/ohlookitsderpy/Mue ██
+██ ██
+██ Special thanks to contributors! <3 ██
+█████████████████████████████████████████████████████████████
+*/
+
/* Greeting */
.greeting {
diff --git a/src/index.html b/src/index.html
index 9a8e27af..2f23ad4f 100644
--- a/src/index.html
+++ b/src/index.html
@@ -26,8 +26,8 @@
New Tab
-
-
+
+
@@ -47,6 +47,6 @@