Moved condition outside of tags partial

This commit is contained in:
squidfunk
2023-08-21 18:06:46 +02:00
parent efdb146c30
commit 0de17c6197
4 changed files with 42 additions and 46 deletions

View File

@@ -1,7 +1,7 @@
{#-
This file was automatically generated - do not edit
-#}
{% if "material/tags" in config.plugins %}
{% if "material/tags" in config.plugins and tags %}
{% include "partials/tags.html" %}
{% endif %}
{% include "partials/actions.html" %}

View File

@@ -4,8 +4,7 @@
{% if page.meta and page.meta.hide %}
{% set hidden = "hidden" if "tags" in page.meta.hide %}
{% endif %}
{% if tags %}
<nav class="md-tags" {{ hidden }}>
<nav class="md-tags" {{ hidden }}>
{% for tag in tags %}
{% set icon = "" %}
{% if config.extra.tags %}
@@ -24,5 +23,4 @@
</span>
{% endif %}
{% endfor %}
</nav>
{% endif %}
</nav>

View File

@@ -21,7 +21,7 @@
-->
<!-- Tags -->
{% if "material/tags" in config.plugins %}
{% if "material/tags" in config.plugins and tags %}
{% include "partials/tags.html" %}
{% endif %}

View File

@@ -26,8 +26,7 @@
{% endif %}
<!-- Tags -->
{% if tags %}
<nav class="md-tags" {{ hidden }}>
<nav class="md-tags" {{ hidden }}>
{% for tag in tags %}
{% set icon = "" %}
{% if config.extra.tags %}
@@ -50,5 +49,4 @@
</span>
{% endif %}
{% endfor %}
</nav>
{% endif %}
</nav>