From 8554f7018accd4a1f71ae7f13edb210874d7fd37 Mon Sep 17 00:00:00 2001 From: m1ka Date: Mon, 13 Apr 2026 12:29:23 +0200 Subject: [PATCH] lmao --- bricks/base-header.thtml | 3 ++- scripts/assign-random-colour-to-link.js | 8 ++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) create mode 100644 scripts/assign-random-colour-to-link.js diff --git a/bricks/base-header.thtml b/bricks/base-header.thtml index 9734669c1738f1376695a57558c3c3617a5b4f87..aa52aa608f01ce8e5f86b4dd218013b97e208899 100644 --- a/bricks/base-header.thtml +++ b/bricks/base-header.thtml @@ -1,4 +1,5 @@ - \ No newline at end of file + + diff --git a/scripts/assign-random-colour-to-link.js b/scripts/assign-random-colour-to-link.js new file mode 100644 index 0000000000000000000000000000000000000000..28e5722536108160b58fcb2306cef75cea7dd796 --- /dev/null +++ b/scripts/assign-random-colour-to-link.js @@ -0,0 +1,8 @@ +addEventListener("DOMContentLoaded", _ => { + const links = document.querySelectorAll("a"); + links.forEach(link => { + const a = (Math.random() * 0.80) - 0.4; + const b = (Math.random() * 0.80) - 0.4; + link.style.color = `oklab(60.0% ${a} ${b})`; + }); +}); \ No newline at end of file