templates/page.html

21 lines · 1173 bytes

 1{% extends "base.html" %}
 2
 3{% block title %}{{ page.title | lower }} · {{ site.title }}{% endblock %}
 4{% block description %}{{ page.keywords.description | default(site.description) }}{% endblock %}
 5
 6{% block content %}
 7{#- page.url is <section>/<name>/index.html; the section index is two components up. #}
 8<p class="back"><a href="/{{ (page.url | split("/"))[:-2] | join("/") }}/">&larr; back</a></p>
 9{% if page.keywords.app %}{% set icon_page = pages | selectattr("source", "eq", page.keywords.app) | first %}
10<a class="app-ref"{% if icon_page.keywords.tint %} style="--tint: {{ icon_page.keywords.tint }}"{% endif %} href="/{{ icon_page.url | replace("index.html", "") }}">
11  {% set icon_class = "app-icon app-icon-xs" %}{% include "partials/app-icon.html" %}
12  <span class="app-ref-name">{{ icon_page.title }}</span>
13  <span class="app-ref-desc">{{ icon_page.keywords.tagline | default(icon_page.keywords.description) }}</span>
14</a>
15{% endif %}
16<article class="prose">
17  <h1 class="page-label">{{ page.title }}</h1>
18  {% if page.keywords.description %}<p class="lede">{{ page.keywords.description }}</p>{% endif %}
19  {{ body | safe }}
20</article>
21{% endblock %}