nasg/archive.html
2017-05-23 11:21:10 +01:00

202 lines
No EOL
6.5 KiB
HTML

{% include 'block_header_open.html' %}
{%- if taxonomy.name -%}
{%- set title = taxonomy.name ~ ' | ' ~ site.name -%}
{%- else -%}
{%- set title = site.name -%}
{%- endif -%}
{%- if ( taxonomy.paged > 1 ) -%}
{%- set turl = site.url ~ taxonomy.url ~ taxonomy.paged ~ '/' -%}
{%- else -%}
{%- set turl = site.url ~ taxonomy.url -%}
{%- endif -%}
<title>{{ title }}</title>
<link rel="alternate" type="application/rss+xml" title="{{ title }} RSS Feed" href="{{ site.url}}{{ taxonomy.url }}feed" />
<meta property="og:description" content="{{ taxonomy.description|default(title) }}" />
<meta property="og:locale" content="{{ site.lang }}" />
<meta property="og:site_name" content="{{ site.name }}" />
<meta property="og:title" content="{{ title }}" />
<meta property="og:type" content="website" />
<meta name="og:updated_time" content="{{ posts[0].published|date("c") }}" />
<meta property="og:url" content="{{ turl }}" />
<meta property="og:image" content="{{ site.url }}/theme/favicon.png"/>
<meta name="twitter:card" content="summary" />
<meta name="twitter:description" content="{{ taxonomy.description|default(title) }}" />
{% if site.author.twitter %}<meta name="twitter:site" content="@{{ site.author.twitter }}" />{% endif %}
{% if site.author.twitter %}<meta name="twitter:creator" content="@{{ site.author.twitter }}" />{% endif %}
<meta name="twitter:title" content="{{ title }}" />
<meta name="twitter:image" content="{{ site.url }}/theme/favicon.png">
<meta name="DC.Format" content="text/html" />
<meta name="DC.Title" content="{{ title }}" />
<meta name="DC.Creator" content="{{ site.author.name }}" />
<meta name="DC.Description" content="{{ taxonomy.description|default(title) }}" />
<meta name="DC.Date" content="{{ posts[0].published|date("%Y-%m-%d") }}" />
<meta name="DC.Type" content="collection" />
<meta name="DC.Language" content="{{ site.lang }}" />
<meta name="DC.Source" content="{{ turl }}" />
<meta name="DC.Rights" content="Copyright {{ posts[0].published|date("%Y") }}, {{ site.author.name }} <{{ site.author.email }}>. All rights reserved.">
{% 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' %}
{% else %}
{% set hentry = 'status' %}
{% endif %}
<article class="h-entry h-{{ hentry }}"{% if post and post.lang %} lang="{{ post.lang }}"{% endif %}>
<header>
{% if post.reactions %}
<h2 class="reaction">{% include 'block_reaction.html' %}</h2>
{% elif post.title|length %}
<h2>
<a href="{{ site.url }}/{{ post.slug }}" title="{{ post.title }}">
<span class="p-name">
{{ 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="{{ site.url }}/{{ 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 long">
{%if post.thumbnail %}
<img src="{{ post.thumbnail }}" alt="{{ post.title }}" class="alignleft" />
{% else %}
<svg class="icon large"><use xlink:href="#icon-{{ post.category }}" /></svg>
{% endif %} {{ post.summary }}
<span class="more">
<a href="{{ site.url }}/{{ post.slug }}" title="{{ post.title }}"></a>
</span>
<br class="clear" />
</div>
{% else %}
<div class="e-content">
{{ post.html }}
{% if ( post.exif ) %}
{% include 'block_exif.html' %}
{% endif %}
<br class="clear" />
</div>
{% endif %}
</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 href="{{ site.url}}{{ taxonomy.url }}page/{{ prev }}">«</a>
</li>
<li>
<a href="{{ site.url}}{{ 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="{{ site.url}}{{ 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="{{ site.url}}{{ 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="{{ site.url}}{{ taxonomy.url }}page/{{ taxonomy.total }}">{{ taxonomy.total }}</a>
</li>
{% endif %}
{% if taxonomy.paged < taxonomy.total %}
{% set next = taxonomy.paged + 1 %}
<li>
<a href="{{ site.url}}{{ taxonomy.url }}page/{{ next }}">»</a>
</li>
{% endif %}
</ul>
</nav>
{% endif %}
{% include 'block_footer.html' %}