nasg/templates/Category.j2.html
Peter Molnar da02d9ba95 - removed google things, for now, it's not useful
- relurl filter is ready, but not yet in use, because it's a mess
- reworked yearly archives: all page shows all years, no prev/next
- removed property= mf2 tags
- cleanups in markup
- added searchaction schema.org thing
- removed everything-the-same-size-font from style
2019-01-31 22:23:16 +01:00

132 lines
4.3 KiB
HTML

{% extends "base.j2.html" %}
{% block lang %}{% 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" />
<link rel="feed" title="{{ category.title}} feed" href="{{ category.url }}" />
{% endblock %}
{% block pagination %}
{% if category.display != 'flat' %}
<nav>
<ul>
{% for y, url in category.years.items() %}
{% if y == category.year %}
<li>
<span>
{{ y }}
</span>
</li>
{% else %}
<li>
<a href="{{ url }}">
<strong>{{ y }}</strong>
</a>
</li>
{% endif %}
{% endfor %}
</ul>
</nav>
{% endif %}
{% endblock %}
{% block content %}
<main class="content-body h-feed hfeed {{ category.name }}">
<header>
<p>
<svg width="128" height="128"><use xlink:href="#icon-{{ category.name }}" /></svg>
</p>
</header>
{% set year = [0] %}
{% for post in posts %}
{% set _year = year.pop() %}
{% if category.display == 'flat' and _year != post.year %}
{% if not loop.first %}
</section>
{% endif %}
<section>
<h2>{{ post.year }}</h2>
{% endif %}
{% set _ = year.append(post.year)%}
<article class="h-entry hentry singular" lang="{{ post.lang }}" itemprop="blogPost" itemscope="" itemtype="http://schema.org/BlogPosting" itemref="author">
<header>
{% if category.display == 'flat' %}
<h3 class="p-name entry-title" itemprop="name headline" >
{% else %}
<h2 class="p-name entry-title" 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 }}/">
RE:
</a>
<a href="{{ post.is_reply }}" class="u-in-reply-to">
{{ post.is_reply }}
</a>
{% else %}
<a href="{{ post.url }}">
<span class="entry-title p-name">{{ post.title }}</span>
</a>
{% endif %}
{% if category.display == 'flat' %}
</h3>
{% else %}
</h2>
{% endif %}
<a href="{{ post.url }}" itemprop="url mainEntityOfPage" class="u-url bookmark"></a>
</header>
{% if post.summary %}
<div class="e-summary entry-summary" itemprop="description">
{{ post.html_summary }}
<p class="more">
<a href="{{ post.url }}">
{% if post.lang == 'hu' %}Tovább »{% else %}Continue »{% endif %}
</a>
</p>
</div>
{% else %}
<div class="e-content entry-content" itemprop="articleBody">
{{ post.html_content }}
</div>
{% endif %}
<footer aria-hidden="true" hidden="hidden">
<span class="published updated">
<time class="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">
<img class="photo avatar u-photo u-avatar"
src="{{ author.avatar }}"
alt="Photo of {{ author.name }}" />
<a class="fn p-name url u-url u-uid"
href="{{ author.url }}"
rel="author">
{{ author.name }}
</a>
<a class="u-email email" href="mailto:{{ author.email }}">
{{ author.email }}
</a>
</p>
</footer>
</article>
{% if loop.last %}
</section>
{% endif %}
{% endfor %}
</main>
{% endblock %}