This commit is contained in:
@@ -2,9 +2,10 @@
|
||||
{% from "macros/tag-links.html" import tag_links with context %}
|
||||
{% block body %}
|
||||
{% set filter_tags = namespace(values=[]) %}
|
||||
{% if this._id in ['blog', 'articles'] %}
|
||||
{% if this._id in ['blog', 'articles', 'projects'] %}
|
||||
{% for item in this.children %}
|
||||
{% for tag in item.tags %}
|
||||
{% set item_tags = item.taxonomy_tags if item._model == 'project' else item.tags %}
|
||||
{% for tag in item_tags %}
|
||||
{% if tag not in filter_tags.values %}{% set filter_tags.values = filter_tags.values + [tag] %}{% endif %}
|
||||
{% endfor %}
|
||||
{% endfor %}
|
||||
@@ -30,13 +31,13 @@
|
||||
{% endif %}
|
||||
<div class="card-grid">
|
||||
{% for item in this.children %}
|
||||
<article class="entry-card accent-{{ item.kicker|lower }}"{% if filter_tags.values %} data-filter-item data-tags="{{ item.tags|join(' ') }}"{% endif %}>
|
||||
{% set item_tags = item.taxonomy_tags if item._model == 'project' else item.tags %}
|
||||
<article class="entry-card accent-{{ item.kicker|lower }}"{% if filter_tags.values %} data-filter-item data-tags="{{ item_tags|join(' ') }}"{% endif %}>
|
||||
<div class="entry-meta"><span class="label">{{ item.kicker }}</span><time>{{ item.date|dateformat('YYYY.MM.dd') }}</time></div>
|
||||
<h2><a href="{{ item|url }}">{{ item.title }}</a></h2>
|
||||
<p>{{ item.summary }}</p>
|
||||
{% if item.tags %}
|
||||
{% if item._model == 'project' %}<div class="technology-list entry-tags">{% for tag in item.technology_tags %}<span>{{ tag }}</span>{% endfor %}</div>
|
||||
{% else %}<div class="entry-tags">{{ tag_links(item.tags) }}</div>{% endif %}
|
||||
{% if item_tags %}
|
||||
<div class="entry-tags{% if item._model == 'project' %} technology-list{% endif %}">{{ tag_links(item_tags) }}</div>
|
||||
{% endif %}
|
||||
<a class="read-more" href="{{ item|url }}">{% if item._model == 'project' %}View project{% else %}Read entry{% endif %} →</a>
|
||||
</article>
|
||||
|
||||
Reference in New Issue
Block a user