From d73308da5d9382c6ad563af80b66ee33ebeb12ff Mon Sep 17 00:00:00 2001 From: David Ralph Date: Sat, 30 Mar 2019 12:22:35 +0000 Subject: [PATCH] rename stuff --- src/assets/css/animate.css | 2 +- src/assets/css/base.css | 2 +- src/assets/css/base.css.map | 2 +- src/assets/js/base.js | 2 +- .../js/{background-opera.js => bg-opera.js} | 0 src/assets/js/index.js | 16 +++---- .../js/modules/{background.js => bg.js} | 0 src/assets/js/modules/code.js | 4 +- src/assets/js/modules/{function.js => fun.js} | 44 +++++++++---------- src/assets/js/modules/{message.js => msg.js} | 24 +++++----- src/assets/scss/base.scss | 2 +- .../modules/{_background.scss => _bg.scss} | 0 src/index.html | 6 +-- 13 files changed, 52 insertions(+), 52 deletions(-) rename src/assets/js/{background-opera.js => bg-opera.js} (100%) rename src/assets/js/modules/{background.js => bg.js} (100%) rename src/assets/js/modules/{function.js => fun.js} (65%) rename src/assets/js/modules/{message.js => msg.js} (94%) rename src/assets/scss/modules/{_background.scss => _bg.scss} (100%) diff --git a/src/assets/css/animate.css b/src/assets/css/animate.css index f4c706d3..3024d2a5 100644 --- a/src/assets/css/animate.css +++ b/src/assets/css/animate.css @@ -6,4 +6,4 @@ * Copyright (c) 2018 Daniel Eden * Modified by ohlookitsderpy */ -@-webkit-keyframes animated{from{opacity:0;-webkit-transform:translate3d(0, 100%, 0);transform:translate3d(0, 100%, 0)}to{opacity:1;-webkit-transform:translate3d(0, 0, 0);transform:translate3d(0, 0, 0)}}@keyframes animated{from{opacity:0;-webkit-transform:translate3d(0, 100%, 0);transform:translate3d(0, 100%, 0)}to{opacity:1;-webkit-transform:translate3d(0, 0, 0);transform:translate3d(0, 0, 0)}}.animated{-webkit-animation-name:amimated;animation-name:animated;-webkit-animation-duration:0.75s;animation-duration:0.75s;-webkit-animation-fill-mode:both;animation-fill-mode:both} \ No newline at end of file +@-webkit-keyframes animate{from{opacity:0;-webkit-transform:translate3d(0, 100%, 0);transform:translate3d(0, 100%, 0)}to{opacity:1;-webkit-transform:translate3d(0, 0, 0);transform:translate3d(0, 0, 0)}}@keyframes animate{from{opacity:0;-webkit-transform:translate3d(0, 100%, 0);transform:translate3d(0, 100%, 0)}to{opacity:1;-webkit-transform:translate3d(0, 0, 0);transform:translate3d(0, 0, 0)}}.animate{-webkit-animation-name:amimated;animation-name:animate;-webkit-animation-duration:0.75s;animation-duration:0.75s;-webkit-animation-fill-mode:both;animation-fill-mode:both} \ No newline at end of file diff --git a/src/assets/css/base.css b/src/assets/css/base.css index 8a16293a..3f45ed8a 100644 --- a/src/assets/css/base.css +++ b/src/assets/css/base.css @@ -1 +1 @@ -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))}.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%}.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")}.lake{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")}.greeting{--shadow-shift: 0.2rem;font-size:3.25rem}time{--shadow-shift: 0.4rem;font-size:12rem}/*# sourceMappingURL=base.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")}.lake{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")}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))}.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}/*# sourceMappingURL=base.css.map */ diff --git a/src/assets/css/base.css.map b/src/assets/css/base.css.map index 8edeca50..7647a20c 100644 --- a/src/assets/css/base.css.map +++ b/src/assets/css/base.css.map @@ -1 +1 @@ -{"version":3,"sourceRoot":"","sources":["../scss/modules/_misc.scss","../scss/modules/_quote.scss","../scss/modules/_background.scss","../scss/modules/_time-greeting.scss"],"names":[],"mappings":"CACA,sBACA,KAEC,aACA,sBACA,6BACA,mBAEA,SAEA,sBACA,wBACA,sBAEA,qBACA,WAEA,gBAEG,sBACH,iBAID,WACC,qBACA,kBACA,gBACA,0GAKD,MACC,0BAGD,sBAGC,kFCvBD,OACI,yBAEA,YACA,kBAEA,iBACA,kBAEA,kBACI,oBACA,kBAEA,2BACI,YACA,mBAGJ,0BACI,YACA,kBAIR,YACI,iBCzBR,gDACA,+CACA,iDACA,8CACA,6CACA,2CACA,6CACA,2CACA,iDACA,6CACA,+CACA,+CACA,+CACA,6CACA,+CACA,+CACA,+CACA,+CACA,+CACA,gDACA,gDACA,8CACA,8CACA,kDACA,8CCtBA,UACC,uBACA,kBAKD,KACC,uBACA","file":"base.css"} \ No newline at end of file +{"version":3,"sourceRoot":"","sources":["../scss/modules/_bg.scss","../scss/modules/_misc.scss","../scss/modules/_quote.scss","../scss/modules/_time-greeting.scss"],"names":[],"mappings":"CAkBA,gDACA,+CACA,iDACA,8CACA,6CACA,2CACA,6CACA,2CACA,iDACA,6CACA,+CACA,+CACA,+CACA,6CACA,+CACA,+CACA,+CACA,+CACA,+CACA,gDACA,gDACA,8CACA,8CACA,kDACA,8CCzCA,sBACA,KAEC,aACA,sBACA,6BACA,mBAEA,SAEA,sBACA,wBACA,sBAEA,qBACA,WAEA,gBAEG,sBACH,iBAID,WACC,qBACA,kBACA,gBACA,0GAKD,MACC,0BAGD,sBAGC,kFCvBD,OACI,yBAEA,YACA,kBAEA,iBACA,kBAEA,kBACI,oBACA,kBAEA,2BACI,YACA,mBAGJ,0BACI,YACA,kBAIR,YACI,iBCvBR,UACC,uBACA,kBAKD,KACC,uBACA","file":"base.css"} \ No newline at end of file diff --git a/src/assets/js/base.js b/src/assets/js/base.js index 53ba9762..cec8c34d 100644 --- a/src/assets/js/base.js +++ b/src/assets/js/base.js @@ -1 +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){const o=e!=e;let t;return(t=o||"function"!=typeof Array.prototype.indexOf?e=>{let t=-1,a=-1;for(t=0;t-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=(()=>!1)},function(e,o,t){const a=t(0),n=t(4),s=t(5),i=t(6),r=t(7),c=navigator.language;e.exports=class{static setDaytimeMessage(){a.contains.call(n.itcodes,c)&&i.itMessageSet(),a.contains.call(n.nlcodes,c)&&i.nlMessageSet(),a.contains.call(n.frcodes,c)&&i.frMessageSet(),a.contains.call(n.spcodes,c)&&i.spMessageSet(),a.contains.call(n.ficodes,c)&&i.fiMessageSet(),a.contains.call(n.decodes,c)&&i.spMessageSet(),a.contains.call(n.hecodes,c)&&i.heMessageSet(),a.contains.call(n.rucodes,c)&&i.ruMessageSet(),a.contains.call(n.arcodes,c)&&i.arMessageSet(),a.contains.call(n.svcodes,c)?i.svMessageSet():i.engMessageSet()}static setRandomBackground(){document.body.classList.add(a.pickFromArray(r))}static setRandomQuote(){const e=a.getRandIndex(s.authors);a.contains.call(n.itcodes,c)&&a.setHTMLContent("blockquote",`"${s.ita[e]}"`),a.contains.call(n.ptcodes,c)&&a.setHTMLContent("blockquote",`"${s.pt[e]}"`||`"${s.eng[e]}"`),a.contains.call(n.spcodes,c)?a.setHTMLContent("blockquote",`"${s.spa[e]}"`):a.setHTMLContent("blockquote",`"${s.eng[e]}"`),a.setHTMLContent("cite",s.authors[e])}static setTime(){const e=new Date,o=[a.formatTimeUnit(e.getHours()),a.formatTimeUnit(e.getMinutes()),a.formatTimeUnit(e.getSeconds())];a.setHTMLContent("time",o.join(":"))}}},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"],ficodes:["fi"],decodes:["de","de-AT","de-DE","de-LI","de-LU","de-CH"],hecodes:["he"],rucodes:["ru","ru-MO"],arcodes:["ar","ar-DZ","ar-BH","ar-EG","ar-IQ","ar-JO","ar-KW","ar-LB","ar-LY","ar-QA","ar-SA","ar-SY","ar-TN","ar-AE","ar-YE"],svcodes:["sv","sv-FI","sv-SV"]}},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,t){const a=(new Date).getHours(),{setHTMLContent:n}=t(0);e.exports=class{static engMessageSet(){let e="Good evening";a<12?e="Good morning":a<18&&(e="Good afternoon"),n(".greeting",e)}static itMessageSet(){let e="Buongiorno";a>18&&(e="Buonasera"),n(".greeting",e)}static nlMessageSet(){let e="Goedemiddag";a<12?e="Goedemorgen":a>18&&(e="Goedenavond"),n(".greeting",e)}static frMessageSet(){let e="Bonsoir";a<12?e="Bonjour":a>18&&(e="Bonne après-midi"),n(".greeting",e)}static spMessageSet(){let e="Buenas Tardes";a<12?e="Buenos Días":a>18&&(e="Buenas Noches"),n(".greeting",e)}static fiMessageSet(){let e="Hyvää iltaa";a<12?e="Hyvää huomenta":a>18&&(e="Hyvää iltapäivää"),n(".greeting",e)}static deMessageSet(){let e="Guten Abend";a<12?e="Guten Morgen":a>18&&(e="Guten Nachmittag"),n(".greeting",e)}static heMessageSet(){let e="ערב טוב";a<12?e="בוקר טוב":a>18&&(e="אחר הצהריים טובים"),n(".greeting",e)}static ruMessageSet(){let e="Добрый Вечер";a<12?e="добрый утро":a>18&&(e="добрый день"),n(".greeting",e)}static arMessageSet(){let e="مساء الخير";a<12?e="صباح الخير":a>18&&(e="مساء الخير"),n(".greeting",e)}static svMessageSet(){let e="God kväll";a<12&&(e="God morgon"),n(".greeting",e)}}},function(e,o){e.exports=["mountain","sunrise","butterfly","leaves","river","sea","space","ice","waterfall","lake","sunset","desert","canyon","rose","forest","cherry","clouds","autumn","winter","flowers","sunrise","rocks","trees","mountains","beach"]}]); \ No newline at end of file +!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){const o=e!=e;let t;return(t=o||"function"!=typeof Array.prototype.indexOf?e=>{let t=-1,a=-1;for(t=0;t-1}}},function(e,o,t){e.exports=t(2)},function(e,o,t){const a=t(3);document.addEventListener("DOMContentLoaded",()=>{a.setDaytimeMsg(),a.setRandBg(),a.setRandQuote(),a.setTime(),setInterval(a.setTime,1e3)});document.oncontextmenu=(()=>!1)},function(e,o,t){const a=t(4),n=t(5),i=t(0),s=t(6),r=t(7),c=navigator.language;e.exports=class{static setDaytimeMsg(){i.contains.call(s.itcodes,c)&&n.itMsgSet(),i.contains.call(s.nlcodes,c)&&n.nlMsgSet(),i.contains.call(s.frcodes,c)&&n.frMsgSet(),i.contains.call(s.spcodes,c)&&n.spMsgSet(),i.contains.call(s.ficodes,c)&&n.fiMsgSet(),i.contains.call(s.decodes,c)&&n.spMsgSet(),i.contains.call(s.hecodes,c)&&n.heMsgSet(),i.contains.call(s.rucodes,c)&&n.ruMsgSet(),i.contains.call(s.arcodes,c)&&n.arMsgSet(),i.contains.call(s.svcodes,c)?n.svMsgSet():n.engMsgSet()}static setRandBg(){document.body.classList.add(i.pickFromArray(a))}static setRandQuote(){const e=i.getRandIndex(r.authors);i.contains.call(s.itcodes,c)&&i.setHTMLContent("blockquote",`"${r.ita[e]}"`),i.contains.call(s.ptcodes,c)&&i.setHTMLContent("blockquote",`"${r.pt[e]}"`||`"${r.eng[e]}"`),i.contains.call(s.spcodes,c)?i.setHTMLContent("blockquote",`"${r.spa[e]}"`):i.setHTMLContent("blockquote",`"${r.eng[e]}"`),i.setHTMLContent("cite",r.authors[e])}static setTime(){const e=new Date,o=[i.formatTimeUnit(e.getHours()),i.formatTimeUnit(e.getMinutes()),i.formatTimeUnit(e.getSeconds())];i.setHTMLContent("time",o.join(":"))}}},function(e,o){e.exports=["mountain","sunrise","butterfly","leaves","river","sea","space","ice","waterfall","lake","sunset","desert","canyon","rose","forest","cherry","clouds","autumn","winter","flowers","sunrise","rocks","trees","mountains","beach"]},function(e,o,t){const a=(new Date).getHours(),{setHTMLContent:n}=t(0);e.exports=class{static engMsgSet(){let e="Good evening";a<12?e="Good morning":a<18&&(e="Good afternoon"),n(".greeting",e)}static itMsgSet(){let e="Buongiorno";a>18&&(e="Buonasera"),n(".greeting",e)}static nlMsgSet(){let e="Goedemiddag";a<12?e="Goedemorgen":a>18&&(e="Goedenavond"),n(".greeting",e)}static frMsgSet(){let e="Bonsoir";a<12?e="Bonjour":a>18&&(e="Bonne après-midi"),n(".greeting",e)}static spMsgSet(){let e="Buenas Tardes";a<12?e="Buenos Días":a>18&&(e="Buenas Noches"),n(".greeting",e)}static fiMsgSet(){let e="Hyvää iltaa";a<12?e="Hyvää huomenta":a>18&&(e="Hyvää iltapäivää"),n(".greeting",e)}static deMsgSet(){let e="Guten Abend";a<12?e="Guten Morgen":a>18&&(e="Guten Nachmittag"),n(".greeting",e)}static heMsgSet(){let e="ערב טוב";a<12?e="בוקר טוב":a>18&&(e="אחר הצהריים טובים"),n(".greeting",e)}static ruMsgSet(){let e="Добрый Вечер";a<12?e="добрый утро":a>18&&(e="добрый день"),n(".greeting",e)}static arMsgSet(){let e="مساء الخير";a<12?e="صباح الخير":a>18&&(e="مساء الخير"),n(".greeting",e)}static svMsgSet(){let e="God kväll";a<12&&(e="God morgon"),n(".greeting",e)}}},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"],ficodes:["fi"],decodes:["de","de-AT","de-DE","de-LI","de-LU","de-CH"],hecodes:["he"],rucodes:["ru","ru-MO"],arcodes:["ar","ar-DZ","ar-BH","ar-EG","ar-IQ","ar-JO","ar-KW","ar-LB","ar-LY","ar-QA","ar-SA","ar-SY","ar-TN","ar-AE","ar-YE"],svcodes:["sv","sv-FI","sv-SV"]}},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"]}}]); \ No newline at end of file diff --git a/src/assets/js/background-opera.js b/src/assets/js/bg-opera.js similarity index 100% rename from src/assets/js/background-opera.js rename to src/assets/js/bg-opera.js diff --git a/src/assets/js/index.js b/src/assets/js/index.js index 7d3d19d3..5007727c 100644 --- a/src/assets/js/index.js +++ b/src/assets/js/index.js @@ -16,21 +16,21 @@ █████████████████████████████████████████████████████████████ */ -const functions = require('./modules/function.js'); +const fun = require('./modules/fun.js'); const init = () => { // init() gets executed only when the page is fully loaded - functions.setDaytimeMessage(); - functions.setRandomBackground(); - functions.setRandomQuote(); - functions.setTime(); + fun.setDaytimeMsg(); + fun.setRandBg(); + fun.setRandQuote(); + fun.setTime(); // set interval to update time every second - setInterval(functions.setTime, 1000); + setInterval(fun.setTime, 1000); }; // initialize on page load through a listener document.addEventListener('DOMContentLoaded', init); // Disable right click -const rightclick = () => { return false; } -document.oncontextmenu=rightclick; +const rightClick = () => { return false; } +document.oncontextmenu=rightClick; diff --git a/src/assets/js/modules/background.js b/src/assets/js/modules/bg.js similarity index 100% rename from src/assets/js/modules/background.js rename to src/assets/js/modules/bg.js diff --git a/src/assets/js/modules/code.js b/src/assets/js/modules/code.js index 4174e17e..348dcc86 100644 --- a/src/assets/js/modules/code.js +++ b/src/assets/js/modules/code.js @@ -21,11 +21,11 @@ module.exports = { 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' ], + 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'], ficodes: ['fi'], decodes: ['de', 'de-AT', 'de-DE', 'de-LI', 'de-LU', 'de-CH'], hecodes: ['he'], rucodes: ['ru', 'ru-MO'], - arcodes: ['ar', 'ar-DZ', 'ar-BH', 'ar-EG', 'ar-IQ', 'ar-JO', 'ar-KW', 'ar-LB', 'ar-LY', 'ar-QA', 'ar-SA', 'ar-SY', 'ar-TN', 'ar-AE', 'ar-YE' ], + arcodes: ['ar', 'ar-DZ', 'ar-BH', 'ar-EG', 'ar-IQ', 'ar-JO', 'ar-KW', 'ar-LB', 'ar-LY', 'ar-QA', 'ar-SA', 'ar-SY', 'ar-TN', 'ar-AE', 'ar-YE'], svcodes: ['sv', 'sv-FI', 'sv-SV'] }; \ No newline at end of file diff --git a/src/assets/js/modules/function.js b/src/assets/js/modules/fun.js similarity index 65% rename from src/assets/js/modules/function.js rename to src/assets/js/modules/fun.js index 14aadaa3..8a121449 100644 --- a/src/assets/js/modules/function.js +++ b/src/assets/js/modules/fun.js @@ -16,35 +16,35 @@ █████████████████████████████████████████████████████████████ */ -const util = require('./util.js'); -const codes = require('./code.js'); -const quotes = require('./quote.js'); -const message = require('./message.js'); -const background = require('./background.js'); +const bg = require('./bg.js'); +const msg = require('./msg.js'); +const util = require('./util.js'); +const codes = require('./code.js'); +const quotes = require('./quote.js'); const nal = navigator.language; -module.exports = class Function { - static setDaytimeMessage() { - if (util.contains.call(codes.itcodes, nal)) message.itMessageSet(); //Italian - if (util.contains.call(codes.nlcodes, nal)) message.nlMessageSet(); //Dutch - if (util.contains.call(codes.frcodes, nal)) message.frMessageSet(); //French - //else if (util.contains.call(codes.ptcodes, nal)) message.ptMessageSet(); //Portuguese - if (util.contains.call(codes.spcodes, nal)) message.spMessageSet(); //Spanish - if (util.contains.call(codes.ficodes, nal)) message.fiMessageSet(); //Finnish - if (util.contains.call(codes.decodes, nal)) message.spMessageSet(); //German - if (util.contains.call(codes.hecodes, nal)) message.heMessageSet(); //Hebrew - if (util.contains.call(codes.rucodes, nal)) message.ruMessageSet(); //Russian - if (util.contains.call(codes.arcodes, nal)) message.arMessageSet(); //Arabic - if (util.contains.call(codes.svcodes, nal)) message.svMessageSet(); //Swedish - else message.engMessageSet(); //English +module.exports = class Fun { + static setDaytimeMsg() { + if (util.contains.call(codes.itcodes, nal)) msg.itMsgSet(); //Italian + if (util.contains.call(codes.nlcodes, nal)) msg.nlMsgSet(); //Dutch + if (util.contains.call(codes.frcodes, nal)) msg.frMsgSet(); //French + //else if (util.contains.call(codes.ptcodes, nal)) Msg.ptMsgSet(); //Portuguese + if (util.contains.call(codes.spcodes, nal)) msg.spMsgSet(); //Spanish + if (util.contains.call(codes.ficodes, nal)) msg.fiMsgSet(); //Finnish + if (util.contains.call(codes.decodes, nal)) msg.spMsgSet(); //German + if (util.contains.call(codes.hecodes, nal)) msg.heMsgSet(); //Hebrew + if (util.contains.call(codes.rucodes, nal)) msg.ruMsgSet(); //Russian + if (util.contains.call(codes.arcodes, nal)) msg.arMsgSet(); //Arabic + if (util.contains.call(codes.svcodes, nal)) msg.svMsgSet(); //Swedish + else msg.engMsgSet(); //English } - static setRandomBackground() { - document.body.classList.add(util.pickFromArray(background)); + static setRandBg() { + document.body.classList.add(util.pickFromArray(bg)); } - static setRandomQuote() { + 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 diff --git a/src/assets/js/modules/message.js b/src/assets/js/modules/msg.js similarity index 94% rename from src/assets/js/modules/message.js rename to src/assets/js/modules/msg.js index ac2384d6..12c1cead 100644 --- a/src/assets/js/modules/message.js +++ b/src/assets/js/modules/msg.js @@ -19,9 +19,9 @@ const hour = new Date().getHours(); // Get the current hour const { setHTMLContent } = require('./util.js'); -module.exports = class Message { +module.exports = class Msg { // English - static engMessageSet() { + static engMsgSet() { 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" @@ -29,14 +29,14 @@ module.exports = class Message { } // Italian - static itMessageSet() { + 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 } // Dutch - static nlMessageSet() { + static nlMsgSet() { 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" @@ -44,7 +44,7 @@ module.exports = class Message { } // French - static frMessageSet() { + static frMsgSet() { 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" @@ -52,7 +52,7 @@ module.exports = class Message { } // Spanish - static spMessageSet() { + static spMsgSet() { 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" @@ -60,7 +60,7 @@ module.exports = class Message { } // Finnish - static fiMessageSet() { + static fiMsgSet() { 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" @@ -68,7 +68,7 @@ module.exports = class Message { } // German - static deMessageSet() { + static deMsgSet() { 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" @@ -76,7 +76,7 @@ module.exports = class Message { } // Hebrew - static heMessageSet() { + static heMsgSet() { 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" @@ -84,7 +84,7 @@ module.exports = class Message { } // Russian - static ruMessageSet() { + static ruMsgSet() { 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" @@ -92,7 +92,7 @@ module.exports = class Message { } // Arabic - static arMessageSet() { + static arMsgSet() { 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" @@ -100,7 +100,7 @@ module.exports = class Message { } // Swedish - static svMessageSet() { + 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 diff --git a/src/assets/scss/base.scss b/src/assets/scss/base.scss index e0ea7a5f..2995537f 100644 --- a/src/assets/scss/base.scss +++ b/src/assets/scss/base.scss @@ -16,7 +16,7 @@ █████████████████████████████████████████████████████████████ */ +@import 'modules/bg'; @import 'modules/misc'; @import 'modules/quote'; -@import 'modules/background'; @import 'modules/time-greeting'; diff --git a/src/assets/scss/modules/_background.scss b/src/assets/scss/modules/_bg.scss similarity index 100% rename from src/assets/scss/modules/_background.scss rename to src/assets/scss/modules/_bg.scss diff --git a/src/index.html b/src/index.html index f274eade..115f4b48 100644 --- a/src/index.html +++ b/src/index.html @@ -33,11 +33,11 @@ -
+
- + -
+