lighten non-terminal path components

master
Tomáš Mládek 2020-12-28 20:28:17 +01:00
parent 4fbd9e19c8
commit ee08c9ae77
2 changed files with 19 additions and 3 deletions

View File

@ -85,6 +85,10 @@ nav .file {
opacity: .8;
}
nav .not-last {
opacity: .5;
}
footer {
padding: 1em 0;
color: gray;

View File

@ -25,9 +25,21 @@
<h1><a href="/">{{garden_title}}</a></h1>
<ul>
{% for file in files %}
<li class="{% if file is containing(".md") %}page{% else %}file{% endif %}">
<a href="/{{file}}">{{file | trim_end_matches(pat=".md")}}</a>
</li>
{% if file is containing(".md") %}
<li class="page">
<a href="/{{file}}">
{% for component in file | trim_end_matches(pat=".md") | split(pat=".") %}
{%- if not loop.last -%}
<span class="not-last">{{component}}.</span>
{%- else -%}
<span>{{component}}</span>
{%- endif -%}
{% endfor %}
</a>
</li>
{% else %}
<li class="file"><a href="/{{file}}">{{file}}</a></li>
{% endif %}
{% endfor %}
</ul>
</nav>