Seznam tagů z kategorie
This commit is contained in:
parent
fbba83194e
commit
ce7460686e
@ -1,18 +1,23 @@
|
||||
.taglist .tag {
|
||||
margin-right:$tag-margin-right;
|
||||
padding:$tag-padding;
|
||||
background:$tag-background;
|
||||
color:$tag-color;
|
||||
border-radius:$tag-border-radius;
|
||||
border:1px solid #aaa;
|
||||
font-size:$tag-font-size;
|
||||
display:inline-block;
|
||||
margin-right: $tag-margin-right;
|
||||
background: $tag-background;
|
||||
color: $tag-color;
|
||||
border-radius: $tag-border-radius;
|
||||
border: 1px solid #aaa;
|
||||
font-size: $tag-font-size;
|
||||
display: inline-block;
|
||||
|
||||
a {
|
||||
color:$tag-color;
|
||||
display: block;
|
||||
color: $tag-color;
|
||||
white-space: nowrap;
|
||||
padding: $tag-padding;
|
||||
|
||||
&:hover {
|
||||
color:lighten($anchor-hover-color,40);
|
||||
color: $primary;
|
||||
}
|
||||
}
|
||||
}
|
||||
.taglist.centering {
|
||||
justify-content: center;
|
||||
}
|
||||
|
@ -3,6 +3,9 @@
|
||||
{% block content %}
|
||||
<main>
|
||||
<h2>{{ term.name | capitalize() }}</h2>
|
||||
<div class="taglist centering">
|
||||
{{ macro::tags_in_category() }}
|
||||
</div>
|
||||
<hr>
|
||||
<section class="list">
|
||||
{% for page in term.pages %}
|
||||
|
@ -39,6 +39,20 @@
|
||||
</ul>
|
||||
{% endmacro subnav %}
|
||||
|
||||
{% macro tags_in_category() %}
|
||||
{% set_global tags = [] %}
|
||||
{% for page in term.pages %}
|
||||
{% for tag in page.taxonomies.tagy %}
|
||||
{% set_global tags = tags | concat(with=tag) %}
|
||||
{% endfor %}
|
||||
{% endfor %}
|
||||
|
||||
{% set_global tags = tags | sort | unique %}
|
||||
{% for tag in tags %}
|
||||
<span class="tag"><a href="{{ get_taxonomy_url(kind="tagy", name=tag) }}">{{ tag }}</a></span>
|
||||
{% endfor %}
|
||||
{% endmacro tags_in_category %}
|
||||
|
||||
{% macro recipe_image() %}
|
||||
{% for asset in page.assets %}
|
||||
{% if asset is matching("[img.](jpg|png)$") %}
|
||||
|
Loading…
Reference in New Issue
Block a user