templates/app.html

54 lines · 2344 bytes

 1{% extends "base.html" %}
 2
 3{% block title %}{{ page.title | lower }} · {{ config.title }}{% endblock title %}
 4{% block description %}{{ page.description | default(value=config.description) }}{% endblock description %}
 5
 6{% block content %}
 7<p class="back"><a href="{{ get_url(path="@/apps/_index.md") | safe }}">&larr; all apps</a></p>
 8<article class="app"{% if page.extra.tint %} style="--tint: {{ page.extra.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.extra.tagline | default(value=page.description) }}</p>
16      {% if page.extra.platforms %}<p class="app-meta">{{ page.extra.platforms | join(sep=" · ") }}</p>{% endif %}
17    </div>
18    <div class="app-cta">
19      {% include "partials/app-store.html" %}
20      {% if page.extra.link %}<a class="btn" href="{{ page.extra.link }}">{{ page.extra.link_label | default(value="source") | lower }} &rarr;</a>{% endif %}
21    </div>
22  </header>
23
24  {% if page.extra.highlights %}
25  <ul class="app-highlights">
26    {% for h in page.extra.highlights %}
27    <li><h2>{{ h.title }}</h2><p>{{ h.text }}</p></li>
28    {% endfor %}
29  </ul>
30  {% endif %}
31
32  {% if page.extra.screenshots %}
33  <div class="shots" tabindex="0" aria-label="Screenshots">
34    {% for s in page.extra.screenshots %}
35    <figure><img loading="lazy" src="{{ s.src }}" alt="{{ s.alt }}"><figcaption>{{ s.caption }}</figcaption></figure>
36    {% endfor %}
37  </div>
38  {% endif %}
39
40  <div class="prose app-body">
41    {% if page.description %}<p class="lede">{{ page.description }}</p>{% endif %}
42    {{ page.content | safe }}
43  </div>
44
45  <p class="app-foot">
46    {% if page.extra.appstore %}<a href="{{ page.extra.appstore }}">app store</a>{% endif %}
47    {% if page.extra.link %}<a href="{{ page.extra.link }}">{{ page.extra.link_label | default(value="source") | lower }}</a>{% endif %}
48    {% if page.extra.privacy %}
49    {% if "://" in page.extra.privacy %}{% set privacy_url = page.extra.privacy %}{% else %}{% set privacy_url = get_url(path=page.extra.privacy) %}{% endif %}
50    <a href="{{ privacy_url | safe }}">privacy policy</a>
51    {% endif %}
52  </p>
53</article>
54{% endblock content %}