Translsis commited on
Commit
0898674
·
verified ·
1 Parent(s): 39ab88f

Update index.html

Browse files
Files changed (1) hide show
  1. index.html +85 -76
index.html CHANGED
@@ -14,77 +14,80 @@
14
 
15
  body {
16
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
17
- background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
18
  min-height: 100vh;
19
- padding: 20px;
 
20
  }
21
 
22
  .container {
23
- max-width: 1400px;
24
- margin: 0 auto;
 
25
  background: white;
26
- border-radius: 20px;
27
- box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
28
- overflow: hidden;
29
  }
30
 
31
  .header {
32
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
33
- padding: 30px;
34
  color: white;
35
- text-align: center;
 
 
 
36
  }
37
 
38
  .header h1 {
39
- font-size: 2.5em;
40
- margin-bottom: 10px;
41
- text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
42
  }
43
 
44
  .upload-section {
45
- padding: 40px;
46
  background: #f8f9fa;
47
- border-bottom: 2px solid #e9ecef;
48
- text-align: center;
 
 
 
49
  }
50
 
51
  .upload-area {
52
- border: 3px dashed #667eea;
53
- border-radius: 15px;
54
- padding: 60px 20px;
55
  background: white;
56
- transition: all 0.3s ease;
57
  cursor: pointer;
 
 
 
 
 
58
  }
59
 
60
  .upload-area:hover {
61
  border-color: #764ba2;
62
  background: #f8f9ff;
63
- transform: translateY(-5px);
64
- box-shadow: 0 10px 30px rgba(102, 126, 234, 0.2);
65
  }
66
 
67
  .upload-area.dragover {
68
  border-color: #764ba2;
69
  background: #f0f0ff;
70
- transform: scale(1.02);
71
  }
72
 
73
  .upload-icon {
74
- font-size: 4em;
75
- margin-bottom: 20px;
76
  }
77
 
78
  .upload-text {
79
- font-size: 1.3em;
80
  color: #495057;
81
- margin-bottom: 10px;
82
  font-weight: 600;
83
  }
84
 
85
  .upload-hint {
86
  color: #6c757d;
87
- font-size: 1em;
88
  }
89
 
90
  #fileInput {
@@ -92,28 +95,27 @@
92
  }
93
 
94
  .file-count {
95
- margin-top: 20px;
96
- padding: 15px 30px;
97
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
98
  color: white;
99
- border-radius: 30px;
100
- display: inline-block;
101
  font-weight: bold;
102
- font-size: 1.1em;
103
- box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
104
  }
105
 
106
  .tabs {
107
  display: flex;
108
  background: #f8f9fa;
109
- padding: 0 20px;
110
  overflow-x: auto;
111
- border-bottom: 3px solid #e9ecef;
112
- gap: 5px;
 
113
  }
114
 
115
  .tabs::-webkit-scrollbar {
116
- height: 8px;
117
  }
118
 
119
  .tabs::-webkit-scrollbar-track {
@@ -122,24 +124,25 @@
122
 
123
  .tabs::-webkit-scrollbar-thumb {
124
  background: #667eea;
125
- border-radius: 4px;
126
  }
127
 
128
  .tab {
129
- padding: 15px 25px;
130
  cursor: pointer;
131
  border: none;
132
  background: transparent;
133
  color: #6c757d;
134
- font-weight: 600;
135
- transition: all 0.3s ease;
 
136
  white-space: nowrap;
137
  position: relative;
138
- border-radius: 10px 10px 0 0;
139
- margin-top: 5px;
140
  display: flex;
141
  align-items: center;
142
- gap: 8px;
143
  }
144
 
145
  .tab:hover {
@@ -150,23 +153,23 @@
150
  .tab.active {
151
  background: white;
152
  color: #667eea;
153
- box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
154
  }
155
 
156
  .tab.active::after {
157
  content: '';
158
  position: absolute;
159
- bottom: -3px;
160
  left: 0;
161
  right: 0;
162
- height: 3px;
163
  background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
164
  }
165
 
166
  .close-tab {
167
- margin-left: 8px;
168
  color: #dc3545;
169
  font-weight: bold;
 
170
  opacity: 0.6;
171
  transition: opacity 0.2s;
172
  }
@@ -176,8 +179,10 @@
176
  }
177
 
178
  .content {
179
- padding: 30px;
180
- min-height: 500px;
 
 
181
  }
182
 
183
  .tab-content {
@@ -204,52 +209,55 @@
204
  display: flex;
205
  justify-content: center;
206
  align-items: center;
207
- gap: 15px;
208
- margin-bottom: 20px;
209
- padding: 15px;
210
  background: #f8f9fa;
211
- border-radius: 10px;
 
212
  }
213
 
214
  .pdf-controls button {
215
- padding: 10px 20px;
216
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
217
  color: white;
218
  border: none;
219
- border-radius: 8px;
220
  cursor: pointer;
221
- font-weight: bold;
222
- transition: all 0.3s ease;
 
223
  }
224
 
225
  .pdf-controls button:hover:not(:disabled) {
226
- transform: translateY(-2px);
227
- box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
228
  }
229
 
230
  .pdf-controls button:disabled {
231
- opacity: 0.5;
232
  cursor: not-allowed;
233
  }
234
 
235
  .pdf-controls span {
236
- font-weight: bold;
 
237
  color: #495057;
238
  }
239
 
240
  .pdf-viewer-container {
241
- border: 2px solid #e9ecef;
242
- border-radius: 10px;
243
- background: #f8f9fa;
244
- padding: 20px;
245
  overflow: auto;
246
- max-height: 700px;
 
 
 
247
  }
248
 
249
  .pdf-canvas {
250
  display: block;
251
- margin: 0 auto;
252
- box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
 
253
  }
254
 
255
  .empty-state {
@@ -286,18 +294,19 @@
286
  <body>
287
  <div class="container">
288
  <div class="header">
289
- <h1>📄 PDF Tab Viewer</h1>
290
- <p>Chọn hoặc kéo thả nhiều file PDF để xem (hỗ trợ mọi trình duyệt)</p>
291
  </div>
292
 
293
  <div class="upload-section">
294
  <div class="upload-area" id="uploadArea">
295
  <div class="upload-icon">📁</div>
296
- <div class="upload-text">Nhấn để chọn file PDF</div>
297
- <div class="upload-hint">hoặc kéo thả file vào đây (có thể chọn nhiều file)</div>
 
 
298
  </div>
299
  <input type="file" id="fileInput" accept=".pdf" multiple>
300
- <div class="file-count" id="fileCount" style="display: none;">0 file đã chọn</div>
301
  </div>
302
 
303
  <div class="tabs" id="tabs"></div>
@@ -361,7 +370,7 @@
361
  pdfFiles = [...pdfFiles, ...newFiles];
362
 
363
  fileCountEl.style.display = 'inline-block';
364
- fileCountEl.textContent = `${pdfFiles.length} file đã chọn`;
365
 
366
  newFiles.forEach((file, idx) => {
367
  const fileIndex = startIndex + idx;
@@ -516,7 +525,7 @@
516
  </div>
517
  `;
518
  } else {
519
- fileCountEl.textContent = `${pdfFiles.length} file đã chọn`;
520
  if (activeIndex >= pdfFiles.length) {
521
  switchTab(Math.max(0, pdfFiles.length - 1));
522
  }
 
14
 
15
  body {
16
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
17
+ background: #2c3e50;
18
  min-height: 100vh;
19
+ padding: 0;
20
+ margin: 0;
21
  }
22
 
23
  .container {
24
+ height: 100vh;
25
+ display: flex;
26
+ flex-direction: column;
27
  background: white;
 
 
 
28
  }
29
 
30
  .header {
31
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
32
+ padding: 12px 20px;
33
  color: white;
34
+ display: flex;
35
+ justify-content: space-between;
36
+ align-items: center;
37
+ flex-shrink: 0;
38
  }
39
 
40
  .header h1 {
41
+ font-size: 1.3em;
42
+ margin: 0;
 
43
  }
44
 
45
  .upload-section {
46
+ padding: 15px 20px;
47
  background: #f8f9fa;
48
+ border-bottom: 1px solid #dee2e6;
49
+ display: flex;
50
+ align-items: center;
51
+ gap: 15px;
52
+ flex-shrink: 0;
53
  }
54
 
55
  .upload-area {
56
+ border: 2px dashed #667eea;
57
+ border-radius: 8px;
58
+ padding: 15px 25px;
59
  background: white;
 
60
  cursor: pointer;
61
+ transition: all 0.2s ease;
62
+ flex: 1;
63
+ display: flex;
64
+ align-items: center;
65
+ gap: 10px;
66
  }
67
 
68
  .upload-area:hover {
69
  border-color: #764ba2;
70
  background: #f8f9ff;
 
 
71
  }
72
 
73
  .upload-area.dragover {
74
  border-color: #764ba2;
75
  background: #f0f0ff;
 
76
  }
77
 
78
  .upload-icon {
79
+ font-size: 1.5em;
 
80
  }
81
 
82
  .upload-text {
83
+ font-size: 0.95em;
84
  color: #495057;
 
85
  font-weight: 600;
86
  }
87
 
88
  .upload-hint {
89
  color: #6c757d;
90
+ font-size: 0.85em;
91
  }
92
 
93
  #fileInput {
 
95
  }
96
 
97
  .file-count {
98
+ padding: 10px 20px;
 
99
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
100
  color: white;
101
+ border-radius: 20px;
 
102
  font-weight: bold;
103
+ font-size: 0.9em;
104
+ white-space: nowrap;
105
  }
106
 
107
  .tabs {
108
  display: flex;
109
  background: #f8f9fa;
110
+ padding: 0 10px;
111
  overflow-x: auto;
112
+ border-bottom: 2px solid #dee2e6;
113
+ gap: 3px;
114
+ flex-shrink: 0;
115
  }
116
 
117
  .tabs::-webkit-scrollbar {
118
+ height: 6px;
119
  }
120
 
121
  .tabs::-webkit-scrollbar-track {
 
124
 
125
  .tabs::-webkit-scrollbar-thumb {
126
  background: #667eea;
127
+ border-radius: 3px;
128
  }
129
 
130
  .tab {
131
+ padding: 10px 15px;
132
  cursor: pointer;
133
  border: none;
134
  background: transparent;
135
  color: #6c757d;
136
+ font-weight: 500;
137
+ font-size: 0.85em;
138
+ transition: all 0.2s ease;
139
  white-space: nowrap;
140
  position: relative;
141
+ border-radius: 8px 8px 0 0;
142
+ margin-top: 3px;
143
  display: flex;
144
  align-items: center;
145
+ gap: 6px;
146
  }
147
 
148
  .tab:hover {
 
153
  .tab.active {
154
  background: white;
155
  color: #667eea;
 
156
  }
157
 
158
  .tab.active::after {
159
  content: '';
160
  position: absolute;
161
+ bottom: -2px;
162
  left: 0;
163
  right: 0;
164
+ height: 2px;
165
  background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
166
  }
167
 
168
  .close-tab {
169
+ margin-left: 5px;
170
  color: #dc3545;
171
  font-weight: bold;
172
+ font-size: 1.1em;
173
  opacity: 0.6;
174
  transition: opacity 0.2s;
175
  }
 
179
  }
180
 
181
  .content {
182
+ flex: 1;
183
+ overflow: hidden;
184
+ display: flex;
185
+ flex-direction: column;
186
  }
187
 
188
  .tab-content {
 
209
  display: flex;
210
  justify-content: center;
211
  align-items: center;
212
+ gap: 12px;
213
+ padding: 10px;
 
214
  background: #f8f9fa;
215
+ border-bottom: 1px solid #dee2e6;
216
+ flex-shrink: 0;
217
  }
218
 
219
  .pdf-controls button {
220
+ padding: 8px 16px;
221
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
222
  color: white;
223
  border: none;
224
+ border-radius: 6px;
225
  cursor: pointer;
226
+ font-weight: 600;
227
+ font-size: 0.85em;
228
+ transition: all 0.2s ease;
229
  }
230
 
231
  .pdf-controls button:hover:not(:disabled) {
232
+ transform: translateY(-1px);
233
+ box-shadow: 0 3px 8px rgba(102, 126, 234, 0.3);
234
  }
235
 
236
  .pdf-controls button:disabled {
237
+ opacity: 0.4;
238
  cursor: not-allowed;
239
  }
240
 
241
  .pdf-controls span {
242
+ font-weight: 600;
243
+ font-size: 0.9em;
244
  color: #495057;
245
  }
246
 
247
  .pdf-viewer-container {
248
+ flex: 1;
 
 
 
249
  overflow: auto;
250
+ background: #525252;
251
+ display: flex;
252
+ align-items: center;
253
+ justify-content: center;
254
  }
255
 
256
  .pdf-canvas {
257
  display: block;
258
+ max-width: 100%;
259
+ height: auto;
260
+ box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
261
  }
262
 
263
  .empty-state {
 
294
  <body>
295
  <div class="container">
296
  <div class="header">
297
+ <h1>📄 PDF Viewer</h1>
298
+ <div class="file-count" id="fileCount" style="display: none;">0 file</div>
299
  </div>
300
 
301
  <div class="upload-section">
302
  <div class="upload-area" id="uploadArea">
303
  <div class="upload-icon">📁</div>
304
+ <div>
305
+ <div class="upload-text">Chọn PDF</div>
306
+ <div class="upload-hint">hoặc kéo thả (nhiều file)</div>
307
+ </div>
308
  </div>
309
  <input type="file" id="fileInput" accept=".pdf" multiple>
 
310
  </div>
311
 
312
  <div class="tabs" id="tabs"></div>
 
370
  pdfFiles = [...pdfFiles, ...newFiles];
371
 
372
  fileCountEl.style.display = 'inline-block';
373
+ fileCountEl.textContent = `${pdfFiles.length} file`;
374
 
375
  newFiles.forEach((file, idx) => {
376
  const fileIndex = startIndex + idx;
 
525
  </div>
526
  `;
527
  } else {
528
+ fileCountEl.textContent = `${pdfFiles.length} file`;
529
  if (activeIndex >= pdfFiles.length) {
530
  switchTab(Math.max(0, pdfFiles.length - 1));
531
  }