aakash1777 commited on
Commit
a080ef0
·
verified ·
1 Parent(s): 823bf50

Upload books.html

Browse files
Files changed (1) hide show
  1. books.html +374 -0
books.html ADDED
@@ -0,0 +1,374 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8" />
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
6
+ <title>All Books - booknap</title>
7
+ <link rel="stylesheet" href="styles.css" />
8
+ <link href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap" rel="stylesheet" />
9
+ <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/all.min.css" />
10
+ <style>
11
+ /* Guide Right-Swiping Tabs */
12
+ .guide-tabs-section {
13
+ padding: 2rem 0 3rem;
14
+ }
15
+ .guide-tabs-container {
16
+ max-width: 1200px;
17
+ margin: 0 auto;
18
+ padding: 0 20px;
19
+ }
20
+ .guide-tabs-nav {
21
+ display: inline-flex;
22
+ background: #ffffff;
23
+ border-radius: 40px;
24
+ padding: 0.4rem;
25
+ box-shadow: 0 8px 24px rgba(0,0,0,0.08);
26
+ position: relative;
27
+ overflow: hidden;
28
+ margin: 0 0 1.25rem 0;
29
+ gap: 0.25rem;
30
+ }
31
+ .guide-tab-btn {
32
+ background: transparent;
33
+ border: 0;
34
+ padding: 0.75rem 1.25rem;
35
+ border-radius: 999px;
36
+ font-weight: 600;
37
+ color: #4a5568;
38
+ cursor: pointer;
39
+ position: relative;
40
+ z-index: 2;
41
+ transition: color 0.25s ease;
42
+ white-space: nowrap;
43
+ }
44
+ .guide-tab-btn.active { color: #ffffff; }
45
+ .guide-tab-slider {
46
+ position: absolute;
47
+ top: 0.4rem;
48
+ left: 0.4rem;
49
+ height: calc(100% - 0.8rem);
50
+ border-radius: 999px;
51
+ background: linear-gradient(135deg, #7c2c74 0%, #5b2a86 100%);
52
+ box-shadow: 0 8px 24px rgba(92, 42, 134, 0.35);
53
+ transition: all 320ms cubic-bezier(0.4, 0, 0.2, 1);
54
+ z-index: 1;
55
+ width: 0;
56
+ }
57
+
58
+ .guide-tabs-panels { position: relative; }
59
+ .guide-tab-panel { display: none; }
60
+ .guide-tab-panel.active { display: block; }
61
+
62
+ .guide-card {
63
+ display: grid;
64
+ grid-template-columns: 1.25fr 1fr;
65
+ gap: 0;
66
+ border-radius: 16px;
67
+ overflow: hidden;
68
+ background: #ffffff;
69
+ box-shadow: 0 16px 40px rgba(0,0,0,0.12);
70
+ }
71
+ .guide-info {
72
+ background: #6f2b75; /* rich purple similar to screenshot */
73
+ color: #ffffff;
74
+ padding: 2rem 2rem 2rem 2rem;
75
+ display: flex;
76
+ flex-direction: column;
77
+ justify-content: center;
78
+ min-height: 260px;
79
+ }
80
+ .guide-title {
81
+ font-size: 1.8rem;
82
+ font-weight: 800;
83
+ line-height: 1.2;
84
+ margin: 0 0 0.75rem 0;
85
+ }
86
+ .guide-text { opacity: 0.95; margin: 0 0 1.25rem 0; }
87
+ .guide-cta {
88
+ display: inline-flex;
89
+ align-items: center;
90
+ gap: 0.5rem;
91
+ color: #ffffff;
92
+ font-weight: 600;
93
+ text-decoration: none;
94
+ border-bottom: 2px solid rgba(255,255,255,0.45);
95
+ width: fit-content;
96
+ padding-bottom: 2px;
97
+ }
98
+ .guide-cta i { transition: transform 0.2s ease; }
99
+ .guide-cta:hover i { transform: translateX(3px); }
100
+
101
+ .guide-image { position: relative; background: #f7f7f9; }
102
+ .guide-image img {
103
+ width: 100%; height: 100%; object-fit: cover;
104
+ display: block;
105
+ }
106
+
107
+ @media (max-width: 900px) {
108
+ .guide-card { grid-template-columns: 1fr; }
109
+ .guide-image { order: -1; }
110
+ }
111
+
112
+ /* Navigation Login Button */
113
+ .nav-login {
114
+ margin-left: auto;
115
+ }
116
+
117
+ .login-btn {
118
+ background: #3b82f6;
119
+ color: white;
120
+ padding: 0.75rem 1.5rem;
121
+ border-radius: 8px;
122
+ text-decoration: none;
123
+ font-weight: 600;
124
+ transition: background-color 0.2s ease;
125
+ display: inline-block;
126
+ }
127
+
128
+ .login-btn:hover {
129
+ background: #2563eb;
130
+ }
131
+
132
+ /* Responsive navigation adjustments */
133
+ @media (max-width: 768px) {
134
+ .nav-login {
135
+ margin-left: 0;
136
+ margin-top: 1rem;
137
+ }
138
+ }
139
+ </style>
140
+ </head>
141
+ <body>
142
+ <header class="header">
143
+ <nav class="nav">
144
+ <div class="nav-container">
145
+ <div class="nav-logo">
146
+ <i class="fas fa-book-open"></i>
147
+ <span>booknap</span>
148
+ </div>
149
+ <ul class="nav-menu">
150
+ <li><a href="books.html" class="nav-link active">Book summaries</a></li>
151
+ <li><a href="#" class="nav-link">Pricing</a></li>
152
+ <li><a href="#" class="nav-link">Infographics</a></li>
153
+ <li><a href="#" class="nav-link">Blog</a></li>
154
+ <li><a href="#" class="nav-link">For Business</a></li>
155
+ </ul>
156
+ <div class="nav-login">
157
+ <a href="#" class="login-btn">Login</a>
158
+ </div>
159
+ <div class="nav-toggle">
160
+ <span></span>
161
+ <span></span>
162
+ <span></span>
163
+ </div>
164
+ </div>
165
+ </nav>
166
+ </header>
167
+
168
+ <main>
169
+ <section class="books-header">
170
+ <div class="container">
171
+ <h1>All Books</h1>
172
+ <p>Browse our complete collection of book summaries</p>
173
+ <div class="filters">
174
+ <label class="sr-only" for="filter-category">Filter by category</label>
175
+ <select id="filter-category" class="filter-select" aria-label="Filter by category">
176
+ <option value="">All Categories</option>
177
+ <option value="self-help">Self-Help</option>
178
+ <option value="psychology">Psychology</option>
179
+ <option value="business">Business</option>
180
+ <option value="finance">Finance</option>
181
+ </select>
182
+ <label class="sr-only" for="filter-sort">Sort books</label>
183
+ <select id="filter-sort" class="filter-select" aria-label="Sort books">
184
+ <option value="">Sort By</option>
185
+ <option value="title">Title</option>
186
+ <option value="author">Author</option>
187
+ <option value="category">Category</option>
188
+ </select>
189
+ </div>
190
+ </div>
191
+ </section>
192
+
193
+ <!-- Right-swiping tabs (matching screenshot layout) -->
194
+ <section class="guide-tabs-section">
195
+ <div class="guide-tabs-container">
196
+ <div class="guide-tabs-nav" role="tablist" aria-label="Author guides">
197
+ <div class="guide-tab-slider" aria-hidden="true"></div>
198
+ <button class="guide-tab-btn active" role="tab" aria-selected="true" aria-controls="guide-shakespeare" id="tab-shakespeare">Shakespeare</button>
199
+ <button class="guide-tab-btn" role="tab" aria-selected="false" aria-controls="guide-austen" id="tab-austen">Austen</button>
200
+ <button class="guide-tab-btn" role="tab" aria-selected="false" aria-controls="guide-dickens" id="tab-dickens">Dickens</button>
201
+ </div>
202
+
203
+ <div class="guide-tabs-panels">
204
+ <!-- Shakespeare -->
205
+ <div class="guide-tab-panel active" id="guide-shakespeare" role="tabpanel" aria-labelledby="tab-shakespeare">
206
+ <div class="guide-card">
207
+ <div class="guide-info">
208
+ <h2 class="guide-title">William Shakespeare’s Life & Times</h2>
209
+ <p class="guide-text">Our comprehensive guide includes a detailed biography, social and historical context, quotes, and more to help you write your essay on Shakespeare or understand his plays and poems.</p>
210
+ <a class="guide-cta" href="#"><span>Read the guide</span> <i class="fas fa-arrow-right"></i></a>
211
+ </div>
212
+ <div class="guide-image">
213
+ <img alt="William Shakespeare" src="https://upload.wikimedia.org/wikipedia/commons/thumb/a/a2/Shakespeare.jpg/640px-Shakespeare.jpg" />
214
+ </div>
215
+ </div>
216
+ </div>
217
+
218
+ <!-- Jane Austen -->
219
+ <div class="guide-tab-panel" id="guide-austen" role="tabpanel" aria-labelledby="tab-austen">
220
+ <div class="guide-card">
221
+ <div class="guide-info">
222
+ <h2 class="guide-title">Jane Austen’s World</h2>
223
+ <p class="guide-text">Explore the Regency era, societal norms, and the life behind the beloved novels. Perfect for essays and deeper reading.</p>
224
+ <a class="guide-cta" href="#"><span>Read the guide</span> <i class="fas fa-arrow-right"></i></a>
225
+ </div>
226
+ <div class="guide-image">
227
+ <img alt="Jane Austen" src="https://upload.wikimedia.org/wikipedia/commons/thumb/c/cd/CassandraAusten-JaneAusten%28c.1810%29_hires.jpg/640px-CassandraAusten-JaneAusten%28c.1810%29_hires.jpg" />
228
+ </div>
229
+ </div>
230
+ </div>
231
+
232
+ <!-- Charles Dickens -->
233
+ <div class="guide-tab-panel" id="guide-dickens" role="tabpanel" aria-labelledby="tab-dickens">
234
+ <div class="guide-card">
235
+ <div class="guide-info">
236
+ <h2 class="guide-title">Charles Dickens’ London</h2>
237
+ <p class="guide-text">Walk the foggy streets of Victorian London and uncover the life and times that shaped Dickens’ unforgettable characters.</p>
238
+ <a class="guide-cta" href="#"><span>Read the guide</span> <i class="fas fa-arrow-right"></i></a>
239
+ </div>
240
+ <div class="guide-image">
241
+ <img alt="Charles Dickens" src="https://upload.wikimedia.org/wikipedia/commons/thumb/0/0b/Dickens_Gurney_head.jpg/640px-Dickens_Gurney_head.jpg" />
242
+ </div>
243
+ </div>
244
+ </div>
245
+ </div>
246
+ </div>
247
+ </section>
248
+
249
+ <section class="books-grid-section">
250
+ <div class="container">
251
+ <div class="books-grid">
252
+ <div class="book-card" onclick="window.location.href='book.html?id=1'">
253
+ <div class="book-cover">
254
+ <img src="assets/covers/atomic-habits.jpg" alt="Atomic Habits" />
255
+ <div class="book-overlay"><i class="fas fa-play"></i></div>
256
+ </div>
257
+ <div class="book-info">
258
+ <h3>Atomic Habits</h3>
259
+ <p class="book-author">James Clear</p>
260
+ <p class="book-category">Self-Help</p>
261
+ <p class="book-description">Learn how tiny changes create remarkable results in your life.</p>
262
+ </div>
263
+ </div>
264
+
265
+ <div class="book-card" onclick="window.location.href='book.html?id=2'">
266
+ <div class="book-cover">
267
+ <img src="assets/covers/thinking-fast-slow.jpg" alt="Thinking, Fast and Slow" />
268
+ <div class="book-overlay"><i class="fas fa-play"></i></div>
269
+ </div>
270
+ <div class="book-info">
271
+ <h3>Thinking, Fast and Slow</h3>
272
+ <p class="book-author">Daniel Kahneman</p>
273
+ <p class="book-category">Psychology</p>
274
+ <p class="book-description">Understanding the two systems that drive the way we think.</p>
275
+ </div>
276
+ </div>
277
+
278
+ <div class="book-card" onclick="window.location.href='book.html?id=3'">
279
+ <div class="book-cover">
280
+ <img src="assets/covers/7-habits.jpg" alt="The 7 Habits of Highly Effective People" />
281
+ <div class="book-overlay"><i class="fas fa-play"></i></div>
282
+ </div>
283
+ <div class="book-info">
284
+ <h3>The 7 Habits of Highly Effective People</h3>
285
+ <p class="book-author">Stephen R. Covey</p>
286
+ <p class="book-category">Self-Help</p>
287
+ <p class="book-description">Powerful lessons in personal change and effectiveness.</p>
288
+ </div>
289
+ </div>
290
+
291
+ <div class="book-card" onclick="window.location.href='book.html?id=4'">
292
+ <div class="book-cover">
293
+ <img src="assets/covers/rich-dad-poor-dad.jpg" alt="Rich Dad Poor Dad" />
294
+ <div class="book-overlay"><i class="fas fa-play"></i></div>
295
+ </div>
296
+ <div class="book-info">
297
+ <h3>Rich Dad Poor Dad</h3>
298
+ <p class="book-author">Robert T. Kiyosaki</p>
299
+ <p class="book-category">Finance</p>
300
+ <p class="book-description">What the rich teach their kids about money.</p>
301
+ </div>
302
+ </div>
303
+ </div>
304
+ </div>
305
+ </section>
306
+ </main>
307
+
308
+ <footer class="footer">
309
+ <div class="container">
310
+ <p>&copy; 2024 booknap. All rights reserved.</p>
311
+ </div>
312
+ </footer>
313
+
314
+ <script src="script.js"></script>
315
+ <script>
316
+ // Guide right-swiping tabs behavior
317
+ (function() {
318
+ const nav = document.querySelector('.guide-tabs-nav');
319
+ if (!nav) return;
320
+ const buttons = Array.from(nav.querySelectorAll('.guide-tab-btn'));
321
+ const slider = nav.querySelector('.guide-tab-slider');
322
+ const panels = Array.from(document.querySelectorAll('.guide-tab-panel'));
323
+
324
+ function activate(idx) {
325
+ buttons.forEach((b, i) => {
326
+ const isActive = i === idx;
327
+ b.classList.toggle('active', isActive);
328
+ b.setAttribute('aria-selected', String(isActive));
329
+ panels[i].classList.toggle('active', isActive);
330
+ });
331
+ const activeBtn = buttons[idx];
332
+ if (activeBtn && slider) {
333
+ slider.style.width = activeBtn.offsetWidth + 'px';
334
+ slider.style.left = activeBtn.offsetLeft + 'px'; // swipe right visual
335
+ }
336
+ activeIndex = idx;
337
+ }
338
+
339
+ let activeIndex = buttons.findIndex(b => b.classList.contains('active'));
340
+ if (activeIndex < 0) activeIndex = 0;
341
+ // init slider position after layout
342
+ window.requestAnimationFrame(() => activate(activeIndex));
343
+
344
+ buttons.forEach((btn, i) => btn.addEventListener('click', () => activate(i)));
345
+
346
+ // Touch swipe support on the whole tabs section
347
+ const swipeHost = document.querySelector('.guide-tabs-section');
348
+ let touchStartX = 0;
349
+ let touchEndX = 0;
350
+ const threshold = 40; // px
351
+
352
+ function handleGesture() {
353
+ const dx = touchEndX - touchStartX;
354
+ if (Math.abs(dx) < threshold) return;
355
+ if (dx < 0) {
356
+ // swipe left -> next (slider moves right)
357
+ activate(Math.min(activeIndex + 1, buttons.length - 1));
358
+ } else {
359
+ // swipe right -> prev
360
+ activate(Math.max(activeIndex - 1, 0));
361
+ }
362
+ }
363
+
364
+ if (swipeHost) {
365
+ swipeHost.addEventListener('touchstart', e => { touchStartX = e.changedTouches[0].clientX; }, { passive: true });
366
+ swipeHost.addEventListener('touchend', e => { touchEndX = e.changedTouches[0].clientX; handleGesture(); }, { passive: true });
367
+ }
368
+
369
+ // Reposition slider on resize
370
+ window.addEventListener('resize', () => activate(activeIndex));
371
+ })();
372
+ </script>
373
+ </body>
374
+ </html>