From 631547a75142326a7c71bdf123e1475217a5ad73 Mon Sep 17 00:00:00 2001 From: "Danilo M." Date: Wed, 22 Apr 2026 12:42:56 +0200 Subject: chore: replace with extracted danix.xyz-hacker theme (danix2-hugo-theme) --- assets/js/fortune.js | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 assets/js/fortune.js (limited to 'assets/js/fortune.js') diff --git a/assets/js/fortune.js b/assets/js/fortune.js new file mode 100644 index 0000000..d4f981b --- /dev/null +++ b/assets/js/fortune.js @@ -0,0 +1,9 @@ +(function() { + const el = document.getElementById('fortune-quote'); + if (!el) return; + const quotes = JSON.parse(el.dataset.quotes); + if (!quotes || quotes.length === 0) return; + const q = quotes[Math.floor(Math.random() * quotes.length)]; + el.querySelector('.fortune-text').textContent = '"' + q.text + '"'; + el.querySelector('.fortune-author').textContent = '— ' + q.author; +})(); -- cgit v1.2.3