|
1 | | -/* Shared Typography and Layout */ |
2 | | -html { |
3 | | - box-sizing: border-box; |
4 | | - font-size: 16px; |
5 | | - |
6 | | -*, |
7 | | -*::before, |
8 | | -*::after { |
9 | | - box-sizing: inherit; |
10 | | -} |
11 | | - |
12 | | -body { |
13 | | - font-family: Georgia, 'Noto Serif', 'Noto Sans SC', 'Microsoft YaHei', 'Hiragino Sans GB', serif; |
14 | | - background-color: #fff; |
15 | | - color: #111; |
16 | | - padding: 2.1rem; |
17 | | - max-width: 800px; |
18 | | - margin: auto; |
19 | | - line-height: 1.8; |
20 | | -} |
21 | | - |
22 | | -a { |
23 | | - color: #0044cc; |
24 | | - text-decoration: none; |
25 | | - font-weight: 600; |
26 | | -} |
27 | | - |
28 | | -a:hover, |
29 | | -a:focus { |
30 | | - text-decoration: underline; |
31 | | -} |
32 | | - |
33 | | -/* Header */ |
34 | | -header h1, |
35 | | -.header-title { |
36 | | - font-size: 2.1rem; |
37 | | - color: #000; |
38 | | - margin-bottom: 0.3rem; |
39 | | -} |
40 | | - |
41 | | -header p, |
42 | | -.header-row p { |
43 | | - font-size: 1.3rem; |
44 | | - color: #444; |
45 | | - margin: 0; |
46 | | -} |
47 | | - |
48 | | -.header-row { |
49 | | - display: flex; |
50 | | - justify-content: space-between; |
51 | | - align-items: center; |
52 | | - gap: 1rem; |
53 | | -} |
54 | | - |
55 | | -/* Post Listing */ |
56 | | -#posts-list { |
57 | | - margin-top: 2.1rem; |
58 | | -} |
59 | | - |
60 | | -.post-entry { |
61 | | - margin-bottom: 2.1rem; |
62 | | -} |
63 | | - |
64 | | -.post-entry a { |
65 | | - font-size: 1.3rem; |
66 | | -} |
67 | | - |
68 | | -.post-meta, |
69 | | -.post-date { |
70 | | - font-size: 0.9rem; |
71 | | - color: #777; |
72 | | -} |
73 | | - |
74 | | -.post-date::after { |
75 | | - content: " •"; |
76 | | - padding: 0 0.4rem; |
77 | | -} |
78 | | - |
79 | | -.post-author { |
80 | | - color: #444; |
81 | | -} |
82 | | - |
83 | | -/* Individual Post */ |
84 | | -article { |
85 | | - margin-top: 3.4rem; |
86 | | -} |
87 | | - |
88 | | -article h1, |
89 | | -article h2 { |
90 | | - color: #000; |
91 | | - margin: 1.3rem 0; |
92 | | -} |
93 | | - |
94 | | -article p { |
95 | | - margin-bottom: 1.3rem; |
96 | | -} |
97 | | - |
98 | | -/* Back Link */ |
99 | | -.back-link { |
100 | | - display: block; |
101 | | - margin-top: 2.1rem; |
102 | | - color: #555; |
103 | | -} |
104 | | - |
105 | | -/* Dark Mode */ |
106 | | -.dark-mode body { |
107 | | - background-color: #0e0e0e; |
108 | | - color: #f1f1f1; |
109 | | -} |
110 | | - |
111 | | -.dark-mode a { |
112 | | - color: #88aaff; |
113 | | -} |
114 | | - |
115 | | -.dark-mode header h1, |
116 | | -.dark-mode article h1, |
117 | | -.dark-mode article h2, |
118 | | -.dark-mode .header-title { |
119 | | - color: #fff; |
120 | | -} |
121 | | - |
122 | | -.dark-mode header p, |
123 | | -.dark-mode .header-row p, |
124 | | -.dark-mode .post-meta, |
125 | | -.dark-mode .post-date, |
126 | | -.dark-mode .back-link { |
127 | | - color: #ccc; |
128 | | -} |
129 | | - |
130 | | -/*Tags*/ |
131 | | -.tags-container { |
132 | | - margin-top: 0.5rem; |
133 | | -} |
134 | | - |
135 | | -.post-tag { |
136 | | - display: inline-block; |
137 | | - background-color: #eef; |
138 | | - color: #336; |
139 | | - font-size: 0.75rem; |
140 | | - padding: 0.2rem 0.5rem; |
141 | | - border-radius: 0.5rem; |
142 | | - margin-right: 0.4rem; |
143 | | - margin-top: 0.4rem; |
144 | | -} |
145 | | - |
146 | | -.dark-mode .post-tag { |
147 | | - background-color: #223; |
148 | | - color: #ccf; |
149 | | -} |
150 | | - |
151 | | -#tag-filter { |
152 | | - margin-bottom: 2rem; |
153 | | -} |
154 | | - |
155 | | -#tag-buttons { |
156 | | - margin-top: 0.5rem; |
157 | | -} |
158 | | - |
159 | | -.tag-button { |
160 | | - background-color: #ddeeff; |
161 | | - border: none; |
162 | | - border-radius: 0.5rem; |
163 | | - padding: 0.4rem 0.8rem; |
164 | | - margin: 0.2rem; |
165 | | - font-size: 0.85rem; |
166 | | - cursor: pointer; |
167 | | -} |
168 | | - |
169 | | -.tag-button:hover { |
170 | | - background-color: #ccddee; |
171 | | -} |
172 | | - |
173 | | -.dark-mode .tag-button { |
174 | | - background-color: #334455; |
175 | | - color: #ddeeff; |
176 | | -} |
177 | | - |
178 | | -.dark-mode .tag-button:hover { |
179 | | - background-color: #445566; |
180 | | -} |
181 | | - |
182 | | -/* Theme Toggle */ |
183 | | -#theme-toggle { |
184 | | - background: none; |
185 | | - border: none; |
186 | | - font-family: inherit; |
187 | | - font-size: 1rem; |
188 | | - padding: 0.3rem 0.8rem; |
189 | | - border-radius: 0.5rem; |
190 | | - cursor: pointer; |
191 | | - color: inherit; |
192 | | - white-space: nowrap; |
193 | | -} |
194 | | -#theme-toggle:hover, |
195 | | -#theme-toggle:focus { |
196 | | - background-color: rgba(0, 0, 0, 0.05); |
197 | | -} |
198 | | -} |
199 | | - |
200 | | -.dark-mode #theme-toggle:hover { |
201 | | - background-color: rgba(255, 255, 255, 0.1); |
202 | | -} |
203 | | - |
204 | | -#comments-section { |
205 | | - margin-top: 3rem; |
206 | | - padding: 1.5rem; |
207 | | - background: #f9f9f9; |
208 | | - border-radius: 1rem; |
209 | | - box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1); |
210 | | -} |
211 | | - |
212 | | -.dark-mode #comments-section { |
213 | | - background: #1f1f1f; |
214 | | -} |
215 | | - |
216 | | -#comments-list p { |
217 | | - background: #eef; |
218 | | - padding: 0.8rem 1.2rem; |
219 | | - border-radius: 1rem; |
220 | | - margin-bottom: 1.5rem; |
221 | | - font-size: 1rem; |
222 | | - word-break: break-word; |
223 | | - border-left: 4px solid #3366ff; |
224 | | -} |
225 | | - |
226 | | -.dark-mode #comments-list p { |
227 | | - background: #223; |
228 | | - color: #ddeeff; |
229 | | - border-left: 4px solid #88aaff; |
230 | | -} |
231 | | - |
232 | | -#comment-form { |
233 | | - margin-top: 2rem; |
234 | | - display: flex; |
235 | | - flex-direction: column; |
236 | | -} |
237 | | - |
| 1 | +/* relies on shared.css first */ |
| 2 | +article{margin-top:3rem;} |
| 3 | +article h1{margin:1.5rem 0; font-size:1.9rem;} |
| 4 | +.post-meta{font-size:.9rem; color:#777; margin-bottom:1.5rem;} |
| 5 | + |
| 6 | +/* --- comment section ------------------------------------------------- */ |
| 7 | +#comments-section{ |
| 8 | + margin-top:3rem; padding:1.6rem; |
| 9 | + background:#f9f9f9; border-radius:1rem; |
| 10 | + box-shadow:0 2px 6px rgba(0,0,0,.08); |
| 11 | +} |
| 12 | +#comments-list p{ |
| 13 | + background:#eef; padding:.9rem 1.2rem; border-radius:1rem; |
| 14 | + margin-bottom:1.2rem; border-left:4px solid #3366ff; |
| 15 | +} |
| 16 | +#comment-form{margin-top:1.5rem; display:flex; flex-direction:column;} |
238 | 17 | #comment-form textarea, |
239 | | -#comment-form input[type="text"] { |
240 | | - font-size: 1rem; |
241 | | - margin-bottom: 1rem; |
242 | | - padding: 0.75rem; |
243 | | - border-radius: 0.5rem; |
244 | | - border: 1px solid #ccc; |
| 18 | +#comment-form input[type=text]{ |
| 19 | + font-size:1rem; padding:.8rem; margin-bottom:1rem; |
| 20 | + border-radius:.6rem; border:1px solid #ccc; |
245 | 21 | } |
246 | | - |
247 | | -.dark-mode #comment-form textarea, |
248 | | -.dark-mode #comment-form input[type="text"] { |
249 | | - background: #222; |
250 | | - color: #eee; |
251 | | - border: 1px solid #555; |
| 22 | +#comment-form button{ |
| 23 | + align-self:flex-start; padding:.75rem 1.6rem; |
| 24 | + background:#3366ff; color:#fff; border:none; border-radius:.5rem; |
| 25 | + cursor:pointer; font-size:1rem; |
252 | 26 | } |
| 27 | +#comment-form button:hover{background:#254eda;} |
253 | 28 |
|
254 | | -#comment-form button { |
255 | | - padding: 0.75rem 1.5rem; |
256 | | - background: #3366ff; |
257 | | - color: white; |
258 | | - border: none; |
259 | | - border-radius: 0.5rem; |
260 | | - cursor: pointer; |
261 | | - font-size: 1rem; |
262 | | - width: fit-content; |
| 29 | +/* dark-mode */ |
| 30 | +.dark-mode #comments-section{background:#1f1f1f;} |
| 31 | +.dark-mode #comments-list p{ |
| 32 | + background:#334; color:#ddeeff; border-left:4px solid #88aaff; |
263 | 33 | } |
264 | | - |
265 | | -#comment-form button:hover { |
266 | | - background: #254eda; |
| 34 | +.dark-mode #comment-form textarea, |
| 35 | +.dark-mode #comment-form input[type=text]{ |
| 36 | + background:#222; color:#eee; border:1px solid #555; |
267 | 37 | } |
0 commit comments