Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions public/css/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -702,6 +702,16 @@ input, textarea, select {
opacity: 0;
}

#scroll-progress {
position: fixed;
top: 0;
left: 0;
width: 0%;
height: 4px;
background: #a855f7;
z-index: 9999;
transition: width 0.1s ease;
}
/* Navbar Container */
.navbar {
display: flex;
Expand Down
4 changes: 4 additions & 0 deletions public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,10 @@
<link rel="stylesheet" href="css/light-mode.css">
</head>
<body class="theme-midnight">

<!-- scroll progress -->
<div id="scroll-progress"></div>

<!-- Background Effects -->
<div class="theme-toggle-floating"><button class="theme-toggle-btn" aria-label="Switch to light mode" title="Switch to light mode"><span class="toggle-track"><span class="toggle-icon toggle-icon-moon"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z"/></svg></span><span class="toggle-icon toggle-icon-sun"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="5"/><line x1="12" y1="1" x2="12" y2="3"/><line x1="12" y1="21" x2="12" y2="23"/><line x1="4.22" y1="4.22" x2="5.64" y2="5.64"/><line x1="18.36" y1="18.36" x2="19.78" y2="19.78"/><line x1="1" y1="12" x2="3" y2="12"/><line x1="21" y1="12" x2="23" y2="12"/><line x1="4.22" y1="19.78" x2="5.64" y2="18.36"/><line x1="18.36" y1="5.64" x2="19.78" y2="4.22"/></svg></span><span class="toggle-thumb"></span></span></button></div>
<div class="bg-gradient"></div>
Expand Down
20 changes: 20 additions & 0 deletions public/js/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -373,6 +373,26 @@
return div.innerHTML;
}

// --- Scroll Progress Indicator ---
window.addEventListener("scroll", () => {
const scrollTop = document.documentElement.scrollTop;

const scrollHeight =
document.documentElement.scrollHeight -
document.documentElement.clientHeight;

const scrollPercent =
(scrollTop / scrollHeight) * 100;

const progressBar =
document.getElementById("scroll-progress");

if (progressBar) {
progressBar.style.width = scrollPercent + "%";
}
});
// --- End Scroll Progress Indicator ---

// ─── Init ───
document.addEventListener('DOMContentLoaded', async () => {
await loadSettings();
Expand Down