nasg/templates/Category.j2.html

141 lines
5.1 KiB
HTML

{% extends "base.j2.html" %}
{% block lang %}{% endblock %}
{% block licence %}
<link rel="license" href="https://spdx.org/licenses/{{ site.licence }}.html" type="{{ site.licence }}" />
{% endblock %}
{% block title %}{{ category.title }}{% endblock %}
{% block meta %}
<link rel="alternate" type="application/rss+xml" title="{{ category.title }} RSS feed" href="{{ category.feed }}" />
<link rel="alternate" type="application/atom+xml" title="{{ category.title }} ATOM feed" href="{{ category.feed }}atom.xml" />
{% endblock %}
{% block content %}
<main class="content-body h-feed hfeed {{ category.name }}" property="h-feed">
<header>
<h1 class="p-name" property="p-name">{{ category.name }}</h1>
</header>
{% set year = [0] %}
{% for post in posts %}
{% set _year = year.pop() %}
{% if category.display == 'flat' and _year != post.year %}
<h2>{{ post.year }}</h2>
{% endif %}
{% set _ = year.append(post.year)%}
<article class="h-entry hentry singular" property="h-entry" lang="{{ post.lang }}" itemprop="blogPost" itemscope="" itemtype="http://schema.org/BlogPosting" itemref="author">
<header>
{% if category.display == 'flat' %}
<h3 class="p-name entry-title" property="p-name" itemprop="name headline" >
{% else %}
<h2 class="p-name entry-title" property="p-name" itemprop="name headline" >
{% endif %}
{% if post.is_reply %}
<svg class="icon" width="16" height="16">
<use xlink:href="#icon-reply" />
</svg>
<a href="{{ post.url }}/" class="u-url bookmark" property="u-url" itemprop="url mainEntityOfPage">
RE:
</a>
<a href="{{ post.is_reply }}" class="u-in-reply-to" property="u-in-reply-to">
{{ post.is_reply }}
</a>
{% else %}
<a href="{{ post.url }}" title="{{ post.title }}" class="u-url bookmark" property="u-url" itemprop="url mainEntityOfPage">
<span class="entry-title p-name" property="p-name">{{ post.title }}</span>
</a>
{% endif %}
{% if category.display == 'flat' %}
</h3>
{% else %}
</h2>
{% endif %}
</header>
{% if post.summary %}
<div class="e-summary entry-summary" property="e-summary" itemprop="description">
{{ post.html_summary }}
<p class="more">
<a href="{{ post.url }}" title="{{ post.title }}">
{% if post.lang == 'hu' %}Tovább »{% else %}Continue »{% endif %}
</a>
</p>
</div>
{% else %}
<div class="e-content entry-content" property="e-content" itemprop="articleBody">
{{ post.html_content }}
</div>
{% endif %}
<footer aria-hidden="true" hidden="hidden">
<span class="published updated">
<time class="dt-published dt-updated" property="dt-published dt-updated" datetime="{{ post.pubtime }}" itemprop="dateModified datePublished">{{ post.pubdate }}</time>
</span>
{% if not post.has_mainimg %}
<img src="{{ author.avatar }}"
itemprop="image"
width="0"
height="0"
alt="Photo of {{ author.name }}" />
{% endif %}
<p class="p-author h-card vcard" property="p-author h-card">
<img class="photo avatar u-photo u-avatar"
property="u-photo u-avatar"
src="{{ author.avatar }}"
alt="Photo of {{ author.name }}" />
<a class="fn p-name url u-url u-uid"
property="p-name u-url u-uid"
href="{{ author.url }}"
rel="author">
{{ author.name }}
</a>
<a class="u-email email" property="u-email" href="mailto:{{ author.email }}">
{{ author.email }}
</a>
</p>
</footer>
</article>
{% endfor %}
</main>
{% endblock %}
{% block pagination %}
{% if category.display != 'flat' %}
<nav>
<ul>
{% if category.previous %}
<li>
<a rel="prev" href="{{ category.previous.url }}">
<i>«</i>
<strong>{{ category.previous.label }}</strong>
{% if category.currentyear != category.previous.label %}
Jan - Dec
{% endif %}
</a>
</li>
{% endif %}
<li>
<span class="current">
{{ category.current }}
{% if category.currentyear != category.current %}
Jan - Dec
{% endif %}
</span>
</li>
{% if category.next %}
<li>
<a rel="next" href="{{ category.next.url }}">
<strong>{{ category.next.label }}</strong>
Jan - Dec
<i>»</i>
</a>
</li>
{% endif %}
</ul>
</nav>
{% endif %}
{% endblock %}