From 9de4838081f75dfa04860ea0891592c9d908ef78 Mon Sep 17 00:00:00 2001 From: David Bailey Date: Mon, 9 Dec 2024 10:53:05 +0100 Subject: [PATCH] feat(templates): :art: adjust templates to fit the new rendering data format --- www/templates/old_post_types/directory.html | 43 -------------- www/templates/old_post_types/gallery.html | 59 ------------------- www/templates/render_templates/directory.html | 13 ++++ www/templates/render_templates/gallery.html | 27 +++++++++ .../image.html | 7 +-- .../vanilla.html} | 0 www/templates/upload.html | 8 +-- 7 files changed, 47 insertions(+), 110 deletions(-) delete mode 100644 www/templates/old_post_types/directory.html delete mode 100644 www/templates/old_post_types/gallery.html create mode 100644 www/templates/render_templates/directory.html create mode 100644 www/templates/render_templates/gallery.html rename www/templates/{old_post_types => render_templates}/image.html (66%) rename www/templates/{old_post_types/markdown.html => render_templates/vanilla.html} (100%) diff --git a/www/templates/old_post_types/directory.html b/www/templates/old_post_types/directory.html deleted file mode 100644 index e0babeb..0000000 --- a/www/templates/old_post_types/directory.html +++ /dev/null @@ -1,43 +0,0 @@ - - -{% extends "pathed_content.html" %} - -{% block extra_head %} - -{%endblock%} - -{%block content_article%} - {% if subposts|length > 0 %} -

Directory contents:

- - - - - - - - {% for subpost in subposts %} - - - - - - - {% endfor %} -
NameTitleModified
- {{ fa[subpost.post_metadata.icon] | raw }} - - {{subpost.post_basename}} - - {{ subpost.post_metadata.title }} - - {{ subpost.post_update_time }} -
- {%else%} -

This directory appears to be empty...

- This shouldn't happen, sorry! - {% endif %} - - {{ content_html|raw }} - -{%endblock%} diff --git a/www/templates/old_post_types/gallery.html b/www/templates/old_post_types/gallery.html deleted file mode 100644 index 4e96b3d..0000000 --- a/www/templates/old_post_types/gallery.html +++ /dev/null @@ -1,59 +0,0 @@ - - -{% extends "pathed_content.html" %} - -{% block extra_head %} - - -{%endblock%} - -{%block content_article%} - {% if subposts|length > 0 %} - -

Art Subfolders:

- - - - - - - {% for subpost in subposts %} - - - - - - - {% endfor %} -
NameTitleModified
- {{ fa[subpost.post_metadata.icon] | raw }} - - {{subpost.post_basename}} - - {{ subpost.post_metadata.title }} - - {{ subpost.post_update_time }} -
- {% endif %} - - {{ content_html|raw }} - - {% if gallery_images|length > 0 %} - - {%else%} -

How sad. There are no images yet... What a real shame :c

- {% endif %} -{%endblock%} diff --git a/www/templates/render_templates/directory.html b/www/templates/render_templates/directory.html new file mode 100644 index 0000000..020b4cf --- /dev/null +++ b/www/templates/render_templates/directory.html @@ -0,0 +1,13 @@ + + +{% extends "pathed_content.html" %} + +{% block extra_head %} + +{%endblock%} + +{%block content_article%} + {{ include('fragments/directory/inline.html') }} + + {{ content_html|raw }} +{%endblock%} diff --git a/www/templates/render_templates/gallery.html b/www/templates/render_templates/gallery.html new file mode 100644 index 0000000..bb475d7 --- /dev/null +++ b/www/templates/render_templates/gallery.html @@ -0,0 +1,27 @@ + +{% extends "pathed_content.html" %} + +{%block content_article%} + {{ include('fragments/directory/inline.html') }} + + {{ content_html|raw }} + + {% if search_results|length > 0 %} + + {%else%} +

How sad. There are no images yet... What a real shame :c

+ {% endif %} +{%endblock%} diff --git a/www/templates/old_post_types/image.html b/www/templates/render_templates/image.html similarity index 66% rename from www/templates/old_post_types/image.html rename to www/templates/render_templates/image.html index aff2115..4be0a6e 100644 --- a/www/templates/old_post_types/image.html +++ b/www/templates/render_templates/image.html @@ -1,5 +1,4 @@ - {% extends "pathed_content.html" %} {% block extra_head %} @@ -14,12 +13,12 @@ {%block content_article%}
- - + +
- {{ content_html|raw }} + {{ page.html|raw }}
{%endblock%} diff --git a/www/templates/old_post_types/markdown.html b/www/templates/render_templates/vanilla.html similarity index 100% rename from www/templates/old_post_types/markdown.html rename to www/templates/render_templates/vanilla.html diff --git a/www/templates/upload.html b/www/templates/upload.html index bee8710..58bb952 100644 --- a/www/templates/upload.html +++ b/www/templates/upload.html @@ -8,10 +8,10 @@ {%block main_content%}
-
- - - + + + +