File size: 8,034 Bytes
743953f
 
 
 
 
9cae297
bc2665f
 
 
9cae297
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
5c7a51a
9cae297
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
743953f
 
9cae297
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
743953f
9cae297
 
 
 
743953f
9cae297
 
 
 
743953f
9cae297
 
 
 
743953f
 
 
9cae297
 
 
 
 
 
743953f
 
9cae297
 
 
 
 
 
 
 
 
 
743953f
 
 
 
9cae297
 
 
 
743953f
 
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
<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>交互式学习 - 书籍目录</title>
    <link rel="stylesheet" href="static/css/style.css">
    <link rel="stylesheet" href="static/css/inter.css">
    <link rel="stylesheet" href="static/css/all.min.css">
    <style>
        /* 书籍目录页面专用样式 */
        .catalog-container {
            min-height: 100vh;
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            padding: 2rem 1rem;
        }

        .catalog-header {
            max-width: 1200px;
            margin: 0 auto 2rem;
            text-align: center;
            color: white;
        }

        .catalog-header h1 {
            font-size: 2.5rem;
            font-weight: 700;
            margin-bottom: 0.5rem;
            text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
        }

        .catalog-header p {
            font-size: 1.1rem;
            opacity: 0.9;
        }

        .statistics {
            max-width: 1200px;
            margin: 0 auto 2rem;
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
            gap: 1rem;
        }

        .stat-card {
            background: rgba(255, 255, 255, 0.95);
            padding: 1.5rem;
            border-radius: 12px;
            text-align: center;
            box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
            transition: transform 0.2s;
        }

        .stat-card:hover {
            transform: translateY(-4px);
        }

        .stat-card .icon {
            font-size: 2rem;
            color: #667eea;
            margin-bottom: 0.5rem;
        }

        .stat-card .number {
            font-size: 2rem;
            font-weight: 700;
            color: #333;
            margin-bottom: 0.25rem;
        }

        .stat-card .label {
            font-size: 0.9rem;
            color: #666;
        }

        .search-bar {
            max-width: 800px;
            margin: 0 auto 2rem;
            position: relative;
        }

        .search-bar input {
            width: 100%;
            padding: 1rem 3rem 1rem 1.5rem;
            font-size: 1.1rem;
            border: none;
            border-radius: 50px;
            box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
            outline: none;
        }

        .search-bar button {
            position: absolute;
            right: 0.5rem;
            top: 50%;
            transform: translateY(-50%);
            background: #667eea;
            color: white;
            border: none;
            padding: 0.75rem 1.5rem;
            border-radius: 50px;
            cursor: pointer;
            transition: background 0.3s;
        }

        .search-bar button:hover {
            background: #5568d3;
        }

        .books-container {
            max-width: 1200px;
            margin: 0 auto;
            background: rgba(255, 255, 255, 0.95);
            border-radius: 12px;
            padding: 2rem;
            box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
        }

        .books-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
            gap: 1.5rem;
        }

        .book-card {
            background: white;
            border-radius: 12px;
            overflow: hidden;
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
            transition: all 0.3s;
            cursor: pointer;
            border: 2px solid transparent;
        }

        .book-card:hover {
            transform: translateY(-8px);
            box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
            border-color: #667eea;
        }

        .book-cover {
            width: 100%;
            height: 200px;
            object-fit: contain;
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        }

        .book-info {
            padding: 1.25rem;
        }

        .book-name {
            font-size: 1.2rem;
            font-weight: 600;
            color: #333;
            margin-bottom: 0.5rem;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        .book-meta {
            display: flex;
            justify-content: space-between;
            color: #666;
            font-size: 0.9rem;
            margin-bottom: 0.75rem;
        }

        .book-classify {
            color: #667eea;
            font-size: 0.85rem;
            font-weight: 500;
        }

        .loading {
            text-align: center;
            padding: 3rem;
            color: white;
            font-size: 1.2rem;
        }

        .loading i {
            font-size: 2rem;
            margin-bottom: 1rem;
        }

        .empty-state {
            text-align: center;
            padding: 3rem;
            color: #666;
        }

        .empty-state i {
            font-size: 4rem;
            color: #ccc;
            margin-bottom: 1rem;
        }

        .toast {
            position: fixed;
            bottom: 2rem;
            right: 2rem;
            background: #333;
            color: white;
            padding: 1rem 1.5rem;
            border-radius: 8px;
            box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
            opacity: 0;
            transition: opacity 0.3s;
            z-index: 1000;
        }

        .toast.show {
            opacity: 1;
        }

        .toast.error {
            background: #e74c3c;
        }

        .toast.success {
            background: #27ae60;
        }

        .toast.info {
            background: #3498db;
        }
    </style>
</head>
<body>
    <div class="catalog-container">
        <!-- 头部 -->
        <div class="catalog-header">
            <h1>
                <i class="fas fa-book-reader"></i>
                交互式学习平台
            </h1>
            <p>选择一本教材开始学习</p>
        </div>

        <!-- 统计信息 -->
        <div class="statistics" id="statistics" style="display: none;">
            <div class="stat-card">
                <div class="icon"><i class="fas fa-book"></i></div>
                <div class="number" id="totalBooks">0</div>
                <div class="label">教材总数</div>
            </div>
            <div class="stat-card">
                <div class="icon"><i class="fas fa-file-alt"></i></div>
                <div class="number" id="totalPages">0</div>
                <div class="label">页面总数</div>
            </div>
            <div class="stat-card">
                <div class="icon"><i class="fas fa-puzzle-piece"></i></div>
                <div class="number" id="totalPieces">0</div>
                <div class="label">内容片段</div>
            </div>
            <div class="stat-card">
                <div class="icon"><i class="fas fa-list"></i></div>
                <div class="number" id="totalCatalogs">0</div>
                <div class="label">目录项</div>
            </div>
        </div>

        <!-- 搜索栏 -->
        <div class="search-bar">
            <input type="text" id="searchInput" placeholder="搜索教材名称..." />
            <button id="searchBtn">
                <i class="fas fa-search"></i>
            </button>
        </div>

        <!-- 书籍容器 -->
        <div class="books-container">
            <div id="loading" class="loading">
                <div><i class="fas fa-spinner fa-spin"></i></div>
                <div>加载中...</div>
            </div>
            <div id="booksGrid" class="books-grid" style="display: none;"></div>
            <div id="emptyState" class="empty-state" style="display: none;">
                <div><i class="fas fa-inbox"></i></div>
                <div>暂无教材数据</div>
            </div>
        </div>
    </div>

    <!-- 消息提示 -->
    <div class="toast" id="toast"></div>

    <script src="static/js/catalog.js"></script>
</body>
</html>