summaryrefslogtreecommitdiffstats
path: root/templates/macros.html
diff options
context:
space:
mode:
authorJan Tuomi <jan@jantuomi.fi>2026-01-02 15:16:23 +0200
committerJan Tuomi <jan@jantuomi.fi>2026-01-02 16:21:05 +0200
commit5a05ca47edca3a5cf8fad2e19a533faaa1c7b362 (patch)
treee828d52402354f518c12649589544dcf04a7f72e /templates/macros.html
parent0e0701cb3baf603e1773194031ab37ec779dd8ff (diff)
Implement now page
Diffstat (limited to 'templates/macros.html')
-rw-r--r--templates/macros.html17
1 files changed, 17 insertions, 0 deletions
diff --git a/templates/macros.html b/templates/macros.html
index b4cb6d0..3922659 100644
--- a/templates/macros.html
+++ b/templates/macros.html
@@ -26,3 +26,20 @@
{% endfor %}
</ul>
{% endmacro %}
+
+{% macro page_h1(page) %}
+<h1>
+ {{ page.title }}<br />
+ {% if page.date %}
+ <small>({{ page.date }})</small>
+ {% endif %}
+ {% if page.extra.kind %}
+ <small>[{{ page.extra.kind }}]</small>
+ {% endif %}
+</h1>
+{% endmacro %}
+
+{% macro page_content(page) %}
+{{ self::page_h1(page=page) }}
+{{ page.content | replace(from="<!-- toc -->", to=macros::toc(page=page)) | safe }}
+{% endmacro %}