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

@ -1,4 +0,0 @@
{% for post in page.child_posts %}
{{ include('ajax/compact_filelist/entry.html') }}
{% endfor %}

View file

@ -1,5 +1,4 @@
<a href="{{post.url}}">
<div class="article_blop">
<div class="article_blop_bg" style="background-image:url({{post.preview_image}});"></div>
@ -16,7 +15,7 @@
</ul>
<span class="article_blop_excerpt">
{{post.excerpt}}
{{ post.brief }}
</span>
</div>
</div>

View file

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

View file

@ -61,7 +61,7 @@
<a href={{page.parent.path}}>..</a>
</li>
{{ include('ajax/compact_filelist/listing.html') }}
{{ include('fragments/directory/compact/listing.html') }}
</ul>
</div>
</div>

View file

@ -6,7 +6,7 @@
<input type="checkbox" id="folder-open-{{folder_key}}" name="folder-open-{{folder_key}}">
<label for="folder-open-{{folder_key}}"
hx-trigger="click once queue:last, mouseenter once queue:all, intersect once queue:all"
hx-get="/ajax/compact_filelist/listing.html?page={{ post.path }}"
hx-get="/ajax/fragments/directory/compact/listing.html?page={{ post.path }}"
hx-target="next ul">
{{ fa['folder'] | raw }}

View file

@ -0,0 +1,4 @@
{% for post in page.child_posts %}
{{ include('fragments/directory/compact/entry.html') }}
{% endfor %}

View file

@ -0,0 +1,39 @@
<h3>Directory contents for {{page.basename}}:</h3>
<table class="directory">
<tr>
<th></th>
<th class="hsmol_hide">Name</th>
<th>Title</th>
<th class="entry_update_time hsmol_hide">Modified</th>
</tr>
<tr class="entry">
<td>
{{ fa['turn-up'] | raw }}
</td>
<td class="hsmol_hide">
<a href={{page.parent.path}}> .. </a>
</td>
<td class="entry_title">
<a href={{page.parent.path}}> .. </a>
</td>
<td class="entry_update_time hsmol_hide">
</td>
</tr>
{% for post in page.child_posts %}
<tr class="entry">
<td>
{{ fa[post.icon] | raw }}
</td>
<td class="hsmol_hide">
<a href={{post.path}}>{{post.basename}}</a>
</td>
<td class="entry_title">
<a href={{post.path}}>{{ post.title }}</a>
</td>
<td class="entry_update_time hsmol_hide">
{{ post.updated_at }}
</td>
</tr>
{% endfor %}
</table>

View file

@ -1,28 +0,0 @@
{% extends "root.html" %}
{% block extra_head %}
<link rel="stylesheet" href="/static/gallerystyle.css">
{% endblock %}
{% block second_title %}
<h2> Gallery </h2>
{% endblock %}
{%block main_content%}
<figure>
<a href="{{ image_url }}" target="_blank">
<img id="gallery_image" src="{{ image_url }}"> </img>
</a>
<article>
<figcaption id="gallery_title"> {{ image_title }} </figcaption>
<span> {{ image_desc }} </span>
<br>
<a href="{{ artist_src_link }}"> Artist: {{ artist_name }} </a>
<br>
<a href="{{ image_src_link }}"> Source link </a>
</article>
</figure>
{%endblock%}

View file

@ -1,18 +0,0 @@
{% extends "root.html" %}
{% block extra_head %}
<link rel="stylesheet" href="/static/gallerystyle.css">
{% endblock %}
{% block second_title %}
<h2> Gallery </h2>
{% endblock %}
{%block main_content%}
<div id="gallery_root_grid">
{% for key,value in array_path %}
<div class=""
{% endfor %}
</div>
{%endblock%}

View file

@ -9,7 +9,7 @@
{%endblock %}
{%block content_article%}
{% if page.title %}
{% if page.title and (page.title != page.basename) %}
<h1 class="content-title"> {{ page.title }} </h1>
{% endif %}

View file

@ -15,7 +15,7 @@
{%block main_content%}
{{ include('fragments/filepath_bar.html') }}
{{ include('fragments/decoration/navbar.html') }}
<article id="content_article">
{%block content_article %}