Skip to content
Snippets Groups Projects
Commit e67e2585 authored by Hugo Trentesaux's avatar Hugo Trentesaux
Browse files

[theme] fix taxonomies in feed

parent 3a45390d
No related branches found
No related tags found
No related merge requests found
Pipeline #17463 passed
......@@ -147,7 +147,7 @@ input.search_input
border: solid 1px gray
color: gray
.authors .author, .date
.authors, .author, .date
color: gray
.sr-only
......
......@@ -27,10 +27,10 @@
{%- endif %}
<div class="w3-mobile w3-col s2 feed-tax">
{%- set tax = article.taxonomies %}
{% if tax.category %}{{ macros::category(category=tax.category )}}{% endif %}
{% if tax.authors %}{{ macros::authors(authors=tax.authors )}}{% endif %}
{% if tax.tags %}{{ macros::tags(tags=tax.tags )}}{% endif %}
<span class="date">{{ article.date }}</span>
{% if tax.category %}<div>{{ macros::category(category=tax.category )}}</div>{% endif %}
{% if tax.authors %}<div>{{ macros::authors(authors=tax.authors )}}</div>{% endif %}
{% if tax.tags %}<div>{{ macros::tags(tags=tax.tags )}}</div>{% endif %}
<div class="date">{{ article.date }}</div>
</div>
<a href="{{url}}" class="w3-mobile w3-rest feed-preview">
<h3>{{ article.title }}</h3>
......
......@@ -80,9 +80,7 @@
{% endfor %}
{%- endmacro %}
{# ================================= #}
{# === sub pages and sub section === #}
{# ================================= #}
{% macro sub(section) %}
<span class="breadcrumb-next">content <i class="fa fa-caret-down"></i>
<ul>
......@@ -96,6 +94,9 @@
</ul></span>
{%- endmacro %}
{# ================== #}
{# === taxonomies === #}
{# ================== #}
{# === tags === #}
{%- macro tags(tags) -%}
......@@ -110,10 +111,11 @@
{# === author === #}
{%- macro authors(authors) -%}
<span class="authors">
<i class="fa fa-user-circle-o"></i>&nbsp;
{%- for author in authors -%}
{%- set url = get_taxonomy_url(kind="authors", name=author) -%}
<a class="author" href="{{url}}"><i class="fa fa-user-circle-o"></i>&nbsp;{{ author }}</a>
{%- endfor -%}
<a class="author" href="{{url}}">{{ author }}</a>{% if not loop.last %}, {% endif %}
{%- endfor %}
</span>
{%- endmacro -%}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment