mirror of
https://github.com/SebastianStork/kita.git
synced 2026-01-21 14:31:35 +01:00
feat: add archive.html template
This commit is contained in:
parent
70876ae0d2
commit
f9b448197c
4 changed files with 45 additions and 0 deletions
|
|
@ -80,6 +80,10 @@ url = "/atom.xml"
|
||||||
name = "Projects"
|
name = "Projects"
|
||||||
url = "/projects"
|
url = "/projects"
|
||||||
|
|
||||||
|
[[extra.menu]]
|
||||||
|
name = "Archive"
|
||||||
|
url = "/archive"
|
||||||
|
|
||||||
[[extra.menu]]
|
[[extra.menu]]
|
||||||
name = "Tags"
|
name = "Tags"
|
||||||
url = "/tags"
|
url = "/tags"
|
||||||
|
|
|
||||||
7
content/pages/archive.md
Normal file
7
content/pages/archive.md
Normal file
|
|
@ -0,0 +1,7 @@
|
||||||
|
+++
|
||||||
|
title = "Archive"
|
||||||
|
path = "archive"
|
||||||
|
template = "archive.html"
|
||||||
|
[extra]
|
||||||
|
section = "_index.md"
|
||||||
|
+++
|
||||||
|
|
@ -1553,6 +1553,10 @@ body {
|
||||||
padding-left: 1rem;
|
padding-left: 1rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.pl-6 {
|
||||||
|
padding-left: 1.5rem;
|
||||||
|
}
|
||||||
|
|
||||||
.pr-2 {
|
.pr-2 {
|
||||||
padding-right: 0.5rem;
|
padding-right: 0.5rem;
|
||||||
}
|
}
|
||||||
|
|
@ -1569,6 +1573,10 @@ body {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.font-mono {
|
||||||
|
font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
|
||||||
|
}
|
||||||
|
|
||||||
.text-2xl {
|
.text-2xl {
|
||||||
font-size: 1.5rem;
|
font-size: 1.5rem;
|
||||||
line-height: 2rem;
|
line-height: 2rem;
|
||||||
|
|
|
||||||
26
templates/archive.html
Normal file
26
templates/archive.html
Normal file
|
|
@ -0,0 +1,26 @@
|
||||||
|
{% extends "index.html" %}<!---->
|
||||||
|
{% block main %}<!---->
|
||||||
|
|
||||||
|
<h1 class="mb-16">{{ page.title }}</h1>
|
||||||
|
|
||||||
|
{% set section = get_section(path=page.extra.section) %}<!---->
|
||||||
|
|
||||||
|
{% for year, posts in section.pages | group_by(attribute="year") %}
|
||||||
|
<h2>{{ year }}</h2>
|
||||||
|
|
||||||
|
<div class="not-prose pl-6">
|
||||||
|
<ul>
|
||||||
|
{% for post in posts %}
|
||||||
|
<li>
|
||||||
|
<div class="my-2 flex items-center justify-between">
|
||||||
|
<a class="no-underline" href="{{ post.permalink }}">{{ post.title }}</a>
|
||||||
|
<time class="font-mono text-sm opacity-60">{{ post.date | date(format="%m-%d") }}</time>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
{% endfor %}
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{% endfor %}<!---->
|
||||||
|
|
||||||
|
{% endblock main %}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue