refactor: ♻️ clean up unused Twig templates

This commit is contained in:
David Bailey 2023-12-11 22:52:30 +01:00
parent d54d3077cb
commit a7a7c738ec
12 changed files with 253 additions and 98 deletions

View file

@ -1,25 +0,0 @@
{% extends "root.html" %}
{% block second_title %}
<h2> {{ post.post_metadata.title }} </h2>
{% endblock %}
{%block main_content%}
<article>
{{ post['post_content']|markdown_to_html }}
</article>
{% if subposts|length > 0 %}
<article>
<h3>Related:</h3>
<ul>
{% for subpost in subposts %}
<li><a href={{subpost.post_path}}>{{ subpost.post_metadata.title }}</a></li>
{% endfor %}
</ul>
</article>
{%endif%}
{%endblock%}

View file

@ -0,0 +1,30 @@
<div id="post_file_bar">
<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 %}
<li style="margin-left: auto;">
<a href="/raw{{post.post_path}}">raw</a>
<a href="/api/posts{{post.post_path}}">api</a>
</li>
</menu>
</div>

View file

@ -1,19 +0,0 @@
{% extends "root.html" %}
{% block second_title %}
<h2> Abouts </h2>
{% endblock %}
{%block main_content%}
<article>
{{ include('about.md')|markdown_to_html }}
</article>
<ul>
{% for subpost in subposts %}
<li> {{ subpost.title }} </li>
{% endfor %}
</ul>
{%endblock%}

View file

@ -1,31 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<title>Lucidragons' Fire</title>
<link rel="stylesheet" href="/dergstyle.css">
</head>
<body>
<h1 id="big_title">The dergsite</h1>
<div id="title_separator"></div>
<ul>
<li><a href="/about"> About </a></li>
<li><a href="/blog"> Blog </a></li>
<li><a href="/projects"> Projects </a></li>
<li><a href="/artwork"> Artworks </a></li>
</ul>
<div id="main_content_wrapper">
{% block content %}<h3>Soon there shall be content!</h3>{% endblock %}
</div>
<div id="sidebar-wrapper">
{%block sidebar %}
<ul>
<li> Test 1 </li>
</ul>
{% endblock %}
</div>
</body>
</html>

View file

@ -0,0 +1,18 @@
{% extends "root.html" %}
{% block second_title %}
<h2> {{ post.post_metadata.title }} </h2>
{% endblock %}
{%block main_content%}
{{ include('fragments/filepath_bar.html') }}
<article>
{%block content_article %}
{%endblock%}
</article>
{%endblock%}

View file

@ -0,0 +1,45 @@
{% extends "pathed_content.html" %}
{% block extra_head %}
<link rel="stylesheet" href="/static/directorystyle.css">
{%endblock%}
{%block content_article%}
{% if subposts|length > 0 %}
<table class="directory">
<caption>Directory contents:</caption>
<tr>
<th></th>
<th>Name</th>
<th>Title</th>
<th>Modified</th>
</tr>
{% for subpost in subposts %}
<tr class="entry">
<td>
ICN
</td>
<td>
<a href={{subpost.post_path}}>{{subpost.post_basename}}</a>
</td>
<td class="entry_title">
{{ subpost.post_metadata.title }}
</td>
<td class="entry_update_time">
{{ 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 %}
{% if post.readme.found %}
{{ post.readme.post_content|markdown_to_html }}
{% endif %}
{%endblock%}

View file

@ -0,0 +1,41 @@
{% extends "root.html" %}
{% block extra_head %}
<link rel="stylesheet" href="/static/imagestyle.css">
{%endblock%}
{%block main_content%}
<div id="post_file_bar">
<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']}}">
<img id="gallery_image" src="{{post['post_file_dir']}}"></img>
</a>
</article>
{%endblock%}

View file

@ -0,0 +1,7 @@
{% extends "pathed_content.html" %}
{%block content_article%}
{{ post['post_content']|markdown_to_html }}
{% endblock %}