aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorr <r@freesoftwareextremist.com>2023-09-08 17:15:44 +0000
committerr <r@freesoftwareextremist.com>2023-09-08 18:10:29 +0000
commit461908e0319f8fa43b93fbc500babea3ef44722f (patch)
tree61b80963720c927ab2f5f30fa7cb8b87f1f36ea3
parent426e9ad14f299a674b672d256ca8644281ec267f (diff)
downloadbloat-461908e0319f8fa43b93fbc500babea3ef44722f.tar.gz
bloat-461908e0319f8fa43b93fbc500babea3ef44722f.zip
Load CSS on the root page
This applies the background color to the root page and avoids flicker during the initial page load.
-rw-r--r--static/style.css2
-rw-r--r--templates/root.tmpl7
2 files changed, 5 insertions, 4 deletions
diff --git a/static/style.css b/static/style.css
index ef27f1f..21d8bc0 100644
--- a/static/style.css
+++ b/static/style.css
@@ -1,4 +1,4 @@
-body {
+frame, body {
background-color: #d2d2d2;
}
diff --git a/templates/root.tmpl b/templates/root.tmpl
index b1305f5..0fde835 100644
--- a/templates/root.tmpl
+++ b/templates/root.tmpl
@@ -4,14 +4,15 @@
<head>
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<link rel="icon" type="image/png" href="/static/favicon.png">
+ <link rel="stylesheet" href="/static/style.css">
<title>{{.Title}}</title>
</head>
<frameset cols="424px,*">
<frameset rows="316px,*">
- <frame name="nav" src="/nav">
- <frame name="notification" src="/notifications">
+ <frame name="nav" src="/nav" {{if $.Ctx.DarkMode}}class="dark"{{end}}>
+ <frame name="notification" src="/notifications" {{if $.Ctx.DarkMode}}class="dark"{{end}}>
</frameset>
- <frame name="main" src="/timeline/home">
+ <frame name="main" src="/timeline/home" {{if $.Ctx.DarkMode}}class="dark"{{end}}>
</frameset>
</html>
{{end}}