fixed background and webring being backwards

This commit is contained in:
Snorre Ettrup Altschul 2025-03-27 22:24:05 +01:00
parent 44658f1070
commit 20bc3ecbe0
3 changed files with 20 additions and 11 deletions

View file

@ -116,18 +116,15 @@ body {
position: fixed;
z-index: -3;
left: 0;
right: 0;
top: 0;
bottom: 0;
color: var(--background-text);
opacity: 0.3;
aspect-ratio: 1/1;
transform-origin: top;
transform: scale(150%) rotate(-20deg) translate(-15%, -15%);
font-size: 1.5em;
transform-origin: center center;
transform: rotate(-45deg);
align-content: center;
text-align: center;

View file

@ -44,8 +44,8 @@
<marquee>Footer</marquee>
</div>
<div class="footer" style="grid-area: footer2; text-align: center">
<a href="https://nixwebr.ing/next/spoody">&leftarrow; prev</a> <a href="https://nixwebr.ing">Webring</a>
<a href="https://nixwebr.ing/prev/spoody">next &rightarrow;</a>
<a href="https://nixwebr.ing/prev/spoody">&leftarrow; prev</a> <a href="https://nixwebr.ing">Webring</a>
<a href="https://nixwebr.ing/next/spoody">next &rightarrow;</a>
</div>
<div class="footer" style="grid-area: footer3; text-align: center;">
<a href="https://512kb.club" style="padding:0"><img style="aspect-ratio: 234.383/30; margin-bottom: -5px" class="club512" height=24

View file

@ -1,6 +1,18 @@
const generate_background = ((terms) => {
let str = "";
terms = terms == null ? "${i} :3 Nix Linux Test Portchain Programming Rust C++ Openbirch Godot".split(" ") : terms;
const resize_handler = () => {
const background = document.getElementById("background");
const size = Math.sqrt(
window.innerWidth * window.innerWidth +
window.innerHeight * window.innerHeight) + 100;
background.style.width = `${size}px`;
}
window.onresize = resize_handler;
resize_handler();
for (let i = 0; i < 5000; i++) {
let idx = Math.floor(Math.random() * terms.length);
str += terms[idx] + " ";
@ -10,6 +22,6 @@ const generate_background = ((terms) => {
let idx = Math.floor(Math.random() * terms.length);
document.getElementById("background").innerText = str;
try {
document.querySelector(".footer>marquee").innerText = terms[idx] + " Footer";
} catch (e) {}
document.querySelector(".footer>marquee").innerText = terms[idx] + " Footer";
} catch (e) { }
})