feat(templates): 🎨 adjust templates to fit the new rendering data format

This commit is contained in:
David Bailey 2024-12-09 10:53:05 +01:00
parent 9a5b9e609e
commit 9de4838081
7 changed files with 47 additions and 110 deletions

View 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%}

View 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%}

View file

@ -0,0 +1,24 @@
{% extends "pathed_content.html" %}
{% block extra_head %}
<link rel="stylesheet" href="/static/imagestyle.css">
{%endblock%}
{% block opengraph_tags %}
{{ parent() }}
<meta property="og:type" content="image" />
{%endblock %}
{%block content_article%}
<figure>
<a target="_blank" href="{{page.media_url}}">
<img id="gallery_image" src="{{page.media_url}}"></img>
</a>
<figcaption>
{{ page.html|raw }}
</figcaption>
</figure>
{%endblock%}

View file

@ -0,0 +1,17 @@
{% extends "pathed_content.html" %}
{% block opengraph_tags %}
{{ parent() }}
<meta property="og:type" content="article" />
{%endblock %}
{%block content_article%}
{% if page.title and (page.title != page.basename) %}
<h1 class="content-title"> {{ page.title }} </h1>
{% endif %}
{{ page.html|raw }}
{% endblock %}