55cc0f3307
- removed the abomination experiment (aka microdata) - added svg source icomoon for the possibility to extend later - rsync moved into nasg.py itself, so the ordering of render - sync - webmentions is ok
134 lines
3.8 KiB
HTML
134 lines
3.8 KiB
HTML
{% extends "base.j2.html" %}
|
|
{% block lang %}{% endblock %}
|
|
{% block title %}{{ category.title }}{% endblock %}
|
|
{% block meta %}
|
|
<link rel="alternate" type="application/atom+xml" title="{{ category.title }} feed" href="{{ category.feed }}" />
|
|
{% endblock %}
|
|
{% block content %}
|
|
<main class="content-body h-feed hfeed">
|
|
<header>
|
|
<h1 class="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" lang="{{ post.lang }}">
|
|
<header>
|
|
{% if category.display == 'flat' %}
|
|
<h3 class="p-name entry-title">
|
|
{% else %}
|
|
<h2 class="p-name entry-title">
|
|
{% 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 u-uuid" rel="bookmark">
|
|
RE:
|
|
</a>
|
|
<a href="{{ post.is_reply }}" class="u-in-reply-to">
|
|
{{ post.is_reply }}
|
|
</a>
|
|
{% else %}
|
|
<a href="{{ post.url }}" title="{{ post.title }}" rel="bookmark" class="u-url u-uuid">
|
|
{{ post.title }}
|
|
</a>
|
|
{% endif %}
|
|
{% if category.display == 'flat' %}
|
|
</h3>
|
|
{% else %}
|
|
</h2>
|
|
{% endif %}
|
|
</header>
|
|
|
|
{% if post.summary %}
|
|
<div class="e-summary entry-summary">
|
|
{{ 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">
|
|
{{ post.html_content }}
|
|
</div>
|
|
{% endif %}
|
|
</article>
|
|
{% endfor %}
|
|
</main>
|
|
{% endblock %}
|
|
{% block pagination %}
|
|
{% if pages.total > 1 %}
|
|
|
|
{# based on: http://dev.dbl-a.com/symfony-2-0/symfony2-and-twig-pagination/ #}
|
|
<nav>
|
|
<ul>
|
|
{% if pages.current > 1 %}
|
|
{% set prev = pages.current - 1 %}
|
|
<li>
|
|
<a rel="prev" href="{{ category.url }}page/{{ prev }}/">«</a>
|
|
</li>
|
|
<li>
|
|
<a rel="prev" href="{{ category.url }}">1</a>
|
|
</li>
|
|
{% endif %}
|
|
|
|
{% if pages.current - 4 > 0 %}
|
|
<li>
|
|
<span class="dots">…</span>
|
|
</li>
|
|
{% endif %}
|
|
|
|
|
|
{% if ( pages.current - 1 > 1 ) %}
|
|
<li>
|
|
<a href="{{ category.url }}page/{{ pages.current - 1 }}/">{{ pages.current - 1 }}</a>
|
|
</li>
|
|
{% endif %}
|
|
|
|
|
|
<li>
|
|
<span class="current">{{ pages.current }}</span>
|
|
</li>
|
|
|
|
|
|
{% if ( pages.current + 1 <= pages.total -1 ) %}
|
|
<li>
|
|
<a href="{{ category.url }}page/{{ pages.current + 1 }}/">{{ pages.current + 1 }}</a>
|
|
</li>
|
|
{% endif %}
|
|
|
|
|
|
{% if pages.current + 3 < pages.total %}
|
|
<li>
|
|
<span class="dots">…</span>
|
|
</li>
|
|
{% endif %}
|
|
|
|
|
|
{% if pages.current != pages.total %}
|
|
<li>
|
|
<a href="{{ category.url }}page/{{ pages.total }}/">{{ pages.total }}</a>
|
|
</li>
|
|
{% endif %}
|
|
|
|
{% if pages.current < pages.total %}
|
|
{% set next = pages.current + 1 %}
|
|
<li>
|
|
<a rel="next" href="{{ category.url }}page/{{ next }}/">»</a>
|
|
</li>
|
|
{% endif %}
|
|
</ul>
|
|
</nav>
|
|
|
|
{% endif %}
|
|
{% endblock %}
|