feat: clean up image template to fit other post layouts, add caption

This commit is contained in:
David Bailey 2023-12-13 10:23:10 +01:00
parent 41c7e0cdc3
commit 653b91cb1e
2 changed files with 9 additions and 37 deletions

View file

@ -1,16 +1,10 @@
article { #main_content_wrapper figcaption h1 {
margin-top: 0.8rem;
margin-left: 10%;
margin-right: 10%;
}
figcaption {
text-align: center; text-align: center;
border-bottom: solid 3px darkgrey; border-bottom: solid 3px darkgrey;
font-size: 2rem; font-size: 1.8rem;
margin-bottom: 0.3rem; margin-bottom: 0.3rem;
} }

View file

@ -1,41 +1,19 @@
{% extends "root.html" %} {% extends "pathed_content.html" %}
{% block extra_head %} {% block extra_head %}
<link rel="stylesheet" href="/static/imagestyle.css"> <link rel="stylesheet" href="/static/imagestyle.css">
{%endblock%} {%endblock%}
{%block main_content%} {%block content_article%}
<div id="post_file_bar"> <figure>
<menu id="post_file_titles">
<li>
{{ post.post_metadata.title }}
</li>
</menu>
<menu id="post_file_path">
{% set split_post = post.post_path |split('/') %}
{% for i in range(0, split_post|length - 1) %}
<li>
{% if i != 0 %}
>
{% endif %}
{% if i != 0 %}
<a href="{{split_post|slice(0,i+1)|join('/')}}">
{{ split_post[i] }}
</a>
{% else %}
<a href="/">root</a>
{% endif %}
</li>
{% endfor %}
</menu>
</div>
<article>
<a target="_blank" href="{{post['post_file_dir']}}"> <a target="_blank" href="{{post['post_file_dir']}}">
<img id="gallery_image" src="{{post['post_file_dir']}}"></img> <img id="gallery_image" src="{{post['post_file_dir']}}"></img>
</a> </a>
</article>
<figcaption>
{{ post.post_content|markdown_to_html }}
</figcaption>
</figure>
{%endblock%} {%endblock%}