templates/app.html

52 lines · 2285 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<p class="back"><a href="/apps/">&larr; all apps</a></p>
 8<article class="app"{% if page.keywords.tint %} style="--tint: {{ page.keywords.tint }}"{% endif %}>
 9  {% set art_class = "app-art app-hero" %}{% include "partials/app-art.html" %}
10
11  <header class="app-head">
12    {% include "partials/app-icon.html" %}
13    <div class="app-id">
14      <h1 class="app-name">{{ page.title }}</h1>
15      <p class="app-tagline">{{ page.keywords.tagline | default(page.keywords.description) }}</p>
16      {% if page.keywords.platforms %}<p class="app-meta">{{ page.keywords.platforms | replace(", ", " · ") }}</p>{% endif %}
17    </div>
18    <div class="app-cta">
19      {% include "partials/app-store.html" %}
20      {% if page.keywords.repo %}<a class="btn" href="{{ page.keywords.repo }}">source &rarr;</a>{% endif %}
21    </div>
22  </header>
23
24  {#- #+HIGHLIGHT_n: is "title | text"; #+SHOT_n: is "src | alt | caption". #}
25  {% if page.keywords.highlight_1 %}
26  <ul class="app-highlights">
27    {% for i in range(1, 21) if page.keywords["highlight_" ~ i] %}{% set h = page.keywords["highlight_" ~ i] | split(" | ") %}
28    <li><h2>{{ h[0] }}</h2><p>{{ h[1] }}</p></li>
29    {% endfor %}
30  </ul>
31  {% endif %}
32
33  {% if page.keywords.shot_1 %}
34  <div class="shots" tabindex="0" aria-label="Screenshots">
35    {% for i in range(1, 21) if page.keywords["shot_" ~ i] %}{% set s = page.keywords["shot_" ~ i] | split(" | ") %}
36    <figure><img loading="lazy" src="{{ s[0] }}" alt="{{ s[1] }}"><figcaption>{{ s[2] }}</figcaption></figure>
37    {% endfor %}
38  </div>
39  {% endif %}
40
41  <div class="prose app-body">
42    {% if page.keywords.description %}<p class="lede">{{ page.keywords.description }}</p>{% endif %}
43    {{ body | safe }}
44  </div>
45
46  <p class="app-foot">
47    {% if page.keywords.appstore %}<a href="{{ page.keywords.appstore }}">app store</a>{% endif %}
48    {% if page.keywords.repo %}<a href="{{ page.keywords.repo }}">source</a>{% endif %}
49    {% if page.keywords.privacy %}<a href="{{ page.keywords.privacy }}">privacy policy</a>{% endif %}
50  </p>
51</article>
52{% endblock %}