mirror of
https://github.com/Brandon-Rozek/website-theme.git
synced 2025-07-31 14:12:01 +00:00
Add background/text color to <head> to prevent color flash
This commit is contained in:
parent
be207e0df3
commit
3bf669ac6a
1 changed files with 17 additions and 0 deletions
|
@ -42,6 +42,23 @@
|
||||||
{{ end -}}
|
{{ end -}}
|
||||||
|
|
||||||
<!-- CSS -->
|
<!-- CSS -->
|
||||||
|
<!-- Immediately show background/text color to prevent flashing white -->
|
||||||
|
<style>
|
||||||
|
:root {
|
||||||
|
--bg-color: #faf9f6;
|
||||||
|
--text-color: #020101;
|
||||||
|
}
|
||||||
|
body {
|
||||||
|
background-color: var(--bg-color);
|
||||||
|
color: var(--text-color);
|
||||||
|
}
|
||||||
|
@media (prefers-color-scheme: dark) {
|
||||||
|
:root {
|
||||||
|
--bg-color: #0e0e0e;
|
||||||
|
--text-color: #8f8f8f;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
{{- $style := resources.Get "css/style.css" -}}
|
{{- $style := resources.Get "css/style.css" -}}
|
||||||
{{- $markdown := resources.Get "css/markdown.css" -}}
|
{{- $markdown := resources.Get "css/markdown.css" -}}
|
||||||
{{- $fontawesome := resources.Get "css/fontawesome.css" -}}
|
{{- $fontawesome := resources.Get "css/fontawesome.css" -}}
|
||||||
|
|
Loading…
Add table
Reference in a new issue