diff options
Diffstat (limited to 'templates')
-rw-r--r-- | templates/home.html | 22 | ||||
-rw-r--r-- | templates/index.html | 2 | ||||
-rw-r--r-- | templates/main.css | 33 | ||||
-rw-r--r-- | templates/page.html | 11 |
4 files changed, 45 insertions, 23 deletions
diff --git a/templates/home.html b/templates/home.html new file mode 100644 index 0000000..6fb143b --- /dev/null +++ b/templates/home.html @@ -0,0 +1,22 @@ +<!DOCTYPE html> +<html> +<head> +<meta charset="utf-8"> +<title>{% block title %}{{ config.title }}{% endblock title %}</title> +<style>{{ load_data(path="templates/main.css") }}</style> +<link rel="icon" href="data:,"> +</head> +<body> +<div class="nav"> +<div class="navl"><a href="/">PREFETCH</a></div> +<div class="navr"> +<a href="/blog/">blog</a> <a href="/code/">code</a> +</div> +</div> +<hr> +<img src="/logo256.gif" style="float:left;margin-right:16px;border:2px solid #666"> +{% block content %}{{ section.content | safe }}{% endblock content %} +<hr> +© "Prefetch". Licensed under <a href="https://creativecommons.org/licenses/by-sa/4.0/">CC BY-SA 4.0</a>. +</body> +</html> diff --git a/templates/index.html b/templates/index.html index a485d5f..a36d335 100644 --- a/templates/index.html +++ b/templates/index.html @@ -14,9 +14,7 @@ </div> </div> <hr> -<div class="content"> {% block content %}{{ section.content | safe }}{% endblock content %} -</div> <hr> © "Prefetch". Licensed under <a href="https://creativecommons.org/licenses/by-sa/4.0/">CC BY-SA 4.0</a>. </body> diff --git a/templates/main.css b/templates/main.css index 23c72aa..5e64cb4 100644 --- a/templates/main.css +++ b/templates/main.css @@ -1,6 +1,6 @@ body { - background-color:#fcfcfc; - color:#232629; + background:#ddd; + color:#222; max-width:72ch; text-align:justify; margin:auto; @@ -8,26 +8,17 @@ body { 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;} +a {text-decoration:none;color:#00f;} +h1,h2,h3 {text-align:center} +h1 {font-size:200%;} +h2 {font-size:160%;} +h3 {font-size:120%;} +.nav {height:3rem;font-size:250%;} +.nav a:link,a:visited {color:#222;} +.nav a:hover,a:focus,a:active {color:#00f;} .navl {width:30%;float:left;text-align:left;} .navr {width:70%;float:left;text-align:right;} +pre {filter:invert(100%);} @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;} + body {background:#222;filter:invert(100%);} } diff --git a/templates/page.html b/templates/page.html index 8058656..2144e35 100644 --- a/templates/page.html +++ b/templates/page.html @@ -3,5 +3,16 @@ {{ config.title }} | {{ page.title }} {% endblock title %} {% block content %} + <h1>{{ page.title }}</h1> + {% for h1 in page.toc %} + <ul>{% for h2 in h1.children %} + <li><a href="{{ h2.permalink | safe }}">{{ h2.title }}</a> + {% if h2.children %} + <ul>{% for h3 in h2.children %} + <li><a href="{{ h3.permalink | safe }}">{{ h3.title }}</a></li> + {% endfor %}</ul> + {% endif %}</li> + {% endfor %}</ul> + {% endfor %} {{ page.content | safe }} {% endblock content %} |