-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathstyles.css
More file actions
547 lines (474 loc) · 11.3 KB
/
Copy pathstyles.css
File metadata and controls
547 lines (474 loc) · 11.3 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
@font-face {
font-family: 'Meslo LG L DZ for Powerline';
src: url('fonts/MesloLGLDZ-Regular.ttf') format('truetype'); /* 根據你的字體文件格式調整 */
}
/* 電腦版樣式 */
@media (min-width: 1024px) {
nav {
width: 1200px;
}
.container {
max-width: 1200px;
}
footer {
width: 1200px;
}
}
/* 手機版樣式 */
@media (max-width: 1023px) {
nav {
width: 350px !important;
padding: 15px !important;
height: 150px !important;
display: block !important;
flex-direction: column !important;
align-items: center !important;
justify-content: center;
}
.nav-left, .nav-center, .nav-right {
display: flex;
justify-content: center;
width: 100%;
margin-bottom: 10px;
}
.nav-center {
position: absolute;
left: 50%;
}
.separator {
display: none !important;
}
.nav-center {
display: flex;
flex-direction: column;
align-items: center;
margin-bottom: 20px; /* 增加底部間距,避免重疊 */
}
.nav-center a {
margin: 0;
display: flex;
flex-direction: column;
align-items: center;
}
.search-box {
display: none !important;
}
.search-box input {
width: calc(100% - 40px);
}
.container {
max-width: 100%;
flex-direction: column;
align-items: center;
}
.about-me, .blog-content {
margin: 10px 0;
}
.about-me {
width: 350px !important;
margin: 25px;
margin-bottom: 0px !important;
}
.about-me img {
width: 100%;
}
.blog-content {
width: 350px !important;
}
.post-image {
display: none !important;
}
.blog-content hr {
width: 300px !important;
}
#blog-content img {
width: 300px !important;
max-width: 100% !important;
}
footer {
width: 350px !important;
padding: 10px;
}
}
body {
margin: 0;
display: flex;
flex-direction: column;
align-items: center;
min-height: 100vh; /* 確保頁面高度至少為視窗高度 */
}
nav {
background-color: #d9d9d9;
color: black;
padding: 25px;
height: 100px;
width: 1024px;
box-sizing: border-box;
border-bottom-left-radius: 25px;
border-bottom-right-radius: 25px;
display: flex;
justify-content: space-between;
align-items: center; /* 垂直置中 */
position: relative; /* 為了讓子元素使用絕對定位 */
}
p {
word-break: break-word;
}
.blog-title {
font-family: 'Noto Sans', sans-serif;
font-weight: bold;
}
.nav-left, .nav-right {
display: flex;
align-items: center; /* 垂直置中 */
}
.nav-left a {
color: black;
text-decoration: none;
}
.nav-left a:hover {
cursor: pointer; /* 滑鼠靠近時變成指針樣式 */
}
.nav-left {
cursor: pointer; /* 滑鼠滑過時游標變成可點擊狀態 */
}
.search-box {
display: flex;
align-items: center;
background-color: #f2f2f2;
border-radius: 10px;
width: 150px;
height: 50px;
overflow: hidden; /* 確保內容不會超出容器 */
transition: width 0.3s ease, background-color 0.3s ease; /* 寬度和背景顏色變化過渡效果 */
}
.search-box:focus-within {
width: 200px; /* 當 input 獲得焦點時的寬度 */
}
.search-box svg {
margin: 11px;
fill: black; /* 設置圖標顏色為黑色 */
flex-shrink: 0; /* 防止 svg 圖標縮小 */
}
.search-box input {
border: none;
background: none;
outline: none;
font-family: 'Noto Sans', sans-serif;
font-size: 14px;
color: #6c6c6c;
flex-grow: 1; /* 讓 input 元素填滿剩餘空間 */
min-width: 0; /* 防止 input 元素超出容器 */
margin-right: 11px;
color: black; /* 輸入文字顏色為黑色 */
}
.search-box input::placeholder {
color: #6c6c6c; /* 提示文字顏色為灰色 */
font-weight: bold; /* 提示文字為粗體 */
}
.nav-center {
position: absolute;
left: 50%;
transform: translateX(-50%);
display: flex;
justify-content: center;
flex-grow: 1;
gap: 0.5em;
}
.nav-center a {
font-family: 'Meslo LG L DZ for Powerline', monospace;
font-size: 16px;
color: black;
text-decoration: none;
transition: color 0.3s ease;
cursor: pointer; /* 滑鼠滑過時游標變成可點擊狀態 */
}
.nav-center a:hover {
color: gray; /* 滑鼠滑過時變淺 */
text-decoration: none;
}
.nav-center a.separator {
color: black; /* 保持分隔符號的顏色 */
cursor: default; /* 滑鼠滑過時不變成手形 */
transition: none; /* 移除過渡效果 */
}
.container {
display: flex;
flex: 1;
max-width: 1024px;
}
.container p {
padding-top: 10px;
margin: 0px;
}
.container hr {
border: none;
border-top: 1px solid #000000; /* 設置上邊框 */
margin-top: 10px;
}
.icon-text {
margin-top: 10px;
display: flex;
align-items: center;
}
.icon-plantext {
display: flex;
flex-direction: column; /* 確保 a 標籤垂直排列 */
align-items: flex-start;
margin-left: 10px;
}
.icon-plantext a {
display: block;
}
.icon-container {
position: relative;
display: inline-block;
background-color: white; /* 底部白色方形背景 */
padding: 5px; /* 調整內邊距以確保圖標不緊貼邊框 */
border-radius: 5px; /* 可選:圓角邊框 */
}
.icon-container svg {
display: block;
}
.box {
text-align: center;
padding: 25px;
height: 100%;
margin-bottom: 25px;
margin-top: 25px;
}
.about-me {
background-color: #d9d9d9;
width: 250px;
box-sizing: border-box;
margin-right: 25px;
border-radius: 25px;
}
.page-main {
display: flex;
flex-direction: column;
align-items: flex-start;
}
.blog-content {
font-family: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI Variable Display", "Segoe UI", Helvetica, "Apple Color Emoji", Arial, sans-serif, "Segoe UI Emoji", "Segoe UI Symbol";
background-color: #d9d9d9;
width: 749px;
box-sizing: border-box;
border-radius: 25px;
display: flex;
justify-content: flex-start;
text-align: left;
white-space: pre-wrap;
word-break: break-all;
height: auto;
}
.blog-content h1 {
font-family: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI Variable Display", "Segoe UI", Helvetica, "Apple Color Emoji", Arial, sans-serif, "Segoe UI Emoji", "Segoe UI Symbol";
font-size: 2.5rem;
font-weight: 700;
margin-top: 0;
margin-bottom: 0.75em;
}
.blog-content h2,h3,h4,h5,h6 {
letter-spacing: -0.01em;
line-height: 1.2;
font-weight: 600;
margin-bottom: 0;
}
.blog-content h2 {
font-size: 1.5rem;
margin-top: 1.5rem;
}
.blog-content h3 {
font-size: 1.25rem;
margin-top: 1.25rem;
}
.blog-content p {
margin-top: 0.5em;
margin-bottom: 0.5em;
}
.blog-content a,a.visited {
color: rgb(110, 110, 110);
text-decoration: underline;
}
.blog-content p {
padding: 0px;
line-height: 1.5;
margin-top: 0.5em;
margin-bottom: 0.5em;
}
.blog-content ul, .blog-content ol {
padding-left: 20px; /* 設置縮排 */
margin: 0; /* 移除默認的外邊距 */
}
.blog-content li {
line-height: 24px;
margin-block-start: 0.3em;
margin-block-end: 0.3em;
}
#html-output img {
border-radius: 8px; /* 你可以根據需要調整這個值 */
}
.post-box {
display: flex;
flex-direction: row;
justify-content: space-between; /* 使內容和圖片之間有空間 */
background-color: transparent;
}
.post-image {
width: 200px;
max-height: 150px; /* 4:3 比例 */
object-fit: cover;
border-radius: 8px; /* 倒角 */
margin-right: 10px;
margin-left: 25px !important;
}
.post-content {
display: flex;
flex-direction: column;
flex-grow: 1; /* 使內容占據剩餘空間 */
}
.post-date {
display: flex;
align-items: center;
margin: 5px 0;
color: #303030;
font-size: 80%;
}
.post-date i {
color: #303030; /* 設置日期圖標顏色為淺色 */
font-size: 80%;
}
.post-content p {
color: #303030; /* 設置內文顏色為淺色 */
}
.calendar-icon {
margin-right: 2px;
}
#posts-list {
display: flex;
flex-direction: column; /* 垂直方向排列 */
}
#posts-list hr {
border: none; /* 移除默認邊框 */
border-top: 1px solid #bbb; /* 添加頂部邊框作為分割線 */
margin: 25px 0; /* 添加一些外邊距 */
}
#posts-list h2 {
margin: 0;
line-height: 2;
color: #303030; /* 設置內文顏色為淺色 */
text-wrap: pre-wrap;
}
#posts-list h2 a {
color: #303030; /* 設置內文顏色為淺色 */
text-decoration: none; /* 移除底線 */
transition: color 0.3s; /* 添加顏色變化的過渡效果 */
text-wrap: pre-wrap;
}
#posts-list h2 a:hover {
color: gray; /* 滑鼠靠近時變顏色 */
cursor: pointer; /* 滑鼠靠近時變成指針樣式 */
}
#posts-list p {
margin: 0;
line-height: 2;
}
#posts-list a {
margin: 0;
}
.checkbox > li {
list-style-type: none;
padding: 0;
line-height: 1;
}
.checkbox {
padding-left: 0px !important;
margin: 0.3em 0 !important; /* 減少核選方塊的外邊距 */
margin-right: 0.6em; /* 調整 checkbox 與文字之間的距離 */
vertical-align: middle; /* 確保 checkbox 與文字垂直對齊 */
}
.blog-content img {
margin-top: 1.25em;
margin-bottom: 1.25em;
max-width: 61%;
height: auto;
display: block;
margin: 0 auto;
}
.blog-content pre,code {
background: rgba(135, 131, 120, 0.15);
padding: 0.2em 0.2em;
border-radius: 2.5px;
font-size: 100%;
tab-size: 2;
white-space: pre-wrap; /* 自動換行 */
word-wrap: break-word; /* 防止長單詞溢出 */
}
.github-icon-container:hover {
cursor: pointer;
color: gray;
}
.blog-content pre {
padding: 16px;
overflow-x: auto; /* 添加水平滾動條 */
}
.blog-content code {
color: #eb5757;
}
.blog-content pre > code{
background: none;
padding: 0;
font-size: 100%;
color: inherit;
}
.blog-content pre > p > code {
background: none;
padding: 0;
font-size: 1.25em;
color: black;
}
.blog-content pre > p {
margin: 0;
}
.blog-content blockquote {
font-size: 1em;
margin: 1em 0;
padding-left: 1em;
border-left: 3px solid rgb(55, 53, 47);
}
.blog-content hr {
margin: 8px, 0;
width: 699px;
border-color: rgb(177, 177, 177);
}
/* 表格樣式 */
.blog-content table {
/* width: 100%; */
border-collapse: collapse; /* 確保邊框不重疊 */
margin-bottom: 1em;
}
.blog-content th, .blog-content td {
border: 1px solid #a1a1a1; /* 設置表格邊框 */
padding: 8px; /* 設置單元格內邊距 */
text-align: left; /* 設置文字靠左對齊 */
}
.blog-content th {
background-color: #bbbcbaa8; /* 設置表頭背景顏色 */
font-weight: bold; 設置表頭文字加粗
}
footer {
background-color: #d9d9d9;
width: 1024px;
box-sizing: border-box;
justify-content: flex-start;
border-top-left-radius: 25px;
border-top-right-radius: 25px;
position: relative; /* 固定在頁面底部 */
bottom: 0;
padding: 15px;
font-family: Arial, "Helvetica Neue", Helvetica, sans-serif;
font-size: 14px;
display: flex; /* 使用 Flexbox */
align-items: center; /* 垂直置中 */
}