Core for the posts section
This commit is contained in:
parent
2439dfa78d
commit
0791f417f3
@ -19,6 +19,6 @@ nav_items = [
|
||||
{name="Home", path="/"},
|
||||
{name="About", path="/about"},
|
||||
{name="Projects", path="/projects/"},
|
||||
#{name="Posts", path="/posts"}
|
||||
{name="Posts", path="/posts"}
|
||||
]
|
||||
|
||||
|
7
content/posts/_index.md
Normal file
7
content/posts/_index.md
Normal file
@ -0,0 +1,7 @@
|
||||
+++
|
||||
title = "Posts"
|
||||
template = "post_list.html"
|
||||
page_template = "post.html"
|
||||
sort_by = "date"
|
||||
+++
|
||||
|
9
content/posts/jellyfin.md
Normal file
9
content/posts/jellyfin.md
Normal file
@ -0,0 +1,9 @@
|
||||
+++
|
||||
title = "Jellyfin"
|
||||
date = 2024-10-03
|
||||
description = "My Jellyfin docker based instance"
|
||||
+++
|
||||
|
||||
This is an post about my docker based Jellyfin instance
|
||||
|
||||
|
9
content/posts/nextcloud.md
Normal file
9
content/posts/nextcloud.md
Normal file
@ -0,0 +1,9 @@
|
||||
+++
|
||||
title = "Nextcloud"
|
||||
date = 2024-10-03
|
||||
description = "My Nextcloud docker based instance"
|
||||
+++
|
||||
|
||||
This is an post about my docker based Nextcloud instance
|
||||
|
||||
|
26
templates/post.html
Normal file
26
templates/post.html
Normal file
@ -0,0 +1,26 @@
|
||||
{% extends "base.html" %}
|
||||
|
||||
{% block styles %}
|
||||
<link rel="stylesheet" href="/project.css">
|
||||
{% endblock styles %}
|
||||
|
||||
{% block content %}
|
||||
<section class="project-wrapper flex-col">
|
||||
<!--
|
||||
<section class="left-bar flex-col">
|
||||
<h2>Projects</h2>
|
||||
{% set section = get_section(path=page.ancestors | last) %}
|
||||
{% for project in section.pages %}
|
||||
<a href="{{ project.permalink }}">{{project.title}}</a>
|
||||
{% endfor %}
|
||||
</section>
|
||||
-->
|
||||
|
||||
<h2>{{ page.title }}</h2>
|
||||
<div>
|
||||
{{ page.content | safe }}
|
||||
</div>
|
||||
<a href="/posts">Back to list of posts</a>
|
||||
</section>
|
||||
{% endblock content %}
|
||||
|
28
templates/post_list.html
Normal file
28
templates/post_list.html
Normal file
@ -0,0 +1,28 @@
|
||||
{% extends "base.html" %}
|
||||
|
||||
{% block styles %}
|
||||
<link rel="stylesheet" href="/project_list.css">
|
||||
{% endblock styles %}
|
||||
|
||||
{% block content %}
|
||||
<section class="project-list content">
|
||||
<h1>My Posts</h1>
|
||||
{% for post in section.pages %}
|
||||
<div class="project">
|
||||
<a class="title" href="{{ post.permalink }}">
|
||||
{{ post.title }}
|
||||
</a>
|
||||
<p class="description">
|
||||
{% if post.description %}
|
||||
{{ post.description }}
|
||||
{% else %}
|
||||
…
|
||||
{% endif %}
|
||||
</p>
|
||||
<hr>
|
||||
<p>{{ post.date }}</p>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</section>
|
||||
{% endblock content %}
|
||||
|
Loading…
Reference in New Issue
Block a user