path_components

This commit is contained in:
masnn committed 2020-06-13 12:24:54 +08:00
1 parent 5ca424da0b
commit c93597703e
15 files changed
+134 -130

No files matched your search

+1 -1
View File
@@ -5,7 +5,7 @@
<div class="media__body">
<div class="location-path">
{% for c in path %}
/ {% if loop.index < path.length %}<a href="{{ c[1]|default('#') }}">{{ c[0] if c[2] else _(c[0]) }}</a>{% endif %}
/ {% if loop.index < path.length %}<a href="{{ url(c[1], c[2])|default('#') }}">{{ c[0] if c[3] else _(c[0]) }}</a>{% endif %}
{%- endfor %}
</div>
<h1 class="location-current" data-emoji-enabled>{{ path[path.length - 1][0] if path[path.length - 1][2] else _(path[path.length - 1][0]) }}</h1>