nasg/archive.html

169 lines
4.7 KiB
HTML

{% include 'block_header_open.html' %}
<title>{%- if taxonomy.name -%}{{ taxonomy.name ~ ' | ' ~ site.domain }}{%- else -%}{{ site.title }}{%- endif -%}</title>
<link rel="alternate" type="application/rss+xml" title="{{ title }} RSS Feed" href="{{ site.url}}{{ taxonomy.url }}feed" />
{% include 'block_header_close.html' %}
<section class="content-body h-feed">
<aside class="follow">
<a
onclick="(function(btn){var z=document.createElement('script');document.subtomeBtn=btn;z.src='https://www.subtome.com/load.js';document.body.appendChild(z);})(this)"
value="Subscribe"
data-subtome-resource="{{ site.url}}{{ taxonomy.url }}"
data-subtome-feeds="{{ site.url}}{{ taxonomy.url }}feed"
data-subtome-suggested-service-name="Blogtrottr"
data-subtome-suggested-service-url="http://blogtrottr.com/?subscribe={feed}"
href="https://www.subtome.com/?subs/#/subscribe?resource={{ site.url ~ taxonomy.url|urlencode() }}&feeds={{ site.url ~ taxonomy.url ~ 'feed'|urlencode() }}&suggestedUrl={{ 'http://blogtrottr.com/?subscribe={feed}'|urlencode() }}&suggestedName=Blogtrottr"
title="subscribe to {{ site.url}}{{ taxonomy.url }}">
<svg class="icon"><use xlink:href="#icon-subscribe" /></svg>
follow{% if taxonomy.name %} "{{ taxonomy.name }}"{% endif%}
</a>
</aside>
{% if taxonomy.name %}
<h1 class="p-name hide">{{ taxonomy.name }}</h1>
{% endif %}
{% if taxonomy.description %}
<p class="p-summary">{{ taxonomy.description }}</p>
{% endif %}
{% for post in posts %}
{% if ( ( post.category == 'photo' ) ) %}
{% set hentry = 'photo' %}
{% elif ( ( post.category == 'article' ) or (post.category == 'journal' ) ) %}
{% set hentry = 'article' %}
{% elif ( ( post.category == 'note' ) or ( post.category == 'reply' ) ) %}
{% set hentry = 'note' %}
{% elif ( post.category == 'favorite' ) %}
{% set hentry = 'favorite' %}
{% else %}
{% set hentry = 'status' %}
{% endif %}
<article class="h-entry hentry h-{{ hentry }}"{% if post and post.lang %} lang="{{ post.lang }}"{% endif %}>
<header>
{% if post.reactions %}
{% include 'block_reaction.html' %}
{% elif post.title|length %}
<h2>
<a href="/{{ post.slug }}" title="{{ post.title }}">
<span class="p-name entry-title">
{{ post.title }}
</span>
</a>
</h2>
{% endif %}
<aside class="pubdate{% if post.bookmark or post.repost %} hide{% endif %}">
<a class="u-url u-uuid" href="{{ site.url}}/{{ post.slug }}/"></a>
<a title="{{ post.title }}" href="/{{ post.slug }}">
<time class="dt-published" datetime="{{ post.published|date('c') }}">
{{ post.published|date('%Y-%m-%d %H:%M') }}
</time>
</a>
</aside>
</header>
{% if hentry == "article" %}
<div class="e-summary entry-summary">
{{ post.sumhtml }}
<span class="more">
<a href="/{{ post.slug }}" title="{{ post.title }}"></a>
</span>
<br class="clear" />
</div>
{% else %}
<div class="e-content entry-content">
{% if ( post.photo ) %}
{% include 'block_photo.html' %}
{% endif %}
{% if ( post.exif ) %}
{% include 'block_exif.html' %}
{% endif %}
{{ post.html }}
</div>
{% endif %}
<footer class="hide">
{% include 'block_author.html' %}
</footer>
</article>
{% endfor %}
</section>
{% if taxonomy.total > 1 %}
{# based on: http://dev.dbl-a.com/symfony-2-0/symfony2-and-twig-pagination/ #}
<nav class="pagination">
<ul>
{% if taxonomy.paged > 1 %}
{% set prev = taxonomy.paged - 1 %}
<li>
<a rel="prev" href="{{ taxonomy.url }}page/{{ prev }}">«</a>
</li>
<li>
<a rel="prev" href="{{ taxonomy.url }}">1</a>
</li>
{% endif %}
{% if taxonomy.paged - 4 > 0 %}
<li>
<span class="page-numbers dots"></span>
</li>
{% endif %}
{% if ( taxonomy.paged - 1 > 1 ) %}
<li>
<a href="{{ taxonomy.url }}page/{{ taxonomy.paged - 1 }}">{{ taxonomy.paged - 1 }}</a>
</li>
{% endif %}
<li>
<span class="page-numbers taxonomy.paged">{{ taxonomy.paged }}</span>
</li>
{% if ( taxonomy.paged + 1 <= taxonomy.total -1 ) %}
<li>
<a href="{{ taxonomy.url }}page/{{ taxonomy.paged + 1 }}">{{ taxonomy.paged + 1 }}</a>
</li>
{% endif %}
{% if taxonomy.paged + 3 < taxonomy.total %}
<li>
<span class="page-numbers dots"></span>
</li>
{% endif %}
{% if taxonomy.paged != taxonomy.total %}
<li>
<a href="{{ taxonomy.url }}page/{{ taxonomy.total }}">{{ taxonomy.total }}</a>
</li>
{% endif %}
{% if taxonomy.paged < taxonomy.total %}
{% set next = taxonomy.paged + 1 %}
<li>
<a rel="next" href="{{ taxonomy.url }}page/{{ next }}">»</a>
</li>
{% endif %}
</ul>
</nav>
{% endif %}
{% include 'block_footer.html' %}