From ed4a08d090b0cdc325e176cc18de8860d02e6a8c Mon Sep 17 00:00:00 2001 From: magicfelix <felix@felix-zauberer.de> Date: Mon, 24 Jul 2023 15:33:35 +0200 Subject: [PATCH] Add basic page template --- templates/page.html | 22 ++++++++++++++++++++++ templates/pages/heading.html | 12 ++++++++++++ 2 files changed, 34 insertions(+) create mode 100644 templates/page.html create mode 100644 templates/pages/heading.html diff --git a/templates/page.html b/templates/page.html new file mode 100644 index 00000000..38dabc4c --- /dev/null +++ b/templates/page.html @@ -0,0 +1,22 @@ +{% extends "base.html" %} + +{% block meta %} + {% if page.description %} + <meta name="description" content="{{ page.description }}" /> + {% elif config.description %} + <meta name="description" content="{{ config.description }}" /> + {% endif %} +{% endblock %} + +{% block title %} + {{ page.title }} +{% endblock %} + +{% block main %} + {% include "pages/heading.html" %} + <div class="my-4"> + <div class="content"> + {{ page.content | safe }} + </div> + </div> +{% endblock %} diff --git a/templates/pages/heading.html b/templates/pages/heading.html new file mode 100644 index 00000000..bd049d99 --- /dev/null +++ b/templates/pages/heading.html @@ -0,0 +1,12 @@ +<section class="hero is-small"> + <div class="hero-body"> + <div class="container has-text-centered"> + <h1 class="title mb-0"><a href="{{ page.permalink }}">{{ page.title }}</a></h1> + {% if page.description %} + <p class="subtitle"> + {{ page.description }} + </p> + {% endif %} + </div> + </div> +</section> -- GitLab