Add: Microposts, layout and config

main
Ó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"
url: "/posts/"
weight: 10
- identifier: "microposts"
name: "Social"
title: "Social"
url: "/microposts/"
weight: 20
- identifier: "archive"
name: "Archive"
title: "Archive"
url: "/archive/"
weight: 20
weight: 30
- identifier: "about"
name: "About"
title: "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 }}