nasg/archive.html
2017-08-17 11:33:54 +00:00

207 lines
6.4 KiB
HTML

{% include 'block_header_open.html' %}
{%- if taxonomy.name -%}
{%- set title = taxonomy.name ~ ' | ' ~ site.domain -%}
{%- else -%}
{%- set title = site.title -%}
{%- 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 }}/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 }}/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' %}
{% 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' %}