From e3cfd9142f3008d2b33e73709cb0ab452d719c56 Mon Sep 17 00:00:00 2001 From: bingus_violet Date: Mon, 30 Sep 2024 17:34:22 -0500 Subject: [PATCH] Minor theme tweaking --- randomThemer.js | 79 +++++++---------------------------- static/themes/code/script.js | 29 ------------- static/themes/code/style.css | 16 ------- static/themes/magic/script.js | 34 --------------- static/themes/magic/style.css | 44 ------------------- static/themes/rain/script.js | 28 ------------- 6 files changed, 16 insertions(+), 214 deletions(-) delete mode 100644 static/themes/code/script.js delete mode 100644 static/themes/code/style.css delete mode 100644 static/themes/magic/script.js delete mode 100644 static/themes/magic/style.css delete mode 100644 static/themes/rain/script.js diff --git a/randomThemer.js b/randomThemer.js index deaf20a..cb1b9e5 100644 --- a/randomThemer.js +++ b/randomThemer.js @@ -1,7 +1,8 @@ function rain() { var html = "" - html += ` ` + html += `` + html += `
` var amount = 7 @@ -57,77 +58,29 @@ function rain() { return html } -function purpleMagic() { +function halloween() { var html = "" - html += ` ` - html += `
` - - var amount = 15 - - for (let index = 0; index < amount; index++) { - html += `
` - } - html += "" - html += "
" + html += `` return html } -function code() { - return '' // ' -} - -var events = [] -events = events.concat(Array(10).fill("")) -events.push(rain()) - -events = events.concat(Array(10).fill("")) -events.push(purpleMagic()) - module.exports = { returnTheme: function() { var time = new Date() - return events[time.getDate() % events.length] + + // return halloween() + + if (time.getMonth() + 1 == 10) { + return halloween() + } + + else if (time.getDate() % 10 == 0) { + return rain() + } + + return "" }, } \ No newline at end of file diff --git a/static/themes/code/script.js b/static/themes/code/script.js deleted file mode 100644 index 3f8f6bb..0000000 --- a/static/themes/code/script.js +++ /dev/null @@ -1,29 +0,0 @@ -function typeWriter(elem, delay) { - var elemText = elem.text().split('') - elem.text('_'.repeat(elemText.length)) - var i = 0 - function nextLetter() { - elem.text(elemText.slice(0, i).join('') + '_'.repeat(elemText.length - i)) - if (i < elemText.length) { - setTimeout(() => { - i++ - nextLetter() - }, 20) - } - } - setTimeout(() => { - if (elem.text() == '_'.repeat(elemText.length)) { - nextLetter() - } - }, delay); -} - -// $(document).ready(() => { -// var i = 0 -// var arr = $("span").each((_, item) => { -// if ($(item).text().length > 0) { -// i++ -// typeWriter($(item), i * 150) -// } -// }) -// }) \ No newline at end of file diff --git a/static/themes/code/style.css b/static/themes/code/style.css deleted file mode 100644 index fff5fed..0000000 --- a/static/themes/code/style.css +++ /dev/null @@ -1,16 +0,0 @@ -* { - font-family: "Consolas", "Monaco", "Lucida Console", "Liberation Mono", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Courier New"; -} - -body { - background: black; -} - -.mainTitle, .mainTitle > span { - color: limegreen !important; -} - -.mainTitle { - animation: typer 2s linear; - margin: auto; -} \ No newline at end of file diff --git a/static/themes/magic/script.js b/static/themes/magic/script.js deleted file mode 100644 index dbe136e..0000000 --- a/static/themes/magic/script.js +++ /dev/null @@ -1,34 +0,0 @@ -$(document).ready(() => { - function particle() { - var particle = $("
") - particle.addClass("particle") - particle.css("left", (Math.random() * 100).toString() + "%") - particle.css("visibility", "visible") - particle.css("top", "100%") - var anim = "sway 4s infinite cubic-bezier(0.445, 0.05, 0.55, 0.95)" - if (Math.round(Math.random()) == 1) { - anim += " alternate" - } else { - anim += " alternate-reverse" - } - particle.css("animation", anim) - - particle.animate({ - "top": "-5%" - }, (((Math.round(Math.random() * 10) / 10) * 0.3) + 20) * 1000, () => { - particle.remove() - }) - - $(".magicContainer").append(particle) -} - - $(".magicContainer > *").remove() - - function loop() { - particle() - setTimeout(() => { - loop() - }, 1000); - } - loop() -}) \ No newline at end of file diff --git a/static/themes/magic/style.css b/static/themes/magic/style.css deleted file mode 100644 index 1721029..0000000 --- a/static/themes/magic/style.css +++ /dev/null @@ -1,44 +0,0 @@ - -#card { - background-color: rgba(25, 0, 70, 1); - /* backdrop-filter: blur(5px); */ -} -.magicStuff { - position: sticky; - top: 0; - height: 0; - z-index: 0; - pointer-events: none; -} - -.magicContainer { - height: 100vh; - width: 100vw; - top: 0px; - left: 0vw; - position: absolute; - overflow: hidden; -} - -.particle { - position: absolute; - width: 5px; - aspect-ratio: 1/1; - background-color: rgb(100, 70, 255); - /* background-image: radial-gradient(rgba(175, 0, 255, 1) 0% 25%, rgba(175, 0, 255, 0.6) 25% 50%, rgba(175, 0, 255, 0.3) 50% 75%, rgba(0, 0, 255, 0)); */ - border-radius: 50%; - visibility: hidden; -} - -body { - background: linear-gradient(black, rgb(50, 0, 90)); -} - -@keyframes sway { - from { - transform: translateX(-30px); - } - to { - transform: translateX(30px); - } -} \ No newline at end of file diff --git a/static/themes/rain/script.js b/static/themes/rain/script.js deleted file mode 100644 index 2205cb4..0000000 --- a/static/themes/rain/script.js +++ /dev/null @@ -1,28 +0,0 @@ -$(document).ready(() => { - function particle() { - var particle = $("
") - particle.addClass("rainDrop") - particle.css("left", (Math.random() * 100).toString() + "%") - particle.css("visibility", "visible") - particle.css("top", "-10%") - - particle.animate({ - "top": "110%", - "easing": "linear" - }, 600, () => { - particle.remove() - }) - - $(".rainContainer").append(particle) -} - - $(".rainContainer > *").remove() - - function loop() { - particle() - setTimeout(() => { - loop() - }, 100 * (Math.random() + 0.25)); - } - loop() -}) \ No newline at end of file