-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlog_style.css
More file actions
340 lines (295 loc) · 7.8 KB
/
log_style.css
File metadata and controls
340 lines (295 loc) · 7.8 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
/* --- Article Header --- */
.article-header {
display: flex;
justify-content: space-between;
align-items: center;
padding: 1.5rem 0;
border-bottom: 1px solid var(--border);
margin-bottom: 2rem;
gap: 1rem;
}
.back-link {
color: var(--accent);
text-decoration: none;
font-size: 0.9rem;
font-weight: bold;
white-space: nowrap;
padding: 6px 12px;
border: 1px solid var(--border);
border-radius: 6px;
transition: all 0.2s;
}
.back-link:hover {
background: var(--accent-faded);
border-color: var(--accent);
}
/* --- Author Card --- */
.author-card {
display: flex;
align-items: center;
gap: 12px;
}
.author-avatar {
width: 42px;
height: 42px;
border-radius: 50%;
border: 2px solid var(--accent);
background: var(--sidebar-bg);
}
.author-info {
display: flex;
flex-direction: column;
line-height: 1.2;
}
.author-name {
font-weight: bold;
color: var(--text);
font-size: 1rem;
}
.commit-date {
font-size: 0.75rem;
color: var(--secondary);
margin-top: 4px;
}
/* --- Responsive Adjustments --- */
@media (max-width: 650px) {
.article-header {
flex-direction: column;
align-items: flex-start;
padding: 1rem 0;
}
.back-link {
order: -1; /* Moves "Back to Home" to the top */
width: 100%;
text-align: center;
box-sizing: border-box;
}
.author-card {
width: 100%;
}
}
/* --- Content / Typography Optimization --- */
.prose {
line-height: 1.7;
font-size: 1.05rem;
}
/* Ensure code blocks don't break mobile layout */
.prose pre {
max-width: 100%;
overflow-x: auto;
padding: 1rem;
border-radius: 8px;
margin: 1.5rem 0;
position: relative;
/* Custom scrollbar for terminal feel */
scrollbar-width: thin;
scrollbar-color: var(--accent) transparent;
}
.prose img {
max-width: 100%;
height: auto;
border-radius: 8px;
}
/* Loading States */
.skeleton-avatar {
width: 42px;
height: 42px;
border-radius: 50%;
background: var(--border);
animation: pulse 1.5s infinite;
}
.skeleton-text {
width: 120px;
height: 12px;
background: var(--border);
border-radius: 4px;
animation: pulse 1.5s infinite;
}
@keyframes pulse {
0% { opacity: 0.5; }
50% { opacity: 0.8; }
100% { opacity: 0.5; }
}
/* --- Global Reset for the Log Viewer --- */
/* 1. The Container: Matches your main page width */
.log-container {
max-width: 900px; /* Optimal reading width */
width: 90%;
margin: 3rem auto; /* Large top/bottom margin to show shader */
padding: 3rem;
border-radius: 20px;
background-color: color-mix(in srgb, var(--bg), transparent 10%);
backdrop-filter: blur(10px);
border: 1px solid var(--border);
box-sizing: border-box;
display: block; /* Ensure it's not a grid */
}
/* 2. The Header: Spans the full width of the container */
.article-header {
width: 100%;
display: flex;
justify-content: space-between;
align-items: center;
padding: 2rem 0;
border-bottom: 1px solid var(--border);
margin-bottom: 3rem;
}
/* 3. The Content: This is what we constrain for readability */
.prose {
width: 100%;
max-width: 100%; /* Prose now just fills its container */
}
/* 4. Desktop Code Blocks: Let them be slightly wider than the text */
@media (max-width: 950px) {
.log-container {
width: 100%;
margin: 0;
border-radius: 0;
padding: 1.5rem;
}
}
/* 5. Mobile Adjustments (The "Lag & Scroll" Fixes) */
@media (max-width: 950px) {
:root {
font-size: 14px; /* Scaled down text for mobile */
}
.log-container {
width: 100%;
padding: 0 1.2rem;
}
.prose {
max-width: 100%; /* Use full width on mobile */
font-size: 1rem;
}
/* Reset the Desktop "pop out" for mobile */
@media (min-width: 0px) {
.prose pre {
width: 100% !important;
margin-left: 0 !important;
white-space: pre-wrap; /* Wrap code on small screens */
word-break: break-all;
}
}
.article-header {
flex-direction: column;
align-items: flex-start;
gap: 1.5rem;
}
.back-link {
width: 100%;
text-align: center;
order: -1;
}
}
/* Ensure the sidebar toggle stays above everything */
.sidebar-toggle {
z-index: 2000;
}
/* Ensure the shader canvas stays in the background */
#bg-canvas {
z-index: -1;
}
/* Make links in the sidebar navigate back to index correctly */
.side-nav-links a {
cursor: pointer;
}
.explanation-section {
margin-top: 3rem;
padding: 2rem;
background: var(--accent-faded);
border-left: 4px solid var(--accent);
border-radius: 0 8px 8px 0;
}
.explanation-section h2 {
margin-top: 0;
color: var(--accent);
font-size: 1.4rem;
text-transform: uppercase;
}
.explanation-section h3 {
font-size: 1.1rem;
margin-bottom: 0.5rem;
color: var(--text);
}
.explanation-section ul {
padding-left: 1.2rem;
}
.explanation-section li {
margin-bottom: 0.8rem;
list-style-type: " "; /* Nerd Font Check */
}
/* --- Prism Highlighting Fixes --- */
/* Ensure the background matches your theme but allows Prism colors to show */
.prose pre[class*="language-"] {
background: var(--code-bg) !important;
border: 1px solid var(--border);
margin: 2rem 0;
padding: 1.2rem;
box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}
/* Make sure the text color doesn't override the tokens */
.prose code[class*="language-"],
.prose pre[class*="language-"] {
font-family: 'JetBrainsMono NF', monospace !important;
text-shadow: none !important; /* Prism themes often add shadows we don't want */
font-size: 0.95rem;
line-height: 1.5;
}
/* Adjust Prism "Tomorrow" theme tokens to be more vibrant on your dark bg */
.token.comment, .token.prolog, .token.doctype, .token.cdata { color: #7285b7; }
.token.punctuation { color: #a8b1c1; }
.token.namespace { opacity: .7; }
.token.property, .token.tag, .token.boolean, .token.number, .token.constant, .token.symbol, .token.deleted { color: #ff9f43; }
.token.selector, .token.attr-name, .token.string, .token.char, .token.builtin, .token.inserted { color: #10b981; }
.token.operator, .token.entity, .token.url, .language-css .token.string, .style .token.string { color: var(--accent); }
.token.atrule, .token.attr-value, .token.keyword { color: #bd93f9; }
.token.function, .token.class-name { color: #38bdf8; }
.token.regex, .token.important, .token.variable { color: #feca57; }
/* --- Author Link Interactivity --- */
.author-link {
display: flex;
align-items: center;
gap: 12px;
text-decoration: none; /* Remove underline */
color: inherit; /* Keep text colors from theme */
padding: 6px 12px;
margin-left: -12px; /* Pull back to align with text */
border-radius: 12px;
transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
border: 1px solid transparent;
}
.author-link:hover {
background: var(--accent-faded);
border-color: var(--border);
transform: translateY(-2px);
}
.author-link:hover .author-avatar {
border-color: var(--accent);
box-shadow: 0 0 10px var(--accent-faded);
}
.author-link:hover .author-name {
color: var(--accent);
}
/* Ensure avatar still looks right inside the link */
.author-avatar {
width: 42px;
height: 42px;
border-radius: 50%;
border: 2px solid var(--border);
transition: border-color 0.2s;
}
/* Mirror index.html license button style */
#licenseBtn.nav-item {
font-family: inherit;
font-size: 0.95rem;
padding: 12px 1.5rem;
display: flex;
align-items: center;
gap: 12px;
transition: all 0.2s ease;
}
#licenseBtn.nav-item:hover {
background: var(--sidebar-bg);
color: var(--accent);
padding-left: 2rem;
}