all repos — gemini-redirect @ 72edfa12661dd52e69dc7e5ff9ea37e4a9c50163

blog/index.html (view raw)

 1<!DOCTYPE html><html lang=en><head><meta charset=utf-8><meta name=description content="BiRabittoh's official website"><meta name=viewport content="width=device-width, initial-scale=1.0, user-scalable=yes"><title> BiRabittoh's Blog </title><link rel=stylesheet href=/style.css><body><article><nav class=sections><ul class=left><li><a href=/>birabittoh's site</a><li><a href=/blog class=selected>blog</a></ul><div class=right><a href=https://github.com/Bi-Rabittoh><img src=/img/github.svg alt=github></a><a href=/blog/atom.xml><img src=/img/rss.svg alt=rss></a></div></nav><main><h2 class=title>BiRabittoh's blog</h2><p id=welcome onclick=pls_stop()>Welcome to my blog!<p>I will post about anything I find interesting or noteworthy, be it related to irl stuff or the tech world. I hope someone can read this and maybe find it inspiring? If you do, feel free to let me know.<hr><ul><li><a href=https://bi-rabittoh.github.io/blog/modern-web-bloat/>Modern web bloat</a><span class=dim> [mod tech; 'tips, 'vent] </span></ul><script>
 2    const WELCOME_EN = 'Welcome to my blog!'
 3    const WELCOME_IT = 'Benvenuto al mio blog!'
 4    const APOLOGIES = "sorry i'll stop"
 5    const REWRITE_DELAY = 5000
 6    const CHAR_DELAY = 30
 7    const welcome = document.getElementById('welcome')
 8
 9    let deleting = true
10    let english = false
11    let stopped = false
12
13    const pls_stop = () => {
14        stopped = true
15        welcome.innerHTML = APOLOGIES
16    }
17
18    const begin_rewrite = () => {
19        if (stopped) {
20            // now our visitor is angry :(
21        } else if (deleting) {
22            if (welcome.innerHTML == '…') {
23                deleting = false
24            } else {
25                welcome.innerHTML = welcome.innerHTML.slice(0, -1) || '…'
26            }
27            setTimeout(begin_rewrite, CHAR_DELAY)
28        } else {
29            let text = english ? WELCOME_EN : WELCOME_IT
30            welcome.innerHTML = text.slice(0, welcome.innerHTML.length + 1)
31            deleting = welcome.innerHTML.length == text.length
32            english = deleting - english
33            setTimeout(begin_rewrite, deleting ? REWRITE_DELAY : CHAR_DELAY)
34        }
35    }
36
37    setTimeout(begin_rewrite, REWRITE_DELAY)
38</script></main><footer><div><p>Please use email for business inquiries <a href=mailto:andronacomarco@gmail.com><img src=/img/mail.svg alt=mail></a></div></footer></article><p class=abyss>owo what's this