aboutsummaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
authorfoswret <foswret@posteo.com>2026-03-22 12:54:35 -0500
committerfoswret <foswret@posteo.com>2026-03-22 12:54:35 -0500
commit73b06c31b505d1a0f2e4035c7daab0df49a25d3b (patch)
tree778e996fcf635de175ae03d91e8353db5a364e29 /templates
parentd300415652d513a54c214c894e996036d2c999ce (diff)
implement basic nav bar
Diffstat (limited to 'templates')
-rw-r--r--templates/base.html11
-rw-r--r--templates/index.html1
-rw-r--r--templates/page.html6
-rw-r--r--templates/partials/header.html4
-rw-r--r--templates/partials/nav.html7
5 files changed, 24 insertions, 5 deletions
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 %}