summaryrefslogtreecommitdiffstats
path: root/assets/js/404.js
diff options
context:
space:
mode:
authorDanilo M. <danix@danix.xyz>2026-04-22 12:42:56 +0200
committerDanilo M. <danix@danix.xyz>2026-04-22 12:42:56 +0200
commit631547a75142326a7c71bdf123e1475217a5ad73 (patch)
treef3cfef6b3c5b42bf626fc823ddcf63b8dcf4cdbb /assets/js/404.js
parent77ccbe72fad5a4870185fff374f75471c16a9043 (diff)
downloaddanixxyz-theme-631547a75142326a7c71bdf123e1475217a5ad73.tar.gz
danixxyz-theme-631547a75142326a7c71bdf123e1475217a5ad73.zip
chore: replace with extracted danix.xyz-hacker theme (danix2-hugo-theme)
Diffstat (limited to 'assets/js/404.js')
-rw-r--r--assets/js/404.js54
1 files changed, 0 insertions, 54 deletions
diff --git a/assets/js/404.js b/assets/js/404.js
deleted file mode 100644
index c26c218..0000000
--- a/assets/js/404.js
+++ /dev/null
@@ -1,54 +0,0 @@
-/**
- * 404.js
- * Quote randomization and terminal animation for 404 page
- */
-
-(function() {
- 'use strict';
-
- const quotes = [
- 'The page you are looking for doesn\'t exist. But that\'s okay, nothing exists until you find it.',
- 'A 404 is just a redirect to a new beginning.',
- 'You found a secret path. Sadly, it leads nowhere.',
- 'This page chose to remain unknown.',
- 'In the quantum realm, this page exists and doesn\'t exist simultaneously.',
- 'Sometimes the best discoveries are the ones we never intended to find.',
- ];
-
- const quoteText = document.getElementById('quote-text');
- const quoteAuthor = document.getElementById('quote-author');
- const terminalFiles = document.getElementById('terminal-files');
-
- if (quoteText && quoteAuthor) {
- const randomQuote = quotes[Math.floor(Math.random() * quotes.length)];
- quoteText.textContent = randomQuote;
- quoteAuthor.textContent = '— 404 Philosopher';
- }
-
- if (terminalFiles) {
- const files = [
- 'post-01-security.md',
- 'post-02-web-dev.md',
- 'post-03-bash-tips.md',
- 'about.md',
- 'contact.md',
- ];
-
- files.forEach((file) => {
- const line = document.createElement('div');
- line.textContent = file;
- terminalFiles.appendChild(line);
- });
- }
-
- // Listen for search (if implemented)
- const searchBtn = document.querySelector('.search-box button');
- if (searchBtn) {
- searchBtn.addEventListener('click', () => {
- const input = document.querySelector('.search-box input');
- if (input && input.value) {
- window.location.href = `/articles/?search=${encodeURIComponent(input.value)}`;
- }
- });
- }
-})();