feat(templates): 🎨 adjust templates to fit the new rendering data format
This commit is contained in:
parent
9a5b9e609e
commit
9de4838081
7 changed files with 47 additions and 110 deletions
|
@ -1,43 +0,0 @@
|
|||
|
||||
|
||||
{% extends "pathed_content.html" %}
|
||||
|
||||
{% block extra_head %}
|
||||
<link rel="stylesheet" href="/static/directorystyle.css">
|
||||
{%endblock%}
|
||||
|
||||
{%block content_article%}
|
||||
{% if subposts|length > 0 %}
|
||||
<h3>Directory contents:</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>
|
||||
{% for subpost in subposts %}
|
||||
<tr class="entry">
|
||||
<td>
|
||||
{{ fa[subpost.post_metadata.icon] | raw }}
|
||||
</td>
|
||||
<td class="hsmol_hide">
|
||||
<a href={{subpost.post_path}}>{{subpost.post_basename}}</a>
|
||||
</td>
|
||||
<td class="entry_title">
|
||||
<a href={{subpost.post_path}}>{{ subpost.post_metadata.title }}</a>
|
||||
</td>
|
||||
<td class="entry_update_time hsmol_hide">
|
||||
{{ subpost.post_update_time }}
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
{%else%}
|
||||
<h4>This directory appears to be empty...</h4>
|
||||
<span>This shouldn't happen, sorry!</span>
|
||||
{% endif %}
|
||||
|
||||
{{ content_html|raw }}
|
||||
|
||||
{%endblock%}
|
|
@ -1,59 +0,0 @@
|
|||
|
||||
|
||||
{% extends "pathed_content.html" %}
|
||||
|
||||
{% block extra_head %}
|
||||
<link rel="stylesheet" href="/static/directorystyle.css">
|
||||
<link rel="stylesheet" href="/static/gallerystyle.css">
|
||||
{%endblock%}
|
||||
|
||||
{%block content_article%}
|
||||
{% if subposts|length > 0 %}
|
||||
<table class="directory">
|
||||
<h3>Art Subfolders:</h3>
|
||||
<tr>
|
||||
<th></th>
|
||||
<th class="hsmol_hide">Name</th>
|
||||
<th>Title</th>
|
||||
<th class="entry_update_time hsmol_hide">Modified</th>
|
||||
</tr>
|
||||
{% for subpost in subposts %}
|
||||
<tr class="entry">
|
||||
<td>
|
||||
{{ fa[subpost.post_metadata.icon] | raw }}
|
||||
</td>
|
||||
<td class="hsmol_hide">
|
||||
<a href={{subpost.post_path}}>{{subpost.post_basename}}</a>
|
||||
</td>
|
||||
<td class="entry_title">
|
||||
<a href={{subpost.post_path}}>{{ subpost.post_metadata.title }}</a>
|
||||
</td>
|
||||
<td class="entry_update_time hsmol_hide">
|
||||
{{ subpost.post_update_time }}
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
{% endif %}
|
||||
|
||||
{{ content_html|raw }}
|
||||
|
||||
{% if gallery_images|length > 0 %}
|
||||
<ul class="gallery">
|
||||
{% for post in gallery_images %}
|
||||
<li class="entry">
|
||||
<a href={{post.post_path}}>
|
||||
<figure>
|
||||
<img src="{{post.post_metadata.media_file}}">
|
||||
<figcaption>
|
||||
{{ post.post_metadata.title }}
|
||||
</figcaption>
|
||||
</figure>
|
||||
</a>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{%else%}
|
||||
<h4>How sad. There are no images yet... What a real shame :c </h4>
|
||||
{% endif %}
|
||||
{%endblock%}
|
13
www/templates/render_templates/directory.html
Normal file
13
www/templates/render_templates/directory.html
Normal file
|
@ -0,0 +1,13 @@
|
|||
|
||||
|
||||
{% extends "pathed_content.html" %}
|
||||
|
||||
{% block extra_head %}
|
||||
<link rel="stylesheet" href="/static/directorystyle.css">
|
||||
{%endblock%}
|
||||
|
||||
{%block content_article%}
|
||||
{{ include('fragments/directory/inline.html') }}
|
||||
|
||||
{{ content_html|raw }}
|
||||
{%endblock%}
|
27
www/templates/render_templates/gallery.html
Normal file
27
www/templates/render_templates/gallery.html
Normal file
|
@ -0,0 +1,27 @@
|
|||
|
||||
{% extends "pathed_content.html" %}
|
||||
|
||||
{%block content_article%}
|
||||
{{ include('fragments/directory/inline.html') }}
|
||||
|
||||
{{ content_html|raw }}
|
||||
|
||||
{% if search_results|length > 0 %}
|
||||
<ul class="gallery">
|
||||
{% for post in search_results %}
|
||||
<li class="entry">
|
||||
<a href={{post.path}}>
|
||||
<figure>
|
||||
<img src="{{post.media_preview_url}}">
|
||||
<figcaption>
|
||||
{{ post.title }}
|
||||
</figcaption>
|
||||
</figure>
|
||||
</a>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{%else%}
|
||||
<h4>How sad. There are no images yet... What a real shame :c </h4>
|
||||
{% endif %}
|
||||
{%endblock%}
|
|
@ -1,5 +1,4 @@
|
|||
|
||||
|
||||
{% extends "pathed_content.html" %}
|
||||
|
||||
{% block extra_head %}
|
||||
|
@ -14,12 +13,12 @@
|
|||
|
||||
{%block content_article%}
|
||||
<figure>
|
||||
<a target="_blank" href="{{post.post_metadata.media_file}}">
|
||||
<img id="gallery_image" src="{{post.post_metadata.media_file}}"></img>
|
||||
<a target="_blank" href="{{page.media_url}}">
|
||||
<img id="gallery_image" src="{{page.media_url}}"></img>
|
||||
</a>
|
||||
|
||||
<figcaption>
|
||||
{{ content_html|raw }}
|
||||
{{ page.html|raw }}
|
||||
</figcaption>
|
||||
</figure>
|
||||
{%endblock%}
|
|
@ -8,10 +8,10 @@
|
|||
|
||||
{%block main_content%}
|
||||
<article>
|
||||
<form method="post" enctype="multipart/form-data" action="/api/admin/upload">
|
||||
<input type="text" id="post_path" name="post_path"/>
|
||||
<input type="password" id="api_key" name="api_key"/>
|
||||
<input type="file" id="post_data" name="post_data"/>
|
||||
<form method="post" enctype="multipart/form-data" action="/api/upload">
|
||||
<input type="text" id="path" name="path"/>
|
||||
<input type="password" id="ACCESS_KEY" name="ACCESS_KEY"/>
|
||||
<input type="file" id="file" name="file"/>
|
||||
|
||||
<button>Submit</button>
|
||||
</form>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue