feat: reworked the template structure

This commit is contained in:
David Bailey 2024-08-29 20:40:36 +02:00
parent c607d57221
commit c9808f90f8
24 changed files with 216 additions and 80 deletions

View file

@ -0,0 +1,10 @@
<div>
<h1>
{{ post.title }}
</h1>
{% if post.authors %}
Written by {{ post.authors }}
{% endif %}
</div>

View file

@ -0,0 +1,67 @@
<div id="post_file_bar">
<menu id="post_file_titles">
<li>
{{ page.basename }}
</li>
</menu>
<menu id="post_file_path">
{% set split_post = page.path |split('/') %}
{% for i in range(0, split_post|length - 1) %}
<li>
{% if i != 0 %}
<a href="{{split_post|slice(0,i+1)|join('/')}}">
> {{ split_post[i] }}
</a>
{% else %}
<a href="/">root</a>
{% endif %}
</li>
{% endfor %}
<li style="margin-left: auto;">
<label for="navbar-expander" id="navbar-expand-label"> {{ fa['bars'] | raw }} </label>
<a rel="alternate" type="application/rss+xml" target="_blank"
style="padding-left: 0.3rem;" href="/feed/rss{{page.path}}">
{{ fa['rss']|raw }}
</a>
</li>
</menu>
<input id="navbar-expander" class="navbar-expand" type="checkbox" hx-preserve>
<div class="navbar-expand">
Full path:
<ul class="navbar-full-path">
{% set split_post = page.path |split('/') %}
{% for i in range(0, split_post|length - 1) %}
<li>
{% if i != 0 %}
<a href="{{split_post|slice(0,i+1)|join('/')}}">
/ {{ split_post[i] }}
</a>
{% else %}
<a href="/">root</a>
{% endif %}
</li>
{% endfor %}
</ul>
Dev links:
<a hx-boost="false" href="/raw{{page.path}}">raw</a>
<a hx-boost="false" href="/api/posts{{page.path}}">api</a>
<h4>Folder browser: </h4>
<ul class="navbar-folder-list">
<li class="folder-listing">
<span>
{{ fa['turn-up'] | raw}}
</span>
<a href={{page.parent.path}}>..</a>
</li>
{{ include('fragments/directory/compact/listing.html') }}
</ul>
</div>
</div>