summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPrefetch2020-04-06 20:03:53 +0200
committerPrefetch2020-04-06 20:03:53 +0200
commitd7695acb4a70f5fb7cc9cce0b65c71fd3e0380aa (patch)
treef5d8fa8c8cff7e3e355555c9812ed50374843dc9
parent91f46a8893c7902573f5bbc4277b49ff9fd82e7c (diff)
Make every page a single request
-rw-r--r--static/main.css39
-rw-r--r--templates/index.html2
-rw-r--r--templates/main.css33
3 files changed, 34 insertions, 40 deletions
diff --git a/static/main.css b/static/main.css
deleted file mode 100644
index 62f4d73..0000000
--- a/static/main.css
+++ /dev/null
@@ -1,39 +0,0 @@
-body {
- background-color: #fcfcfc;
- color: #232629;
- max-width:72ch;
- text-align:justify;
- margin:auto;
- padding:1em 0;
- font-family: sans-serif;
-}
-
-.content { min-height: calc(100vh - 20ch); }
-
-a {text-decoration:none;color:#1d99f3;}
-
-h1 {text-align:center;font-size:2rem;}
-h2 {text-align:center;font-size:1.5rem;}
-h3 {text-align:center;font-size:1rem;}
-
-.nav a:link {color:#232629;}
-.nav a:visited{color:#232629;}
-.nav a:hover {color:#1d99f3;}
-.nav a:focus {color:#1d99f3;}
-.nav a:active {color:#1d99f3;}
-
-.nav {height:2rem;font-size:2rem;}
-.navl {width:30%;float:left;text-align:left;}
-.navr {width:70%;float:left;text-align:right;}
-
-@media (prefers-color-scheme: dark) {
-body {
- background-color: #232629;
- color: #fcfcfc;
-}
-.nav a:link {color:#fcfcfc;}
-.nav a:visited{color:#fcfcfc;}
-.nav a:hover {color:#1d99f3;}
-.nav a:focus {color:#1d99f3;}
-.nav a:active {color:#1d99f3;}
-}
diff --git a/templates/index.html b/templates/index.html
index a8e95d3..a485d5f 100644
--- a/templates/index.html
+++ b/templates/index.html
@@ -3,7 +3,7 @@
<head>
<meta charset="utf-8">
<title>{% block title %}{{ config.title }}{% endblock title %}</title>
-<link rel="stylesheet" href="/main.css">
+<style>{{ load_data(path="templates/main.css") }}</style>
<link rel="icon" href="data:,">
</head>
<body>
diff --git a/templates/main.css b/templates/main.css
new file mode 100644
index 0000000..23c72aa
--- /dev/null
+++ b/templates/main.css
@@ -0,0 +1,33 @@
+body {
+ background-color:#fcfcfc;
+ color:#232629;
+ max-width:72ch;
+ text-align:justify;
+ margin:auto;
+ padding:1em 0;
+ font-family:sans-serif;
+ line-height:1.3;
+}
+a {text-decoration:none;color:#1d99f3;}
+h1 {text-align:center;font-size:2rem;}
+h2 {text-align:center;font-size:1.6rem;}
+h3 {text-align:center;font-size:1.2rem;}
+.nav a:link {color:#232629;}
+.nav a:visited{color:#232629;}
+.nav a:hover {color:#1d99f3;}
+.nav a:focus {color:#1d99f3;}
+.nav a:active {color:#1d99f3;}
+.nav {height:3rem;font-size:2.5rem;}
+.navl {width:30%;float:left;text-align:left;}
+.navr {width:70%;float:left;text-align:right;}
+@media (prefers-color-scheme: dark) {
+ body {
+ background-color:#232629;
+ color:#fcfcfc;
+ }
+ .nav a:link {color:#fcfcfc;}
+ .nav a:visited{color:#fcfcfc;}
+ .nav a:hover {color:#1d99f3;}
+ .nav a:focus {color:#1d99f3;}
+ .nav a:active {color:#1d99f3;}
+}