This commit is contained in:
parent
76ca7b9c32
commit
0dcf36052e
18 changed files with 152 additions and 112 deletions
|
@ -1,13 +0,0 @@
|
|||
|
||||
<li class="folder-listing">
|
||||
<span hx-boost="false"
|
||||
hx-get="/ajax/open_folder_listing{{ post.post_path }}"
|
||||
hx-target="closest li"
|
||||
hx-swap="outerHTML">
|
||||
{{ fa[post.post_metadata.icon] | raw }}
|
||||
</span>
|
||||
|
||||
<a href={{post.post_path}}>
|
||||
{{ post.post_metadata.title }}
|
||||
</a>
|
||||
</li>
|
27
www/templates/ajax/compact_filelist/entry.html
Normal file
27
www/templates/ajax/compact_filelist/entry.html
Normal file
|
@ -0,0 +1,27 @@
|
|||
|
||||
|
||||
<li class="folder-listing">
|
||||
{% set folder_key = random() %}
|
||||
|
||||
<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-target="next ul">
|
||||
|
||||
{{ fa['folder'] | raw }}
|
||||
{{ fa['folder-open'] | raw }}
|
||||
</label>
|
||||
|
||||
<a href={{post.path}}>
|
||||
{{ post.basename }} - {{ post.title }}
|
||||
</a>
|
||||
|
||||
<ul class="folder-listing">
|
||||
<li>
|
||||
<span>
|
||||
Loading...
|
||||
</span>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
4
www/templates/ajax/compact_filelist/listing.html
Normal file
4
www/templates/ajax/compact_filelist/listing.html
Normal file
|
@ -0,0 +1,4 @@
|
|||
|
||||
{% for post in page.child_posts %}
|
||||
{{ include('ajax/compact_filelist/entry.html') }}
|
||||
{% endfor %}
|
|
@ -1,4 +0,0 @@
|
|||
|
||||
{% for post in subposts %}
|
||||
{{ include('ajax/folder_listing_entry.html') }}
|
||||
{% endfor %}
|
|
@ -1,26 +0,0 @@
|
|||
|
||||
|
||||
<li class="folder-listing">
|
||||
{% set folder_key = random() %}
|
||||
|
||||
<label for="folder-open-{{folder_key}}"
|
||||
hx-trigger="click once queue:all"
|
||||
hx-get="/ajax/folder_listing{{post.post_path}}"
|
||||
hx-target="next ul">
|
||||
|
||||
{{ fa[post.post_metadata.icon] | raw }}
|
||||
</label>
|
||||
|
||||
<a href={{post.post_path}}>
|
||||
{{ post.post_metadata.title }}
|
||||
</a>
|
||||
|
||||
<input type="checkbox" id="folder-open-{{folder_key}}">
|
||||
<ul class="folder-listing">
|
||||
<li>
|
||||
<span>
|
||||
Loading...
|
||||
</span>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
|
@ -1,20 +0,0 @@
|
|||
|
||||
|
||||
<li class="folder-listing">
|
||||
<span hx-boost="false"
|
||||
hx-get="/ajax/closed_folder_listing{{ post.post_path }}"
|
||||
hx-target="closest li"
|
||||
hx-swap="outerHTML">
|
||||
{{ fa[post.post_metadata.icon] | raw }}
|
||||
</span>
|
||||
|
||||
<a href={{post.post_path}}>
|
||||
{{ post.post_metadata.title }}
|
||||
</a>
|
||||
|
||||
<ul class="folder-listing">
|
||||
{% for post in subposts %}
|
||||
{{ include('ajax/closed_folder_listing.html') }}
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</li>
|
|
@ -1,11 +1,11 @@
|
|||
<div id="post_file_bar">
|
||||
<menu id="post_file_titles">
|
||||
<li>
|
||||
{{ post.post_metadata.title }}
|
||||
{{ page.basename }}
|
||||
</li>
|
||||
</menu>
|
||||
<menu id="post_file_path">
|
||||
{% set split_post = post.post_path |split('/') %}
|
||||
{% set split_post = page.path |split('/') %}
|
||||
{% for i in range(0, split_post|length - 1) %}
|
||||
<li>
|
||||
{% if i != 0 %}
|
||||
|
@ -22,7 +22,7 @@
|
|||
<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{{post.post_path}}">
|
||||
style="padding-left: 0.3rem;" href="/feed/rss{{page.path}}">
|
||||
{{ fa['rss']|raw }}
|
||||
</a>
|
||||
</li>
|
||||
|
@ -32,7 +32,7 @@
|
|||
<div class="navbar-expand">
|
||||
Full path:
|
||||
<ul class="navbar-full-path">
|
||||
{% set split_post = post.post_path |split('/') %}
|
||||
{% set split_post = page.path |split('/') %}
|
||||
{% for i in range(0, split_post|length - 1) %}
|
||||
<li>
|
||||
{% if i != 0 %}
|
||||
|
@ -47,8 +47,8 @@
|
|||
</ul>
|
||||
|
||||
Dev links:
|
||||
<a hx-boost="false" href="/raw{{post.post_path}}">raw</a>
|
||||
<a hx-boost="false" href="/api/posts{{post.post_path}}">api</a>
|
||||
<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>
|
||||
|
||||
|
@ -58,12 +58,10 @@
|
|||
{{ fa['turn-up'] | raw}}
|
||||
</span>
|
||||
|
||||
<a href={{post.parent_path}}>..</a>
|
||||
<a href={{page.parent.path}}>..</a>
|
||||
</li>
|
||||
|
||||
{% for post in subposts %}
|
||||
{{ include('ajax/folder_listing_entry.html') }}
|
||||
{% endfor %}
|
||||
|
||||
{{ include('ajax/compact_filelist/listing.html') }}
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -6,11 +6,11 @@
|
|||
|
||||
{{ parent() }}
|
||||
|
||||
<link rel="alternate" type="application/atom+xml" title="{{og.site_name}} Feed for {{post.post_path}}" href="{{site_config.uri_prefix}}/feed/atom{{post.post_path}}">
|
||||
<link rel="alternate" type="application/atom+xml" title="{{opengraph.site_name}} Feed for {{page.path}}" href="{{page.uri_prefix}}/feed/atom{{page.path}}">
|
||||
{% endblock %}
|
||||
|
||||
{% block second_title %}
|
||||
<h2> {{ post.post_metadata.title }} </h2>
|
||||
<h2> {{ page.title }} </h2>
|
||||
{% endblock %}
|
||||
|
||||
{%block main_content%}
|
||||
|
@ -22,7 +22,7 @@
|
|||
{%endblock%}
|
||||
|
||||
<span id="content_footer">
|
||||
This article was created on {{ post.post_create_time }}, last edited {{ post.post_update_time }}, and was viewed {{ post.post_access_count }} times~
|
||||
This page was created on {{ page.created_at }}, last edited {{ page.updated_at }}, and was viewed {{ page.view_count }} times~
|
||||
</span>
|
||||
</article>
|
||||
|
||||
|
|
|
@ -9,5 +9,9 @@
|
|||
{%endblock %}
|
||||
|
||||
{%block content_article%}
|
||||
{{ content_html|raw }}
|
||||
{% if page.title %}
|
||||
<h1 class="content-title"> {{ page.title }} </h1>
|
||||
{% endif %}
|
||||
|
||||
{{ page.html|raw }}
|
||||
{% endblock %}
|
|
@ -12,7 +12,6 @@
|
|||
<link rel="stylesheet" href="/static/article_blop.css">
|
||||
<link rel="stylesheet" href="/static/gallerystyle.css">
|
||||
|
||||
|
||||
<link rel="icon" type="image/x-icon" href="/static/icon.jpeg">
|
||||
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1">
|
||||
|
@ -20,6 +19,10 @@
|
|||
<script src="/static/htmx.min.js"></script>
|
||||
<script id="main_banner_script" src="/static/banner.js"></script>
|
||||
|
||||
{% if page.base %}
|
||||
<base href="{{ page.base }}">
|
||||
{% endif %}
|
||||
|
||||
{% block feed_links %}
|
||||
<link rel="alternate" type="application/rss+xml" title="{{opengraph.site_name}} Global Feed" href="{{site_config.uri_prefix}}/feed">
|
||||
{% endblock %}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue