Skip to content

Commit 395eb3f

Browse files
fix: comprehensive restoration of PR 738 features and UI stabilization
- Restored 'My Vault' feature and synced its color scheme to the global theme - Standardized header, footer, and active link states across all HTML pages - Fixed PWA banner layout issues (position fixed) and repaired broken icon paths - Ensured pwa.css and ambient.js are loaded correctly on all pages - Removed conflicting CSS resets in chat.html to restore header visibility - Corrected footer.js relative pathing and removed hardcoded footers - Updated build_netlify.py to correctly stage manifest.json for production builds
1 parent 694a374 commit 395eb3f

18 files changed

Lines changed: 2253 additions & 208 deletions

‎build_netlify.py‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,8 @@ def rewrite_html(content: str) -> str:
4040
'src="script/header-scroll.js"': 'src="script/header-scroll.js"',
4141
'src="js/header-scroll.js"': 'src="script/header-scroll.js"',
4242
'../assets/biblioDrift_favicon.png': 'assets/images/biblioDrift_favicon.png',
43+
'href="../manifest.json"': 'href="manifest.json"',
44+
'href="/manifest.json"': 'href="manifest.json"',
4345
}
4446

4547
for pattern, replacement in replacements.items():
@@ -71,6 +73,11 @@ def main() -> None:
7173
reset_dist()
7274
for folder in ("css", "js", "assets", "script"):
7375
copy_tree(folder)
76+
77+
manifest_src = SOURCE / "manifest.json"
78+
if manifest_src.exists():
79+
shutil.copy2(manifest_src, DIST / "manifest.json")
80+
7481
build_html()
7582
inject_api_base_override()
7683

‎frontend/css/pwa.css‎

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,18 @@
11
/* pwa.css */
22

33
.pwa-install-banner {
4-
position: relative;
4+
position: fixed;
5+
bottom: 20px;
6+
left: 50%;
7+
transform: translateX(-50%);
58
display: flex;
69
justify-content: center;
710
align-items: center;
8-
911
padding: 16px 24px;
12+
background: #fff;
13+
border-radius: 12px;
14+
box-shadow: 0 4px 20px rgba(0,0,0,0.15);
15+
z-index: 10000;
1016
}
1117

1218
.pwa-banner-icon {

‎frontend/css/style.css‎

Lines changed: 53 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@
1414
--input-border: rgba(0, 0, 0, 0.1);
1515
--book-bg: #fff;
1616
--paper-color: #fffdf9;
17+
--nav-active-color: #3a241c;
18+
--nav-active-ring: rgba(58, 36, 28, 0.18);
1719

1820
/* Vibe Colors */
1921
--vibe-mystery: #78909c;
@@ -53,6 +55,8 @@
5355
--input-border: rgba(255, 255, 255, 0.1);
5456
--book-bg: #2c2420;
5557
--paper-color: #e0d5cb;
58+
--nav-active-color: #fff2df;
59+
--nav-active-ring: rgba(255, 242, 223, 0.22);
5660
}
5761

5862
* {
@@ -73,9 +77,15 @@ body {
7377
/* Classic serif for books */
7478
overflow-x: hidden;
7579
min-height: 100vh;
80+
display: flex;
81+
flex-direction: column;
7682
transition: background-color 0.4s ease, color 0.4s ease, border-color 0.4s ease, box-shadow 0.4s ease;
7783
}
7884

85+
main {
86+
flex: 1;
87+
}
88+
7989
/* Explicit night-mode overrides — bulletproof fallback */
8090
[data-theme="night"] body,
8191
html[data-theme="night"],
@@ -190,16 +200,52 @@ header {
190200
gap: 0.5rem;
191201
}
192202

203+
.nav-links {
204+
display: flex;
205+
align-items: center;
206+
gap: 2rem;
207+
}
208+
193209
.nav-links a {
194210
text-decoration: none;
195211
color: var(--text-muted);
196-
margin-left: 2rem;
197-
transition: color 0.3s ease;
212+
position: relative;
213+
display: inline-flex;
214+
align-items: center;
215+
justify-content: center;
216+
min-height: 30px;
217+
padding-bottom: 10px;
218+
transition: color 0.25s ease;
198219
}
199220

200221
.nav-links a:hover,
201222
.nav-links a.active {
202-
color: var(--text-main);
223+
color: var(--nav-active-color);
224+
}
225+
226+
.nav-links a::after {
227+
content: "";
228+
position: absolute;
229+
left: 50%;
230+
bottom: 0;
231+
width: 5px;
232+
height: 5px;
233+
border-radius: 50%;
234+
background: var(--nav-active-color);
235+
box-shadow: 0 0 0 3px var(--nav-active-ring);
236+
opacity: 0;
237+
transform: translateX(-50%) scale(0.35);
238+
transition: opacity 0.22s ease, transform 0.22s ease;
239+
}
240+
241+
.nav-links a:hover::after {
242+
opacity: 0.45;
243+
transform: translateX(-50%) scale(0.75);
244+
}
245+
246+
.nav-links a.active::after {
247+
opacity: 1;
248+
transform: translateX(-50%) scale(1);
203249
}
204250

205251
/* === ANIMATED HOVER TOOLTIPS FOR NAVIGATION (NEW) === */
@@ -209,48 +255,19 @@ header {
209255
}
210256

211257
.tooltip-text {
212-
position: absolute;
213-
left: 50%;
214-
bottom: calc(100% + 8px);
215-
transform: translateX(-50%) scale(0.95) translateY(6px);
216-
padding: 10px 14px;
217-
background: #fffaf3;
218-
color: #2b2b2b;
219-
font-size: 13px;
220-
font-weight: 500;
221-
white-space: nowrap;
222-
border-radius: 10px;
223-
box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
224-
border: 1px solid rgba(0, 0, 0, 0.08);
225-
opacity: 0;
226-
visibility: hidden;
227-
pointer-events: none;
228-
transition: all 0.25s ease;
229-
z-index: 9999;
258+
display: none;
230259
}
231260

232261
.tooltip-text::after {
233-
content: "";
234-
position: absolute;
235-
top: 100%;
236-
left: 50%;
237-
transform: translateX(-50%) rotate(45deg);
238-
width: 12px;
239-
height: 12px;
240-
background: #fffaf3;
241-
border-left: 1px solid rgba(0, 0, 0, 0.08);
242-
border-bottom: 1px solid rgba(0, 0, 0, 0.08);
262+
display: none;
243263
}
244264

245265
.tooltip:hover .tooltip-text {
246-
opacity: 1;
247-
visibility: visible;
248-
transform: translateX(-40%) scale(1) translateY(0);
266+
display: none;
249267
}
250268

251269
.tooltip-text i {
252-
margin-right: 5px;
253-
color: var(--accent-gold);
270+
display: none;
254271
}
255272

256273
main {

‎frontend/js/footer.js‎

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,11 @@ const createFooter = () => {
1717
<nav class="footer-nav" aria-label="Footer Navigation">
1818
<h3>Explore</h3>
1919
<ul>
20-
<li><a href="../index.html">Discovery</a></li>
21-
<li><a href="../library.html">My Library</a></li>
22-
<li><a href="../chat.html">Literary Chat</a></li>
23-
<li><a href="../auth.html">Account</a></li>
20+
<li><a href="index.html">Discovery</a></li>
21+
<li><a href="vault.html">My Vault</a></li>
22+
<li><a href="library.html">My Library</a></li>
23+
<li><a href="chat.html">Literary Chat</a></li>
24+
<li><a href="auth.html">Account</a></li>
2425
<li>
2526
<a href="https://github.com/devanshi14malhotra/BiblioDrift" target="_blank">
2627
Repository

‎frontend/js/pwa.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@
108108
banner.setAttribute('aria-label', 'Install BiblioDrift app');
109109
banner.innerHTML = `
110110
<div class="pwa-banner-content">
111-
<img src="/frontend/assets/images/biblioDrift_favicon.png"
111+
<img src="../assets/images/biblioDrift_favicon.png"
112112
alt="BiblioDrift icon" class="pwa-banner-icon">
113113
<div class="pwa-banner-text">
114114
<strong>Install BiblioDrift.</strong>

0 commit comments

Comments
 (0)