Repository navigation
Expand file tree
/
Copy pathlibrary.html
More file actions
444 lines (409 loc) · 23.5 KB
/
Copy pathlibrary.html
File metadata and controls
444 lines (409 loc) · 23.5 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<script>
(function () {
const theme = localStorage.getItem('bibliodrift_theme');
if (theme === 'night') {
document.documentElement.setAttribute('data-theme', 'night');
}
})();
</script>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<!-- Added SEO meta description to improve search engine discoverability and click-through rates -->
<meta name="description" content="BiblioDrift — Discover books by mood, track your reading journey, and get AI-powered recommendations.">
<title>My Library | BiblioDrift</title>
<link rel="stylesheet" href="../css/style.css">
<link rel="stylesheet" href="../css/style-responsive.css">
<link
href="https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,600;1,400&family=Georgia&display=swap"
rel="stylesheet">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/all.min.css">
<link rel="icon" href="../assets/images/biblioDrift_favicon.png" type="image/png">
<!-- PWA -->
<link rel="manifest" href="../manifest.json">
<meta name="theme-color" content="#2c2420">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
<meta name="apple-mobile-web-app-title" content="BiblioDrift">
<link rel="apple-touch-icon" href="../assets/images/biblioDrift_favicon.png">
<script src="https://d3js.org/d3.v7.min.js"></script>
</head>
<body>
<header>
<a href="index.html" class="logo">
<img style="height: 40px" src="../assets/images/biblioDrift_favicon.png" alt="BiblioDrift Logo"> BiblioDrift
</a>
<div class="header-controls">
<div class="search-bar">
<input type="text" id="searchInput" class="search-input" placeholder="Search for a feeling...">
<i class="fa-solid fa-search search-icon"></i>
</div>
<nav class="nav-links">
<div class="tooltip">
<a href="index.html">Discovery</a>
<span class="tooltip-text"><i class="fa-solid fa-wand-magic-sparkles"></i> Explore books</span>
</div>
<div class="tooltip">
<a href="library.html" class="active">My Library</a>
<span class="tooltip-text"><i class="fa-solid fa-book"></i> My Library</span>
</div>
<div class="tooltip">
<a href="chat.html">Chat</a>
<span class="tooltip-text"><i class="fa-solid fa-comments"></i> Chat</span>
</div>
<!-- DYNAMIC AUTH LINK -->
<div class="tooltip">
<a href="auth.html" id="navAuthLink">Sign In</a>
<span class="tooltip-text" id="navAuthTooltip"><i class="fa-solid fa-key"></i> Access account</span>
</div>
</nav>
<button id="themeToggle" class="btn-icon" title="Toggle Theme">
<i class="fa-solid fa-moon"></i>
</button>
</div>
</header>
<main>
<section class="hero library-hero">
<h1>My Virtual Library</h1>
<p>A quiet sanctuary for your stories.</p>
<button id="export-library" class="btn-icon library-export-btn" title="Export Library">
<i class="fa-solid fa-download"></i> Export Library
</button>
<div class="view-toggles" style="margin-top: 1.5rem; display: flex; justify-content: center; gap: 1rem;">
<button id="view-shelves-btn" class="btn-primary active-view" style="border-radius: 20px; padding: 0.5rem 1.5rem;">
<i class="fa-solid fa-server"></i> Shelves
</button>
<button id="view-constellation-btn" class="btn-secondary" style="border-radius: 20px; padding: 0.5rem 1.5rem;">
<i class="fa-solid fa-chart-nodes"></i> Constellation
</button>
</div>
<div class="sort-controls">
<div class="sort-controls" role="region" aria-label="Library filter and sort controls">
<div class="filter-group">
<i class="fa-solid fa-filter"></i>
<select id="library-filter" class="sort-select" aria-label="Filter books by shelf"
title="Filter books by shelf">
<option value="all">All Shelves</option>
<option value="current">Currently Immersed</option>
<option value="want">Anticipated Journeys</option>
<option value="finished">Finished Books</option>
</select>
</div>
<div class="filter-group">
<i class="fa-solid fa-arrow-down-short-wide"></i>
<select id="library-sort" class="sort-select" aria-label="Sort books" title="Sort books">
<option value="title">Sort by Title</option>
<option value="author">Sort by Author</option>
<option value="rating">Sort by Rating</option>
<option value="mood">Sort by Mood</option>
<option value="pages">Sort by Pages</option>
</select>
</div>
</div>
</section>
<!-- 3D Bookshelf Container -->
<div class="bookshelf-3d-container" id="library-shelves" role="main" aria-label="3D bookshelf library">
<!-- Empty State Placeholder (Visible when filter returns no books) -->
<div id="library-empty-state" class="library-empty-state" hidden>
<div class="empty-state-icon">
<i class="fa-solid fa-book-open"></i>
</div>
<h2>No books found here</h2>
<p>Your search for adventure continues... try a different shelf or explore new titles!</p>
<a href="index.html" class="btn-primary library-empty-link">
<i class="fa-solid fa-wand-magic-sparkles"></i> Explore Books
</a>
</div>
<!-- Currently Reading Shelf -->
<div class="shelf-section-3d">
<span class="shelf-label">
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none"
stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"
class="lucide lucide-book-open-icon lucide-book-open">
<path d="M12 7v14" />
<path
d="M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z" />
</svg>
Currently Immersed
</span>
<div class="bookshelf-3d">
<div class="books-row-3d" id="shelf-current-3d" role="list" aria-label="Books currently being read">
<!-- Books will be injected via JS -->
</div>
</div>
</div>
<!-- Want to Read Shelf -->
<div class="shelf-section-3d">
<span class="shelf-label">
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none"
stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"
class="lucide lucide-book-marked-icon lucide-book-marked">
<path d="M10 2v8l3-3 3 3V2" />
<path
d="M4 19.5v-15A2.5 2.5 0 0 1 6.5 2H19a1 1 0 0 1 1 1v18a1 1 0 0 1-1 1H6.5a1 1 0 0 1 0-5H20" />
</svg>
Anticipated Journeys
</span>
<div class="bookshelf-3d">
<div class="books-row-3d" id="shelf-want-3d" role="list" aria-label="Books to read">
<!-- Books will be injected via JS -->
</div>
</div>
</div>
<!-- Finished Reading Shelf -->
<div class="shelf-section-3d">
<span class="shelf-label">
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none"
stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"
class="lucide lucide-book-check-icon lucide-book-check">
<path
d="M4 19.5v-15A2.5 2.5 0 0 1 6.5 2H19a1 1 0 0 1 1 1v18a1 1 0 0 1-1 1H6.5a1 1 0 0 1 0-5H20" />
<path d="m9 9.5 2 2 4-4" />
</svg>
Lifetime Favorites
</span>
<div class="bookshelf-3d">
<div class="books-row-3d" id="shelf-finished-3d" role="list" aria-label="Books already read">
<!-- Books will be injected via JS -->
</div>
</div>
</div>
</div>
<!-- Constellation Container (Hidden by default) -->
<div id="constellation-container" class="constellation-container hidden">
<!-- D3 SVG will be injected here -->
</div>
<!-- Book Tooltip (positioned dynamically) -->
<div class="book-tooltip" id="book-tooltip" role="region" aria-label="Book preview tooltip" aria-live="polite">
<div class="tooltip-header">
<img class="tooltip-cover" id="tooltip-cover" src="" alt="Book cover">
<div class="tooltip-info">
<div class="tooltip-title" id="tooltip-title"></div>
<div class="tooltip-author" id="tooltip-author"></div>
<div class="tooltip-rating">
<span class="tooltip-stars" id="tooltip-stars">★★★★☆</span>
<span class="tooltip-rating-text" id="tooltip-rating-text">4.2</span>
</div>
<!-- Reading progress shown in tooltip for currently-reading books -->
<div class="tooltip-progress" id="tooltip-progress" style="display:none;">
<div class="tooltip-progress-bar-track">
<div class="tooltip-progress-bar-fill" id="tooltip-progress-fill"></div>
</div>
<span class="tooltip-progress-label" id="tooltip-progress-label"></span>
</div>
</div>
</div>
<div class="tooltip-description" id="tooltip-description"></div>
<div class="tooltip-hint">Click to see full details</div>
</div>
<!-- Book Detail Modal -->
<div class="book-detail-modal" id="book-detail-modal">
<button class="modal-close-btn" id="modal-close-btn" title="Close details">
<i class="fa-solid fa-times"></i>
</button>
<div class="book-detail-content">
<div class="book-expanded-layout">
<!-- Left Column: Interactive 3D Book -->
<div class="book-stage">
<div class="book-3d-scene">
<!-- Click on the book to flip it -->
<div class="book-object" id="book-3d-object" role="button" tabindex="0" aria-label="Book 3D object. Press Enter or Space to flip the book.">
<!-- Front Face -->
<div class="book-face face-front" aria-hidden="true">
<img id="modal-cover" src="" alt="Book Cover">
<div class="spine-overlay" aria-hidden="true"></div>
<div class="lighting-sheen" aria-hidden="true"></div>
</div>
<!-- Spine Face -->
<div class="book-face face-spine"></div>
<!-- Back Face -->
<div class="book-face face-back">
<div class="back-paper-texture">
<div class="back-content-scroll" id="modal-back-cover">
<!-- Description injected here -->
<h3 class="synopsis-title">Synopsis</h3>
<p id="modal-description" class="book-description-text"></p>
</div>
</div>
</div>
<!-- Paper Edges -->
<div class="book-face face-right"></div>
<div class="book-face face-top"></div>
<div class="book-face face-bottom"></div>
</div>
</div>
<div class="flip-instruction">
<i class="fa-solid fa-rotate"></i> Click book to view back cover
</div>
</div>
<!-- Right Column: Info & Details -->
<div class="book-info-panel">
<div class="book-header">
<h1 class="book-title-large" id="modal-title"></h1>
<p class="book-author-large" id="modal-author"></p>
</div>
<div class="book-stats-row">
<div class="stat-item">
<div class="book-rating-large">
<span class="rating-stars-large"
id="modal-stars">★★★★☆</span>
<span class="rating-score" id="modal-rating-score">4.2</span>
</div>
<span class="stat-label" id="modal-rating-count">1,234 ratings</span>
</div>
<div class="stat-item">
<div class="book-categories" id="modal-categories"></div>
</div>
</div>
<!-- AI Insight Box -->
<div class="ai-insight-box" style="margin-bottom: 1.5rem;">
<div class="ai-header"
style="display: flex; align-items: center; gap: 8px; margin-bottom: 10px; color: var(--accent-gold); font-size: 0.9rem; font-weight: 600;">
<i class="fa-solid fa-wand-magic-sparkles"></i>
<span>AI Insight</span>
</div>
<div id="modal-ai-note">
<div class="text-skeleton skeleton"></div>
<div class="text-skeleton skeleton" style="width: 90%"></div>
</div>
</div>
<div class="book-actions-section">
<div class="library-actions-group">
<!-- Issue #23: Remove from Library button UI -->
<button class="action-btn-primary remove-from-library library-remove-btn"
id="modal-remove-btn" title="Remove from library">
<i class="fa-solid fa-trash"></i>
Remove from Library
</button>
<button class="action-btn-secondary library-share-btn" id="modal-share-btn-lib"
title="Share book">
<i class="fa-solid fa-share-nodes"></i> Share
</button>
<button class="btn-preview" id="modal-preview-btn-lib"
title="Preview this book">
<i class="fa-solid fa-book-open"></i> Preview
</button>
</div>
<!-- Reading Progress Tracker -->
<div class="reading-progress-tracker" id="modal-progress-section" style="display:none;">
<div class="progress-tracker-header">
<i class="fa-solid fa-book-open-reader"></i>
<span class="progress-tracker-title">Reading Progress</span>
<span class="progress-percent-badge" id="modal-progress-badge">0%</span>
</div>
<!-- Mode toggle: percentage vs pages -->
<div class="progress-mode-toggle">
<button class="progress-mode-btn active" id="progress-mode-pct" data-mode="percent">% Done</button>
<button class="progress-mode-btn" id="progress-mode-pages" data-mode="pages">Pages</button>
</div>
<!-- Percentage mode -->
<div class="progress-input-group" id="progress-pct-group">
<input type="range" min="0" max="100" value="0"
class="progress-range-slider" id="modal-progress-slider"
aria-label="Reading progress percentage">
<div class="progress-bar-track">
<div class="progress-bar-fill" id="modal-progress-bar"></div>
</div>
<div class="progress-range-labels">
<span>0%</span>
<span id="modal-progress-value">0%</span>
<span>100%</span>
</div>
</div>
<!-- Pages mode -->
<div class="progress-input-group" id="progress-pages-group" style="display:none;">
<div class="pages-input-row">
<div class="pages-field">
<label for="modal-pages-read">Pages read</label>
<input type="number" id="modal-pages-read" min="0" value="0"
class="pages-number-input" aria-label="Pages read">
</div>
<span class="pages-divider">of</span>
<div class="pages-field">
<label for="modal-pages-total">Total pages</label>
<input type="number" id="modal-pages-total" min="1" value="300"
class="pages-number-input" aria-label="Total pages">
</div>
</div>
<div class="progress-bar-track" style="margin-top:0.5rem;">
<div class="progress-bar-fill" id="modal-pages-bar"></div>
</div>
</div>
<button class="progress-save-btn" id="modal-progress-save">
<i class="fa-solid fa-floppy-disk"></i> Save Progress
</button>
</div>
<div class="shelf-selection-row" style="margin-top: 10px;">
<label for="modal-shelf-select" class="library-select-label">Move to Shelf:</label>
<select id="modal-shelf-select" class="shelf-select library-shelf-select"
aria-label="Move book to shelf" title="Move book to shelf">
<option value="current">Currently Immersed</option>
<option value="want">Anticipated Journeys</option>
<option value="finished">Lifetime Favorites</option>
</select>
</div>
</div>
<div class="book-reviews-section">
<h3>Reader Reviews</h3>
<div id="modal-reviews" class="reviews-scroll-container">
<!-- Reviews injected via JS -->
</div>
</div>
</div>
</div>
</div>
</div>
</main>
<script src="../js/config.js"></script>
<script src="../js/library-3d.js"></script>
<script src="../js/app.js"></script>
<script src="../js/book-preview.js"></script>
<script src="../js/footer.js"></script>
<script src="../script/header-scroll.js"></script>
<!-- Ambient Sanctuary UI -->
<div class="ambient-sanctuary">
<button id="ambientToggle" title="Ambient Sanctuary">
<i class="fa-solid fa-leaf"></i>
</button>
<div id="ambientPanel" class="ambient-panel">
<h3>Ambient Sanctuary</h3>
<div class="ambient-option">
<span><i class="fa-solid fa-cloud-rain"></i> Rainy Evening</span>
<label class="switch">
<input type="checkbox" id="rainToggle">
<span class="slider"></span>
</label>
</div>
<div class="ambient-option">
<span><i class="fa-solid fa-fire"></i> Cozy Fireplace</span>
<label class="switch">
<input type="checkbox" id="fireToggle">
<span class="slider"></span>
</label>
</div>
<div class="ambient-option">
<span><i class="fa-solid fa-water"></i> Calm Ocean Waves</span>
<label class="switch">
<input type="checkbox" id="oceanToggle">
<span class="slider"></span>
</label>
</div>
<div class="ambient-option">
<span><i class="fa-solid fa-bolt"></i> Stormy Rain</span>
<label class="switch">
<input type="checkbox" id="stormToggle">
<span class="slider"></span>
</label>
</div>
<div class="volume-control">
<label for="ambientVolume"><i class="fa-solid fa-volume-high"></i> Volume</label>
<input type="range" id="ambientVolume" min="0" max="1" step="0.1" value="0.5">
</div>
</div>
</div>
<script src="../js/ambient.js"></script>
<script src="../js/pwa.js"></script>
</body>
</html>