-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstyle.css
More file actions
501 lines (443 loc) · 13.5 KB
/
style.css
File metadata and controls
501 lines (443 loc) · 13.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
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
body, html {
margin: 0;
padding: 0;
height: 100%;
overflow-y: hidden; /* Hide vertical scrollbar on body/html */
overflow-x: hidden; /* Hide horizontal scrollbar on body/html */
font-family: sans-serif;
background-color: #26263a; /* Add dark background to prevent white flash */
color: #fff; /* Default text color back to white */
}
/* Controls Container */
.controls {
position: fixed;
top: 20px;
left: 50%;
transform: translateX(-50%);
z-index: 10;
background-color: rgba(0, 0, 0, 0.1); /* Very subtle dark background */
padding: 4px; /* Add slight padding inside */
border-radius: 20px; /* Keep rounded container */
display: flex;
gap: 4px; /* Add small gap between buttons */
box-shadow: none; /* Remove shadow */
overflow: visible; /* Allow potential hover effects outside bounds */
backdrop-filter: blur(3px); /* Subtle blur */
-webkit-backdrop-filter: blur(3px);
}
/* Time Range Buttons */
.time-range-btn {
padding: 6px 14px; /* Adjust padding */
background-color: transparent; /* Transparent by default */
color: rgba(255, 255, 255, 0.7); /* Semi-transparent white text */
border: none;
border-radius: 16px; /* Rounded corners for individual buttons */
cursor: pointer;
font-size: 0.85em;
font-weight: 500;
transition: background-color 0.2s ease, color 0.2s ease;
text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5); /* Add shadow for readability */
border-right: none; /* Remove separator */
}
/* Remove separator from the last button (already removed border-right) */
/* .time-range-btn:last-child { ... } */
.time-range-btn:hover {
background-color: rgba(255, 255, 255, 0.1); /* Subtle white highlight on hover */
color: rgba(255, 255, 255, 0.9);
}
.time-range-btn.active {
background-color: rgba(255, 255, 255, 0.2); /* Slightly more opaque white for active */
color: #fff; /* Fully white text for active */
font-weight: 600;
}
.gittok-feed {
height: 100vh; /* 占满整个视口高度 */
width: 100vw; /* 占满整个视口宽度 */
overflow-y: scroll; /* 允许垂直滚动 */
scroll-snap-type: y mandatory; /* 强制滚动捕捉到项目 */
-webkit-overflow-scrolling: touch; /* 在移动设备上启用平滑滚动 */
}
.gittok-item {
height: 100vh;
width: 100vw;
scroll-snap-align: start;
position: relative; /* Crucial for absolute positioning of children */
overflow: hidden; /* Prevent content overflow */
display: flex;
justify-content: center; /* Center the image horizontally */
align-items: center; /* Keep vertical centering for the flex container */
box-sizing: border-box;
/* background-color: transparent; /* Ensure item itself has no background */
}
/* 0. Blurred Background Layer */
.blurred-background {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
background-size: cover;
background-position: center center;
filter: blur(25px) brightness(0.7); /* Adjust blur and brightness */
transform: scale(1.1); /* Slightly scale up to avoid edge artifacts */
z-index: 0; /* Behind everything */
}
/* 1. Content Image (Centered) */
.content-image {
position: relative;
width: 60%;
max-width: 800px;
height: auto;
aspect-ratio: 16 / 9;
background-size: contain;
background-repeat: no-repeat;
background-position: center center;
z-index: 1;
cursor: pointer;
transition: transform 0.3s ease;
box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
border-radius: 8px;
margin-top: -5vh; /* Move image slightly up from true center */
}
.content-image:hover {
transform: scale(1.03);
}
/* Remove overlays and content-area */
/* 2. Info Blocks Positioning (Directly within .gittok-item) */
.info-left {
position: absolute;
bottom: 30px; /* Adjust spacing */
left: 30px; /* Adjust spacing */
z-index: 2; /* Above content image */
max-width: 50%;
color: #fff; /* White text */
text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.8); /* Stronger shadow for contrast */
}
.info-right {
position: absolute;
bottom: 30px; /* Adjust spacing */
right: 30px; /* Adjust spacing */
z-index: 2; /* Above content image */
max-width: 40%;
text-align: right;
color: #eee; /* Slightly off-white description */
text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.8); /* Stronger shadow */
}
/* Styling for specific info lines if needed */
.info-author {
/* Example: Slightly smaller font for author */
/* font-size: 0.9em; */
margin: 2px 0; /* Adjust vertical spacing */
}
.info-stats {
margin: 2px 0; /* Adjust vertical spacing */
}
/* Container for Today Stars and buttons */
.today-info-container {
display: flex;
align-items: center; /* Vertically align items */
flex-wrap: wrap; /* Allow wrapping on smaller screens */
margin-top: 5px; /* Space above this line */
gap: 8px; /* Add consistent spacing between all items */
}
.today-stars {
margin: 0; /* Remove default margin */
font-size: 0.95em;
font-weight: bold; /* Make today's stars bold */
color: inherit;
}
/* 3. Text Styling within Info Blocks */
.info-left h2, .info-left p, .info-right p {
margin: 4px 0; /* Adjust spacing */
color: inherit; /* Inherit color from parent (.info-left/.info-right) */
}
.info-left h2 {
font-size: 1.6em;
margin-bottom: 8px;
font-weight: bold;
color: #fff; /* White title */
}
/* Remove .info-left a styling */
.info-left p {
font-size: 0.95em;
}
.info-right p.repo-description { /* Target only the description paragraph */
font-size: 0.95em;
margin-bottom: 8px; /* Add space below description */
}
.ai-summary {
margin-top: 8px; /* Add space above summary */
font-size: 0.85em; /* Smaller font for summary */
color: #ddd; /* Slightly different color for summary */
font-style: italic; /* Italicize summary text */
opacity: 0.9;
}
.ai-summary p {
margin: 0; /* Reset paragraph margin inside summary */
font-size: inherit; /* Inherit size */
color: inherit; /* Inherit color */
font-style: inherit; /* Inherit style */
}
.ai-summary strong { /* Style the "AI 总结:" part */
font-style: normal;
font-weight: bold;
color: #fff;
}
/* 4. Share Button Styling */
.share-button {
position: absolute;
top: 30px; /* Adjust spacing */
right: 30px; /* Adjust spacing */
z-index: 3; /* Above everything else */
padding: 5px 10px;
background-color: rgba(255, 255, 255, 0.15); /* Semi-transparent white */
color: #fff; /* White icon */
border: 1px solid rgba(255, 255, 255, 0.3);
border-radius: 50%;
cursor: pointer;
display: flex;
justify-content: center;
align-items: center;
width: 30px; /* Fixed width */
height: 30px; /* Fixed height */
font-size: 1.1em;
transition: background-color 0.2s ease, transform 0.2s ease;
backdrop-filter: blur(2px);
-webkit-backdrop-filter: blur(2px);
}
.share-button:hover {
background-color: rgba(255, 255, 255, 0.3);
transform: scale(1.1);
}
/* 5. DeepWiki Button Styling */
.deepwiki-btn {
/* Position it inline within the container */
display: inline-flex; /* Align icon and text */
align-items: center; /* Vertically center icon and text */
/* Remove margin-left as spacing is handled by the container */
margin-left: 0;
margin-top: 0; /* Reset top margin */
padding: 4px 8px; /* Adjust padding */
background-color: rgba(60, 120, 240, 0.7); /* A distinct blue color */
color: #fff;
border: none;
border-radius: 5px;
cursor: pointer;
font-size: 0.85em; /* Slightly larger font */
font-weight: 500; /* Normal weight */
text-align: center;
transition: background-color 0.2s ease;
text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
vertical-align: middle; /* Align button vertically with surrounding text */
}
.deepwiki-btn img {
height: 1em; /* Match icon height roughly to font size */
width: auto;
margin-right: 5px; /* Space between icon and text */
}
.deepwiki-btn:hover {
background-color: rgba(80, 140, 255, 0.9); /* Lighter blue on hover */
}
/* 6. Zread Button Styling */
.zread-btn {
display: inline-flex;
align-items: center;
margin-left: 0;
margin-top: 0;
padding: 4px 8px;
background-color: rgba(240, 120, 60, 0.7); /* Orange color to distinguish from DeepWiki */
color: #fff;
border: none;
border-radius: 5px;
cursor: pointer;
font-size: 0.85em;
font-weight: 500;
text-align: center;
transition: background-color 0.2s ease;
text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
vertical-align: middle;
}
.zread-btn img {
height: 1em; /* Match icon height roughly to font size */
width: auto;
margin-right: 5px; /* Space between icon and text */
}
.zread-btn:hover {
background-color: rgba(255, 140, 80, 0.9); /* Lighter orange on hover */
}
/* 6. Loading State Styling */
.loading {
/* Ensure loading covers the entire item */
height: 100%;
width: 100%;
position: absolute;
top: 0;
left: 0;
display: flex; /* Use flex to center content */
justify-content: center;
align-items: center;
/* Keep the blurred gradient background or a simple dark one */
background: linear-gradient(135deg, rgba(50, 50, 80, 0.8) 0%, rgba(30, 30, 50, 0.8) 100%);
backdrop-filter: blur(15px);
-webkit-backdrop-filter: blur(15px);
z-index: 5; /* Ensure it's above other item content if needed */
color: #fff;
}
.loading-content {
display: flex;
flex-direction: column; /* Stack icon and text vertically */
align-items: center;
text-align: center;
}
.octocat-spinner {
width: 64px; /* Adjust size as needed */
height: 64px;
fill: rgba(255, 255, 255, 0.8); /* Semi-transparent white */
margin-bottom: 15px; /* Space between icon and text */
/* Optional: Add a subtle animation */
animation: octocat-pulse 1.5s ease-in-out infinite alternate;
}
.loading-content p {
font-size: 1.1em;
text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.7);
margin: 0;
}
/* Optional pulse animation for Octocat */
@keyframes octocat-pulse {
from {
opacity: 0.7;
transform: scale(1);
}
to {
opacity: 1;
transform: scale(1.05);
}
}
/* Responsive Adjustments */
@media (max-width: 768px) {
.controls {
top: 15px;
padding: 3px;
gap: 3px;
}
.time-range-btn {
padding: 5px 10px;
font-size: 0.8em;
}
.gittok-item {
display: flex;
flex-direction: column;
justify-content: flex-start;
align-items: center;
height: 100vh;
width: 100vw;
/* overflow-y: auto; Removed to prevent item itself from scrolling */
position: relative;
padding: 80px 15px 15px 15px; /* Increased top padding, rest same */
box-sizing: border-box;
}
.content-image {
order: 1;
width: 100%;
margin-top: 0;
margin-bottom: 15px; /* Slightly reduced margin-bottom */
flex-shrink: 0;
}
.info-right { /* Contains description and AI summary */
order: 2;
position: relative;
width: 100%;
margin: 0 0 15px 0; /* Adjusted margin-bottom */
text-align: left;
box-sizing: border-box;
flex-grow: 1; /* Allow this block to grow and take available space */
flex-shrink: 1; /* Allow this block to shrink if necessary */
overflow-y: auto; /* Allow internal scrolling for long descriptions/summaries */
min-height: 0; /* Important for scrollable flex children */
bottom: auto;
left: auto;
right: auto;
max-width: none;
}
.info-right p.repo-description {
margin-bottom: 10px;
}
.ai-summary {
font-size: 0.8em;
text-align: left;
margin-top: 10px;
margin-bottom: 0;
width: 100%;
max-width: none;
box-sizing: border-box;
}
.info-left { /* Contains title, author, stats, today-info-container */
order: 3;
position: relative;
width: 100%;
margin: auto 0 0 0;
text-align: left;
box-sizing: border-box;
flex-shrink: 0; /* Prevent this bottom block from shrinking */
bottom: auto;
left: auto;
max-width: none;
}
.info-left h2 {
font-size: 1.3em;
margin-bottom: 5px;
}
.info-left p,
.info-right p.repo-description {
font-size: 0.9em;
line-height: 1.4;
}
.info-left .info-author, .info-left .info-stats {
margin-bottom: 5px;
}
.share-button {
top: 25px; /* Adjusted to be slightly lower considering new 80px padding-top */
right: 15px;
width: 28px;
height: 28px;
font-size: 1em;
z-index: 10;
}
.share-button svg {
width: 14px;
height: 14px;
}
.deepwiki-btn {
padding: 10px 15px;
font-size: 0.9em;
margin-top: 10px;
margin-right: 10px;
}
.deepwiki-btn img {
width: 18px;
height: 18px;
margin-right: 8px;
}
.zread-btn {
padding: 10px 15px;
font-size: 0.9em;
margin-top: 10px;
}
.zread-btn img {
width: 18px;
height: 18px;
margin-right: 8px;
}
.blurred-background {
filter: blur(20px) brightness(0.6);
}
.loading {
display: flex;
justify-content: center;
align-items: center;
padding-top: 15vh;
box-sizing: border-box;
height: 100%;
width: 100%;
}
}