mirror of https://github.com/mue/mue.git
rename stuff
This commit is contained in:
parent
9f3bd4f3b6
commit
d73308da5d
|
@ -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}
|
||||
@-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}
|
|
@ -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 */
|
||||
|
|
|
@ -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"}
|
||||
{"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"}
|
File diff suppressed because one or more lines are too long
|
@ -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;
|
||||
|
|
|
@ -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']
|
||||
};
|
|
@ -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
|
|
@ -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
|
|
@ -16,7 +16,7 @@
|
|||
█████████████████████████████████████████████████████████████
|
||||
*/
|
||||
|
||||
@import 'modules/bg';
|
||||
@import 'modules/misc';
|
||||
@import 'modules/quote';
|
||||
@import 'modules/background';
|
||||
@import 'modules/time-greeting';
|
||||
|
|
|
@ -33,11 +33,11 @@
|
|||
|
||||
<body>
|
||||
|
||||
<div class='greeting animated'></div>
|
||||
<div class='greeting animate'></div>
|
||||
|
||||
<time class='animated'></time>
|
||||
<time class='animate'></time>
|
||||
|
||||
<div class='quote animated'>
|
||||
<div class='quote animate'>
|
||||
|
||||
<blockquote></blockquote>
|
||||
|
||||
|
|
Loading…
Reference in New Issue