-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathbook.html
More file actions
739 lines (673 loc) · 23.7 KB
/
book.html
File metadata and controls
739 lines (673 loc) · 23.7 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
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="description" content="程序员推荐书单 - 精选Python、Java、JavaScript、Go、算法等优质编程图书">
<meta name="keywords" content="编程书籍,技术图书,Python书籍,Java书籍,算法书籍,程序员书单">
<meta name="author" content="Jackson">
<meta name="robots" content="index, follow">
<!-- Open Graph -->
<meta property="og:type" content="website">
<meta property="og:locale" content="zh_CN">
<meta property="og:site_name" content="CodeClub">
<meta property="og:title" content="CodeClub - 图书推荐">
<meta property="og:description" content="精选编程经典书籍,从入门到进阶,帮助你建立系统的知识体系">
<!-- Twitter Card -->
<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:title" content="CodeClub - 图书推荐">
<meta name="twitter:description" content="精选编程经典书籍,从入门到进阶,帮助你建立系统的知识体系">
<title>CodeClub - 图书推荐</title>
<link rel="icon" type="image/x-icon" href="./img/logo.png">
<link rel="canonical" href="https://jacksoncode.github.io/book.html">
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link rel="preconnect" href="https://cdnjs.cloudflare.com">
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap" rel="stylesheet">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.1/css/all.min.css" integrity="sha512-DTOQO9RWCH3ppGqcWaEA1BIZOC6xxalwEsw9c2QQeAIftl+Vegovlnee1c9QX4TctnWMn13TZye+giMm8e2LwA==" crossorigin="anonymous" referrerpolicy="no-referrer" />
<!-- Structured Data -->
<script type="application/ld+json">
{"@context":"https://schema.org","@type":"CollectionPage","name":"CodeClub - 图书推荐"}
</script>
<style>
:root {
--primary-color: #3b82f6;
--primary-hover: #2563eb;
--bg-color: #f8fafc;
--card-bg: #ffffff;
--text-primary: #1e293b;
--text-secondary: #64748b;
--text-muted: #94a3b8;
--border-color: #e2e8f0;
--shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
--shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
--shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
--radius-sm: 8px;
--radius-md: 12px;
--radius-lg: 16px;
--transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
background-color: var(--bg-color);
color: var(--text-primary);
line-height: 1.6;
-webkit-font-smoothing: antialiased;
}
/* Navigation */
.navbar {
background: rgba(255, 255, 255, 0.95);
backdrop-filter: blur(20px);
border-bottom: 1px solid var(--border-color);
position: sticky;
top: 0;
z-index: 1000;
transition: var(--transition);
}
.navbar-container {
max-width: 1400px;
margin: 0 auto;
padding: 0 24px;
display: flex;
align-items: center;
justify-content: space-between;
height: 64px;
}
.navbar-brand {
display: flex;
align-items: center;
gap: 12px;
text-decoration: none;
color: var(--text-primary);
font-weight: 700;
font-size: 1.25rem;
}
.navbar-brand img {
width: 32px;
height: 32px;
border-radius: 8px;
}
.navbar-nav {
display: flex;
align-items: center;
gap: 8px;
list-style: none;
}
.nav-link {
text-decoration: none;
color: var(--text-secondary);
font-weight: 500;
font-size: 0.9rem;
padding: 8px 16px;
border-radius: var(--radius-sm);
transition: var(--transition);
}
.nav-link:hover {
color: var(--primary-color);
background: rgba(59, 130, 246, 0.1);
}
.nav-link.active {
color: var(--primary-color);
background: rgba(59, 130, 246, 0.1);
}
/* Hero Section */
.hero {
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
padding: 80px 24px;
text-align: center;
position: relative;
overflow: hidden;
}
.hero::before {
content: '';
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
opacity: 0.5;
}
.hero-content {
position: relative;
z-index: 1;
max-width: 800px;
margin: 0 auto;
}
.hero h1 {
font-size: 3rem;
font-weight: 700;
color: white;
margin-bottom: 16px;
letter-spacing: -0.02em;
}
.hero p {
font-size: 1.25rem;
color: rgba(255, 255, 255, 0.9);
font-weight: 400;
}
/* Filter Section */
.filter-section {
background: white;
border-bottom: 1px solid var(--border-color);
padding: 24px;
position: sticky;
top: 64px;
z-index: 100;
box-shadow: var(--shadow-sm);
}
.filter-container {
max-width: 1400px;
margin: 0 auto;
display: flex;
flex-direction: column;
gap: 16px;
}
.filter-title {
font-size: 0.875rem;
font-weight: 600;
color: var(--text-secondary);
text-transform: uppercase;
letter-spacing: 0.5px;
}
.filter-tags {
display: flex;
flex-wrap: wrap;
gap: 12px;
}
.filter-tag {
padding: 8px 16px;
border: 2px solid var(--border-color);
background: white;
border-radius: 20px;
cursor: pointer;
font-size: 0.875rem;
font-weight: 500;
color: var(--text-secondary);
transition: var(--transition);
display: flex;
align-items: center;
gap: 6px;
}
.filter-tag:hover {
border-color: var(--primary-color);
color: var(--primary-color);
transform: translateY(-2px);
}
.filter-tag.active {
background: var(--primary-color);
border-color: var(--primary-color);
color: white;
}
.filter-tag i {
font-size: 0.75rem;
}
/* Books Grid */
.books-section {
max-width: 1400px;
margin: 0 auto;
padding: 48px 24px;
}
.books-grid {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
gap: 32px;
}
.book-card {
background: var(--card-bg);
border-radius: var(--radius-lg);
overflow: hidden;
box-shadow: var(--shadow-sm);
border: 1px solid var(--border-color);
transition: var(--transition);
cursor: pointer;
}
.book-card:hover {
box-shadow: var(--shadow-lg);
transform: translateY(-8px);
}
.book-cover {
position: relative;
padding-top: 140%;
background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
overflow: hidden;
}
.book-cover img {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
object-fit: cover;
transition: var(--transition);
}
.book-card:hover .book-cover img {
transform: scale(1.05);
}
.book-category-badge {
position: absolute;
top: 12px;
left: 12px;
padding: 4px 10px;
background: rgba(0, 0, 0, 0.7);
backdrop-filter: blur(4px);
color: white;
font-size: 0.75rem;
font-weight: 600;
border-radius: 12px;
text-transform: uppercase;
letter-spacing: 0.5px;
}
.book-info {
padding: 20px;
}
.book-title {
font-size: 1rem;
font-weight: 600;
color: var(--text-primary);
margin-bottom: 8px;
line-height: 1.4;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
overflow: hidden;
}
.book-meta {
display: flex;
align-items: center;
gap: 8px;
font-size: 0.8125rem;
color: var(--text-muted);
}
.book-rating {
display: flex;
align-items: center;
gap: 4px;
color: #f59e0b;
}
/* Footer */
.footer {
background: white;
border-top: 1px solid var(--border-color);
padding: 48px 24px 24px;
margin-top: 64px;
}
.footer-content {
max-width: 1400px;
margin: 0 auto;
text-align: center;
}
.social-links {
display: flex;
justify-content: center;
gap: 16px;
margin-bottom: 24px;
}
.social-link {
width: 44px;
height: 44px;
border-radius: var(--radius-md);
display: flex;
align-items: center;
justify-content: center;
background: var(--bg-color);
color: var(--text-secondary);
text-decoration: none;
transition: var(--transition);
font-size: 1.125rem;
}
.social-link:hover {
background: var(--primary-color);
color: white;
transform: translateY(-2px);
}
.footer-text {
color: var(--text-muted);
font-size: 0.875rem;
}
.footer-text a {
color: var(--primary-color);
text-decoration: none;
}
/* Empty State */
.empty-state {
text-align: center;
padding: 80px 24px;
color: var(--text-muted);
}
.empty-state i {
font-size: 4rem;
margin-bottom: 16px;
color: var(--border-color);
}
/* Responsive */
@media (max-width: 768px) {
.hero h1 {
font-size: 2rem;
}
.books-grid {
grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
gap: 20px;
}
.navbar-nav {
display: none;
}
}
</style>
<!-- Dark Mode CSS -->
<link rel="stylesheet" href="./css/dark-mode.css">
</head>
<body>
<!-- Navigation -->
<nav class="navbar">
<div class="navbar-container">
<a class="navbar-brand" href="index.html">
<img src="./img/logo.png" alt="CodeClub">
<span>CodeClub</span>
</a>
<ul class="navbar-nav">
<li><a class="nav-link" href="index.html">首页</a></li>
<li><a class="nav-link" href="nav.html">网址导航</a></li>
<li><a class="nav-link" href="./blog/">博客</a></li>
<li><a class="nav-link" href="./wiki/index.html" target="_blank">WiKi</a></li>
<li><a class="nav-link" href="./mkdocs/site/index.html" target="_blank">NewWiKi</a></li>
<li><a class="nav-link active" href="book.html">图书</a></li>
<li><a class="nav-link" href="contact.html">联系我</a></li>
<li><a class="nav-link" href="about.html">关于我</a></li>
</ul>
</div>
</nav>
<!-- Hero Section -->
<section class="hero">
<div class="hero-content">
<h1>程序员书单推荐</h1>
<p>精选 Python、Java、JavaScript、Go、算法等优质编程图书</p>
</div>
</section>
<!-- Filter Section -->
<section class="filter-section">
<div class="filter-container">
<div class="filter-title">图书分类</div>
<div class="filter-tags">
<button class="filter-tag active" data-category="all">
<i class="fas fa-th-large"></i> 全部
</button>
<button class="filter-tag" data-category="python">
<i class="fab fa-python"></i> Python
</button>
<button class="filter-tag" data-category="java">
<i class="fab fa-java"></i> Java
</button>
<button class="filter-tag" data-category="javascript">
<i class="fab fa-js"></i> JavaScript
</button>
<button class="filter-tag" data-category="html">
<i class="fab fa-html5"></i> HTML/CSS
</button>
<button class="filter-tag" data-category="go">
<i class="fas fa-code"></i> Go
</button>
<button class="filter-tag" data-category="algorithm">
<i class="fas fa-calculator"></i> 算法
</button>
<button class="filter-tag" data-category="thinking">
<i class="fas fa-brain"></i> 编程思想
</button>
<button class="filter-tag" data-category="reading">
<i class="fas fa-book-reader"></i> 其他
</button>
</div>
</div>
</section>
<!-- Books Grid -->
<section class="books-section">
<div class="books-grid" id="booksGrid">
<!-- Books will be populated by JavaScript -->
</div>
</section>
<!-- Footer -->
<footer class="footer">
<div class="footer-content">
<div class="social-links">
<a href="#" class="social-link" title="微信">
<i class="fab fa-weixin"></i>
</a>
<a href="#" class="social-link" title="微博">
<i class="fab fa-weibo"></i>
</a>
<a href="https://github.com/jacksoncode" target="_blank" class="social-link" title="GitHub">
<i class="fab fa-github"></i>
</a>
</div>
<p class="footer-text">
Copyright © Jackson 2026. Free Hosted at
<a href="https://github.com/jacksoncode/jacksoncode.github.io" target="_blank">GitHub</a>
</p>
</div>
</footer>
<script>
// Book data
const booksData = [
{
id: 1,
title: 'Python编程:从入门到实践',
category: 'python',
categoryLabel: 'Python',
image: 'images/book/python-biancheng.png',
rating: 4.9
},
{
id: 2,
title: 'Python编程快速上手——让繁琐的工作自动化',
category: 'python',
categoryLabel: 'Python',
image: 'images/book/python-bianchengkuaisushangshou.png',
rating: 4.8
},
{
id: 3,
title: 'Python核心编程,第三版',
category: 'python',
categoryLabel: 'Python',
image: 'images/book/python-core-3rd.png',
rating: 4.7
},
{
id: 4,
title: '流畅的Python',
category: 'python',
categoryLabel: 'Python',
image: 'images/book/liuchangde-python.png',
rating: 4.9
},
{
id: 5,
title: 'HTML5权威指南',
category: 'html',
categoryLabel: 'HTML/CSS',
image: 'images/book/html5-quanweizhinan.png',
rating: 4.6
},
{
id: 6,
title: 'Html5与CSS3基础教程,第八版',
category: 'html',
categoryLabel: 'HTML/CSS',
image: 'images/book/HTML5andCSS3-jichu-8th.png',
rating: 4.5
},
{
id: 7,
title: '响应式Web设计——Html5和CSS3实战,第二版',
category: 'html',
categoryLabel: 'HTML/CSS',
image: 'images/book/xiangyingshiweb-2th.png',
rating: 4.7
},
{
id: 8,
title: 'JAVA编程思想,第四版',
category: 'java',
categoryLabel: 'Java',
image: 'images/book/java-bianchengsixiang-4th.png',
rating: 4.9
},
{
id: 9,
title: 'JAVA核心技术,卷1,第九版',
category: 'java',
categoryLabel: 'Java',
image: 'images/book/java-core-1-9th.png',
rating: 4.7
},
{
id: 10,
title: 'JAVA核心技术,卷2,第九版',
category: 'java',
categoryLabel: 'Java',
image: 'images/book/java-core-2-9th.png',
rating: 4.7
},
{
id: 11,
title: 'JavaScript权威指南,第六版',
category: 'javascript',
categoryLabel: 'JavaScript',
image: 'images/book/javascript-quanweizhinan-6th.png',
rating: 4.8
},
{
id: 12,
title: '你不知道的JS,上卷',
category: 'javascript',
categoryLabel: 'JavaScript',
image: 'images/book/nibuzhidaode-js-up.png',
rating: 4.9
},
{
id: 13,
title: '你不知道的JS,中卷',
category: 'javascript',
categoryLabel: 'JavaScript',
image: 'images/book/nibuzhidaode-js-mid.png',
rating: 4.8
},
{
id: 14,
title: 'GO语言编程',
category: 'go',
categoryLabel: 'Go',
image: 'images/book/goyuyan-biancheng.png',
rating: 4.6
},
{
id: 15,
title: '算法,第四版',
category: 'algorithm',
categoryLabel: '算法',
image: 'images/book/suanfa-4th.png',
rating: 4.9
},
{
id: 16,
title: '啊哈,算法',
category: 'algorithm',
categoryLabel: '算法',
image: 'images/book/ahasuanfa.png',
rating: 4.7
},
{
id: 17,
title: '重构,改善既有代码的设计',
category: 'thinking',
categoryLabel: '编程思想',
image: 'images/book/chonggou.png',
rating: 4.8
},
{
id: 18,
title: '特斯拉,电气时代的开创者',
category: 'reading',
categoryLabel: '其他',
image: 'images/book/tesila.png',
rating: 4.5
}
];
// Category colors
const categoryColors = {
python: '#3b82f6',
java: '#ef4444',
javascript: '#f59e0b',
html: '#10b981',
go: '#06b6d4',
algorithm: '#8b5cf6',
thinking: '#ec4899',
reading: '#6b7280'
};
let currentCategory = 'all';
function renderBooks(category = 'all') {
const grid = document.getElementById('booksGrid');
const filteredBooks = category === 'all'
? booksData
: booksData.filter(book => book.category === category);
if (filteredBooks.length === 0) {
grid.innerHTML = `
<div class="empty-state" style="grid-column: 1 / -1;">
<i class="fas fa-search"></i>
<h3>暂无该分类的图书</h3>
<p>请选择其他分类查看</p>
</div>
`;
return;
}
grid.innerHTML = filteredBooks.map(book => `
<div class="book-card" data-category="${book.category}">
<div class="book-cover">
<img src="${book.image}" alt="${book.title}" loading="lazy">
<span class="book-category-badge" style="background: ${categoryColors[book.category] || '#6b7280'}">
${book.categoryLabel}
</span>
</div>
<div class="book-info">
<h3 class="book-title">${book.title}</h3>
<div class="book-meta">
<span class="book-rating">
<i class="fas fa-star"></i>
<span>${book.rating}</span>
</span>
</div>
</div>
</div>
`).join('');
}
function setupFilters() {
const filterTags = document.querySelectorAll('.filter-tag');
filterTags.forEach(tag => {
tag.addEventListener('click', () => {
// Remove active class from all tags
filterTags.forEach(t => t.classList.remove('active'));
// Add active class to clicked tag
tag.classList.add('active');
// Get category and render
const category = tag.dataset.category;
currentCategory = category;
renderBooks(category);
});
});
}
// Initialize
document.addEventListener('DOMContentLoaded', () => {
renderBooks();
setupFilters();
});
</script>
<!-- Mobile Menu Script -->
<script src="./js/mobile-menu.js"></script>
<script src="./js/dark-mode.js"></script>
</body>
</html>