sites/tobias.raayoni-last.com/raayoni/templates/article.html

39 lines
1.5 KiB
HTML
Raw Normal View History

{% extends "base.html" %}
{% import "_macros.html" as m %}
{% block title %}{{ article.title|striptags }} · {{ SITENAME }}{% endblock %}
{% block meta %}
<meta name="description" content="{{ article.summary|striptags|truncate(180)|e }}">
{% endblock %}
{% block content %}
{% set bg_ok = article.metadata.get('background') and not article.metadata.get('background_missing') %}
{% set th_ok = article.metadata.get('thumb') and not article.metadata.get('thumb_missing') %}
{% set bg = article.metadata.get('background') if bg_ok else (article.metadata.get('thumb') if th_ok else none) %}
{# No hero at all when no image survived: an empty placeholder band is just
dead space above the title. The entry starts under the bar instead. #}
{% if bg %}
<div class="hero" style="background-image:url('{{ SITEURL }}{{ bg }}')">
<div class="scrollcue">scroll</div>
</div>
{% endif %}
<div class="pages">
<article class="frame">
<h1 class="tight">{{ article.title }}</h1>
<div class="entry-meta">
{{ article.date.year }}
· <a href="{{ SITEURL }}/{{ article.category.url }}">{{ article.category }}</a>
{%- if article.metadata.get('project') %} · {{ article.metadata.get('project') }}{% endif %}
{%- if article.tags %} · {% for t in article.tags %}<a href="{{ SITEURL }}/{{ t.url }}">{{ t }}</a>{% if not loop.last %}, {% endif %}{% endfor %}{% endif %}
</div>
{{ m.credits(article) }}
<div class="text body">
{{ article.content }}
</div>
</article>
</div>
{% endblock %}