Add: Microposts, layout and config

This commit is contained in:
Óscar M. Lage 2023-01-23 21:18:15 +01:00
parent ca0a9adea1
commit 4033108d3d
2 changed files with 31 additions and 2 deletions

View File

@ -33,13 +33,18 @@ menu:
title: "Posts" title: "Posts"
url: "/posts/" url: "/posts/"
weight: 10 weight: 10
- identifier: "microposts"
name: "Social"
title: "Social"
url: "/microposts/"
weight: 20
- identifier: "archive" - identifier: "archive"
name: "Archive" name: "Archive"
title: "Archive" title: "Archive"
url: "/archive/" url: "/archive/"
weight: 20 weight: 30
- identifier: "about" - identifier: "about"
name: "About" name: "About"
title: "About" title: "About"
url: "/about/" url: "/about/"
weight: 30 weight: 40

View File

@ -0,0 +1,24 @@
{{ define "main" }}
<main class="main wrapper">
<h1>Microposts</h1>
{{ .Content }}
<div class="posts-container">
<hr />
{{ range (.Paginate (where .Pages "Type" "microposts")).Pages }}
<div class="post-detail">
<div class="post-detail-info">
<time datetime="{{ .PublishDate }}" class="post-item-date">{{ i18n "publishdate" . }}</time>
</div>
{{ .Content }}
</div>
<hr />
{{ end }}
</div>
<div class="pagination">
{{ partial "pagination.html" . }}
</div>
</main>
{{ end }}