feat: add new Post wrapper and Blog overview page

This commit is contained in:
David Bailey 2024-01-25 15:40:32 +01:00
parent b420a6eafa
commit a2c6842b71
8 changed files with 384 additions and 6 deletions

View file

@ -0,0 +1,23 @@
<a href="{{post.url}}">
<div class="article_blop">
<div class="article_blop_bg" style="background-image:url({{post.preview_image}});"></div>
<div class="article_blop_content">
<h1 class="article_blop_title">
{{post.title}}
</h1>
<ul class="article_blop_tags">
{% for tag in post.tags %}
<li> {{ tag }} </li>
{% endfor %}
</ul>
<span class="article_blop_excerpt">
{{post.excerpt}}
</span>
</div>
</div>
</a>

View file

@ -0,0 +1,48 @@
{% extends "pathed_content.html" %}
{% block extra_head %}
<link rel="stylesheet" href="/static/directorystyle.css">
<link rel="stylesheet" href="/static/article_blop.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 blog_posts|length > 0 %}
{% for post in blog_posts %}
{% include('fragments/article_blop.html') %}
{% endfor %}
{%else%}
<h4>How sad. There are no blog posts yet... What a real shame :c </h4>
{% endif %}
{%endblock%}