47 lines
2.1 KiB
Text
47 lines
2.1 KiB
Text
{#
|
|
possible variables:
|
|
- cycling_tag: collection tag to cycle through
|
|
- sidebar: .njk include file as sidebar [optional]
|
|
#}
|
|
|
|
{% extends "_layouts/base.njk" %}
|
|
|
|
{% block content %}
|
|
{% if sidebar %}
|
|
<div id="{{ sidebar }}-sidebar" class="sidebar">
|
|
{% include sidebar + "_sidebar.njk" %}
|
|
</div>
|
|
{% endif %}
|
|
<div id="feed">
|
|
{% set current_year = 0 %}
|
|
{% for post in collections[cycling_tag] | i18n_filter %}
|
|
{% set post_year = post.date | date("yyyy") %}
|
|
{% if post_year != current_year %}
|
|
<h2 class="year-title">{{ post_year }}</h2>
|
|
{% set current_year = post_year %}
|
|
{% endif %}
|
|
<div class="feed-item">
|
|
<h3 id="{{ post.data.title | slugify }}" class="post-title">
|
|
<a href={{ post.url | locale_url_resolve }}>{{ post.data.title }}</a>
|
|
</h3>
|
|
<p class="post-date">{{ post.date | date("dd/MM/yyyy") }}</p>
|
|
{#<p>Debug: {{ post.date }} -> {{ post.date | date("dd/MM/yyyy") }}</p>#}
|
|
{% if post.data.description %}
|
|
<p class="post-description post-content">{{ post.data.description }}</p>
|
|
{% else %}
|
|
<p class="post-excerpt post-content">{% excerpt post %}</p>
|
|
{% endif %}
|
|
{% if post.data.image.url %}
|
|
<a href="{{ post.url | locale_url_resolve }}"><img src="{{ post.data.image.url }}" {% if post.data.image.title %}title="{{ post.data.image.title }}"{% endif %} {% if post.data.image.alt %}alt="{{ post.data.image.alt }}"{% endif %} class="post-image"></a>
|
|
{% endif %}
|
|
<p class="post-link"><a href="{{ post.url | locale_url_resolve }}">{{ "read-more" | i18n }}</a></p>
|
|
</div>
|
|
{% endfor %}
|
|
<div class="end-of-feed">
|
|
<a href="https://www.youtube.com/watch?v=mB5YeQFw1S4" target="_blank">
|
|
<div id="tv"></div>
|
|
</a>
|
|
<p>{{ "end-of-feed" | i18n }}</p>
|
|
</div>
|
|
</div>
|
|
{% endblock content %}
|