diff options
| author | foswret <foswret@posteo.com> | 2026-03-22 12:54:35 -0500 |
|---|---|---|
| committer | foswret <foswret@posteo.com> | 2026-03-22 12:54:35 -0500 |
| commit | 73b06c31b505d1a0f2e4035c7daab0df49a25d3b (patch) | |
| tree | 778e996fcf635de175ae03d91e8353db5a364e29 | |
| parent | d300415652d513a54c214c894e996036d2c999ce (diff) | |
implement basic nav bar
| -rw-r--r-- | .gitignore | 1 | ||||
| -rw-r--r-- | static/style.css | 18 | ||||
| -rw-r--r-- | templates/base.html | 11 | ||||
| -rw-r--r-- | templates/index.html | 1 | ||||
| -rw-r--r-- | templates/page.html | 6 | ||||
| -rw-r--r-- | templates/partials/header.html | 4 | ||||
| -rw-r--r-- | templates/partials/nav.html | 7 | ||||
| -rw-r--r-- | theme.toml | 2 |
8 files changed, 44 insertions, 6 deletions
diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..b43bf86 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +README.md diff --git a/static/style.css b/static/style.css new file mode 100644 index 0000000..73c3565 --- /dev/null +++ b/static/style.css @@ -0,0 +1,18 @@ +html { + /* overflow-y needed for chromium browsers to not shift */ + overflow-y: scroll; +} + +nav { + display: inline; +} + +body { + /* margin: 0 auto; */ + max-width: 50%; +} + +img { + /* pixelated for aesthetics */ + image-rendering: pixelated; +} diff --git a/templates/base.html b/templates/base.html index aba4506..752d091 100644 --- a/templates/base.html +++ b/templates/base.html @@ -2,15 +2,18 @@ <html lang="en"> <head> - <meta charset="utf-8"> + <meta charset="utf-8" name="viewport" + content="width=device-width, initial-scale=1, maximum-scale=1"> + <link rel="stylesheet" href="{{ get_url(path='style.css', cachebust=true) }}"> <title>CHANGE ME</title> </head> +{% include "partials/header.html" %} +{% include "partials/nav.html" %} + <body> <section class="section"> - <div class="container"> - {% block content %} {% endblock content %} - </div> + {% block content %} {% endblock content %} </section> </body> diff --git a/templates/index.html b/templates/index.html index 560c000..795d85a 100644 --- a/templates/index.html +++ b/templates/index.html @@ -4,5 +4,4 @@ <h1 class="title"> This is a blog made with Zola. </h1> -<p><a href="{{ get_url(path='@/posts/_index.md') }}">Posts</a>.</p> {% endblock content %} diff --git a/templates/page.html b/templates/page.html new file mode 100644 index 0000000..88c852e --- /dev/null +++ b/templates/page.html @@ -0,0 +1,6 @@ +{% extends "base.html" %} + +{% block content %} +{{ section.content | safe }} +{% endblock content %} + diff --git a/templates/partials/header.html b/templates/partials/header.html new file mode 100644 index 0000000..9dbc6eb --- /dev/null +++ b/templates/partials/header.html @@ -0,0 +1,4 @@ +<!-- if "title" is set in config.toml, display site name --> +{% if config.title %} + <h1>{{ config.title }}</h1> +{% endif %} diff --git a/templates/partials/nav.html b/templates/partials/nav.html new file mode 100644 index 0000000..f8c0eff --- /dev/null +++ b/templates/partials/nav.html @@ -0,0 +1,7 @@ +{% if config.extra.navbar_items %} +{% for item in config.extra.navbar_items %} +<nav> + <a href="{{ get_url(path=item.url) }}">{{ item.name }}</a> +</nav> +{% endfor %} +{% endif %} @@ -1,7 +1,7 @@ name = "shawl" description = "A simple, unintrusive theme for Zola." -license = "GPLv3" +license = "AGPL" homepage = "https://foswret.com/shawl" min_version = "0.22.1" |
