Coder theme

This commit is contained in:
bingus_violet 2024-06-26 04:56:54 -05:00
parent b0f6cdb1a5
commit 99b3b75058
3 changed files with 48 additions and 1 deletions

View file

@ -109,14 +109,18 @@ function purpleMagic() {
return html
}
function code() {
return '<link rel="stylesheet" type="text/css" href="/themes/code/style.css"> <script src="/themes/code/script.js"></script>'
}
var events = [
rain(),
purpleMagic(),
code(),
"",
]
module.exports = {
returnTheme: function() {
var time = new Date()
return events[time.getDate() % events.length]

View file

@ -0,0 +1,27 @@
function typeWriter(elem, delay) {
var elemText = elem.text().split('')
elem.text('_'.repeat(elemText.length))
var i = 0
function nextLetter() {
console.log(elemText.length - i)
elem.text(elemText.slice(0, i).join('') + '_'.repeat(elemText.length - i))
if (i < elemText.length) {
setTimeout(() => {
i++
nextLetter()
}, 20)
}
}
setTimeout(nextLetter, delay);
}
$(document).ready(() => {
var i = 0
var arr = $("span").each((_, item) => {
if ($(item).text().length > 0) {
i++
typeWriter($(item), i * 450)
}
// $(item).text("APPL")
})
})

View file

@ -0,0 +1,16 @@
* {
font-family: "Consolas", "Monaco", "Lucida Console", "Liberation Mono", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Courier New";
}
body {
background: black;
}
.mainTitle {
color: limegreen !important;
}
.mainTitle {
animation: typer 2s linear;
margin: auto;
}