2018-07-20 16:45:42 +01:00
|
|
|
{% extends "base.j2.html" %}
|
|
|
|
{% block lang %}{% endblock %}
|
|
|
|
{% block title %}{{ category.title }}{% endblock %}
|
|
|
|
{% block meta %}
|
2018-10-10 22:36:48 +01:00
|
|
|
<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" />
|
2018-07-20 16:45:42 +01:00
|
|
|
{% endblock %}
|
|
|
|
{% block content %}
|
2018-08-13 14:57:27 +01:00
|
|
|
<main class="content-body h-feed hfeed">
|
2018-07-20 16:45:42 +01:00
|
|
|
<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)%}
|
|
|
|
|
2018-09-04 21:58:25 +01:00
|
|
|
<article class="h-entry hentry singular" lang="{{ post.lang }}" itemprop="blogPost" itemscope="" itemtype="http://schema.org/BlogPosting" itemref="author">
|
2018-07-20 16:45:42 +01:00
|
|
|
<header>
|
|
|
|
{% if category.display == 'flat' %}
|
2018-09-04 21:58:25 +01:00
|
|
|
<h3 itemprop="name headline" class="p-name entry-title">
|
2018-07-20 16:45:42 +01:00
|
|
|
{% else %}
|
2018-09-04 21:58:25 +01:00
|
|
|
<h2 itemprop="name headline" class="p-name entry-title">
|
2018-07-20 16:45:42 +01:00
|
|
|
{% endif %}
|
2018-08-14 14:56:13 +01:00
|
|
|
{% if post.is_reply %}
|
|
|
|
<svg class="icon" width="16" height="16">
|
|
|
|
<use xlink:href="#icon-reply" />
|
|
|
|
</svg>
|
2018-09-04 21:58:25 +01:00
|
|
|
<a href="{{ post.url }}/" class="u-url bookmark" itemprop="url mainEntityOfPage">
|
2018-08-14 14:56:13 +01:00
|
|
|
RE:
|
|
|
|
</a>
|
|
|
|
<a href="{{ post.is_reply }}" class="u-in-reply-to">
|
|
|
|
{{ post.is_reply }}
|
|
|
|
</a>
|
|
|
|
{% else %}
|
2018-09-04 21:58:25 +01:00
|
|
|
<a href="{{ post.url }}" title="{{ post.title }}" class="u-url bookmark" itemprop="url mainEntityOfPage">
|
|
|
|
<span class="entry-title p-name">{{ post.title }}</span>
|
2018-07-20 16:45:42 +01:00
|
|
|
</a>
|
2018-08-14 14:56:13 +01:00
|
|
|
{% endif %}
|
2018-07-20 16:45:42 +01:00
|
|
|
{% if category.display == 'flat' %}
|
|
|
|
</h3>
|
|
|
|
{% else %}
|
|
|
|
</h2>
|
|
|
|
{% endif %}
|
|
|
|
</header>
|
|
|
|
|
|
|
|
{% if post.summary %}
|
2018-09-04 21:58:25 +01:00
|
|
|
<div class="e-summary entry-summary" itemprop="description">
|
2018-07-25 13:24:31 +01:00
|
|
|
{{ post.html_summary }}
|
2018-07-20 16:45:42 +01:00
|
|
|
<p class="more">
|
2018-08-08 09:42:42 +01:00
|
|
|
<a href="{{ post.url }}" title="{{ post.title }}">
|
2018-07-20 16:45:42 +01:00
|
|
|
{% if post.lang == 'hu' %}Tovább »{% else %}Continue »{% endif %}
|
|
|
|
</a>
|
|
|
|
</p>
|
|
|
|
</div>
|
|
|
|
{% else %}
|
2018-09-04 21:58:25 +01:00
|
|
|
<div class="e-content entry-content" itemprop="articleBody">
|
2018-07-20 16:45:42 +01:00
|
|
|
{{ post.html_content }}
|
|
|
|
</div>
|
|
|
|
{% endif %}
|
2018-09-04 21:58:25 +01:00
|
|
|
|
|
|
|
<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 aria-hidden="true" src="{{ author.avatar }}" itemprop="image" width="0" height="0" />
|
|
|
|
{% 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>
|
2018-07-20 16:45:42 +01:00
|
|
|
</article>
|
|
|
|
{% endfor %}
|
2018-08-13 14:57:27 +01:00
|
|
|
</main>
|
2018-07-20 16:45:42 +01:00
|
|
|
{% endblock %}
|
|
|
|
{% block pagination %}
|
|
|
|
{% if pages.total > 1 %}
|
|
|
|
|
|
|
|
{# based on: http://dev.dbl-a.com/symfony-2-0/symfony2-and-twig-pagination/ #}
|
2018-08-13 14:57:27 +01:00
|
|
|
<nav>
|
2018-07-20 16:45:42 +01:00
|
|
|
<ul>
|
|
|
|
{% if pages.current > 1 %}
|
|
|
|
{% set prev = pages.current - 1 %}
|
|
|
|
<li>
|
2018-08-08 09:42:42 +01:00
|
|
|
<a rel="prev" href="{{ category.url }}page/{{ prev }}/">«</a>
|
2018-07-20 16:45:42 +01:00
|
|
|
</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>
|
2018-08-08 09:42:42 +01:00
|
|
|
<a href="{{ category.url }}page/{{ pages.current - 1 }}/">{{ pages.current - 1 }}</a>
|
2018-07-20 16:45:42 +01:00
|
|
|
</li>
|
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
|
|
|
|
<li>
|
|
|
|
<span class="current">{{ pages.current }}</span>
|
|
|
|
</li>
|
|
|
|
|
|
|
|
|
|
|
|
{% if ( pages.current + 1 <= pages.total -1 ) %}
|
|
|
|
<li>
|
2018-08-08 09:42:42 +01:00
|
|
|
<a href="{{ category.url }}page/{{ pages.current + 1 }}/">{{ pages.current + 1 }}</a>
|
2018-07-20 16:45:42 +01:00
|
|
|
</li>
|
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
|
|
|
|
{% if pages.current + 3 < pages.total %}
|
|
|
|
<li>
|
|
|
|
<span class="dots">…</span>
|
|
|
|
</li>
|
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
|
|
|
|
{% if pages.current != pages.total %}
|
|
|
|
<li>
|
2018-08-08 09:42:42 +01:00
|
|
|
<a href="{{ category.url }}page/{{ pages.total }}/">{{ pages.total }}</a>
|
2018-07-20 16:45:42 +01:00
|
|
|
</li>
|
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
{% if pages.current < pages.total %}
|
|
|
|
{% set next = pages.current + 1 %}
|
|
|
|
<li>
|
2018-08-08 09:42:42 +01:00
|
|
|
<a rel="next" href="{{ category.url }}page/{{ next }}/">»</a>
|
2018-07-20 16:45:42 +01:00
|
|
|
</li>
|
|
|
|
{% endif %}
|
|
|
|
</ul>
|
|
|
|
</nav>
|
|
|
|
|
|
|
|
{% endif %}
|
|
|
|
{% endblock %}
|