From 5b476f8905f411768e23cb01d577a60e5a5fd725 Mon Sep 17 00:00:00 2001 From: "Danilo M." Date: Wed, 22 Apr 2026 12:43:22 +0200 Subject: chore: extract theme into git submodule (danix2-hugo-theme) --- .../danix-xyz-hacker/assets/js/reading-progress.js | 29 ---------------------- 1 file changed, 29 deletions(-) delete mode 100644 themes/danix-xyz-hacker/assets/js/reading-progress.js (limited to 'themes/danix-xyz-hacker/assets/js/reading-progress.js') diff --git a/themes/danix-xyz-hacker/assets/js/reading-progress.js b/themes/danix-xyz-hacker/assets/js/reading-progress.js deleted file mode 100644 index ee1192f..0000000 --- a/themes/danix-xyz-hacker/assets/js/reading-progress.js +++ /dev/null @@ -1,29 +0,0 @@ -// Reading progress bar for single pages/articles -(function() { - const progressBar = document.getElementById('reading-progress'); - - if (!progressBar) return; - - function updateProgress() { - const windowHeight = window.innerHeight; - const documentHeight = document.documentElement.scrollHeight - windowHeight; - const scrollProgress = documentHeight > 0 ? (window.scrollY / documentHeight) * 100 : 0; - progressBar.style.width = scrollProgress + '%'; - } - - // Throttle the scroll event for better performance - let ticking = false; - - window.addEventListener('scroll', function() { - if (!ticking) { - window.requestAnimationFrame(function() { - updateProgress(); - ticking = false; - }); - ticking = true; - } - }, false); - - // Initial call - updateProgress(); -})(); -- cgit v1.2.3