lighten non-terminal path components
This commit is contained in:
parent
4fbd9e19c8
commit
ee08c9ae77
2 changed files with 19 additions and 3 deletions
|
@ -85,6 +85,10 @@ nav .file {
|
|||
opacity: .8;
|
||||
}
|
||||
|
||||
nav .not-last {
|
||||
opacity: .5;
|
||||
}
|
||||
|
||||
footer {
|
||||
padding: 1em 0;
|
||||
color: gray;
|
||||
|
|
|
@ -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>
|
||||
|
|
Loading…
Reference in a new issue