|
41 | 41 | &, |
42 | 42 | &:visited, |
43 | 43 | &:hover { |
44 | | - color: $color-foreground; |
| 44 | + @include themed() { |
| 45 | + color: t('foreground-color'); |
| 46 | + } |
45 | 47 | text-decoration: none; |
46 | 48 | } |
47 | 49 | } |
|
79 | 81 |
|
80 | 82 |
|
81 | 83 | .post-title { |
82 | | - color: $color-foreground; |
| 84 | + @include themed() { |
| 85 | + color: t('foreground-color'); |
| 86 | + } |
83 | 87 | text-align: left; |
84 | 88 | } |
85 | 89 |
|
86 | 90 | .post-description { |
87 | 91 | margin-top: 1em; |
88 | 92 | font-size: $base-font-size * 1.15; |
89 | | - color: $color-foreground; |
| 93 | + @include themed() { |
| 94 | + color: t('foreground-color'); |
| 95 | + } |
90 | 96 | white-space: nowrap; |
91 | 97 | overflow: hidden; |
92 | 98 | width: 100%; |
|
115 | 121 | margin-bottom: 2em; |
116 | 122 | .post-date { |
117 | 123 | margin-top: 1em; |
118 | | - color: $color-foreground-dark; |
| 124 | + @include themed() { |
| 125 | + color: t('foreground-color-alt'); |
| 126 | + } |
119 | 127 | font-size: 12px; |
120 | 128 | margin-top: 1em; |
121 | 129 | margin-left: 0.5em; |
122 | 130 | } |
123 | 131 |
|
124 | 132 | strong { |
125 | | - color: white; |
| 133 | + @include themed() { |
| 134 | + color: t('foreground-color-contrast'); |
| 135 | + } |
126 | 136 | } |
127 | 137 |
|
128 | 138 | img { |
|
207 | 217 | } |
208 | 218 |
|
209 | 219 | & > .post-meta { |
210 | | - color: $color-foreground-dark; |
| 220 | + @include themed() { |
| 221 | + color: t('foreground-color-alt'); |
| 222 | + } |
211 | 223 | font-size: $small-font-size; |
212 | 224 | } |
213 | 225 | } |
|
223 | 235 |
|
224 | 236 | .tag, .tag-cloud > a { |
225 | 237 | color: $color-green; |
226 | | - background-color: $color-background-dark; |
| 238 | + @include themed() { |
| 239 | + background-color: t('background-color'); |
| 240 | + } |
227 | 241 | padding: 0.3em 0.6em; |
228 | 242 | border-radius: 0.3em; |
229 | 243 | &:hover { |
230 | 244 | text-decoration: none; |
231 | 245 | color: lighten($color-green, 20%); |
232 | | - background-color: lighten($color-background-dark, 5%); |
| 246 | + @include themed() { |
| 247 | + background-color: lighten(t('background-color'), 5%); |
| 248 | + } |
233 | 249 | } |
234 | 250 |
|
235 | 251 | & > svg { |
|
249 | 265 |
|
250 | 266 | .credits { |
251 | 267 | font-size: 10px; |
252 | | - color: lighten($color-background-dark, 5%); |
| 268 | + @include themed() { |
| 269 | + color: lighten(t('background-color'), 5%); |
| 270 | + } |
253 | 271 |
|
254 | 272 | & > a { |
255 | | - color: lighten($color-background-dark, 10%); |
| 273 | + @include themed() { |
| 274 | + color: lighten(t('background-color'), 10%); |
| 275 | + } |
256 | 276 | text-decoration: underline; |
257 | 277 | } |
258 | 278 | } |
|
280 | 300 |
|
281 | 301 | & > a { |
282 | 302 | color: $color-green; |
283 | | - background-color: $color-background-dark; |
| 303 | + @include themed() { |
| 304 | + background-color: t('background-color'); |
| 305 | + } |
284 | 306 | &:hover { |
285 | 307 | color: lighten($color-green, 20%); |
286 | | - background-color: lighten($color-background-dark, 5%); |
| 308 | + @include themed() { |
| 309 | + background-color: lighten(t('background-color'), 5%); |
| 310 | + } |
287 | 311 | } |
288 | 312 | } |
289 | 313 |
|
290 | 314 | & > span { |
291 | | - color: darken($color-foreground, 20%); |
292 | | - background-color: darken($color-background-dark, 3%); |
| 315 | + @include themed() { |
| 316 | + color: darken(t('foreground-color'), 20%); |
| 317 | + background-color: darken(t('background-color'), 3%); |
| 318 | + } |
293 | 319 | } |
294 | 320 | } |
295 | 321 |
|
|
298 | 324 | text-align: right; |
299 | 325 | display: inline-block; |
300 | 326 | & > a { |
301 | | - color: darken($color-foreground, 10%); |
| 327 | + @include themed() { |
| 328 | + color: darken(t('foreground-color'), 10%); |
| 329 | + } |
302 | 330 | display: inline-block; |
303 | 331 | padding-left: 0.3em; |
304 | 332 | font-size: $post-link-font-size * 1.35; |
@@ -339,3 +367,27 @@ ul.related-posts { |
339 | 367 | } |
340 | 368 | } |
341 | 369 | } |
| 370 | + |
| 371 | +#theme-toggle { |
| 372 | + background-color: transparent; |
| 373 | + border: none; |
| 374 | + float: right; |
| 375 | + display: inline-block; |
| 376 | + &.dark { |
| 377 | + &:before { |
| 378 | + content: $icon-flask; |
| 379 | + @include font-awesome-icon; |
| 380 | + } |
| 381 | + @include themed() { |
| 382 | + color: t('foreground-color'); |
| 383 | + } |
| 384 | + } |
| 385 | + |
| 386 | + &.light { |
| 387 | + &:before { |
| 388 | + content: $icon-flask; |
| 389 | + @include font-awesome-icon; |
| 390 | + } |
| 391 | + color: $color-yellow; |
| 392 | + } |
| 393 | +} |
0 commit comments