From 1ee175c6bea9bdc15188ad475565149487cb27f2 Mon Sep 17 00:00:00 2001 From: Francesco Date: Mon, 6 May 2024 21:53:29 +0200 Subject: Breadcrumbs tmp --- layouts/_default/list.html | 11 +++++++++++ layouts/_default/single.html | 4 ++++ layouts/partials/breadcrumbs.html | 8 ++++++++ layouts/partials/tag-entry.html | 7 +++++++ 4 files changed, 30 insertions(+) create mode 100644 layouts/partials/breadcrumbs.html create mode 100644 layouts/partials/tag-entry.html (limited to 'layouts') diff --git a/layouts/_default/list.html b/layouts/_default/list.html index 8c52a86..5cf6c81 100644 --- a/layouts/_default/list.html +++ b/layouts/_default/list.html @@ -1,7 +1,12 @@ {{ define "main" }} + +{{ partial "breadcrumbs.html" . }} +

{{ .Title }}

{{ .Content }} +{{ $tagsPage := eq .Title "Tags"}} + {{ $paginationSize := 1}} {{ if (gt .Site.Params.paginationSize 0) }} {{ $paginationSize = .Site.Params.paginationSize }} @@ -10,9 +15,15 @@ {{ $paginator := .Paginate (.Pages) $paginationSize }} {{ range $index, $page := $paginator.Pages }} + +{{ if $tagsPage }} +{{ partial "tag-entry.html" $page}} +{{ else }} {{ partial "post-entry.html" $page}} {{ end }} +{{ end }} + {{ partial "pagination-controls.html" $paginator}} {{ end }} \ No newline at end of file diff --git a/layouts/_default/single.html b/layouts/_default/single.html index 420a8ba..3eb46af 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -2,6 +2,8 @@ {{/* Intro */}} +{{ partial "breadcrumbs.html" . }} +
@@ -30,6 +32,8 @@
+ {{/* {{ .Params.tags }} */}} + {{/* Table of Content */}} {{if .Param "toc" }} diff --git a/layouts/partials/breadcrumbs.html b/layouts/partials/breadcrumbs.html new file mode 100644 index 0000000..9040d1f --- /dev/null +++ b/layouts/partials/breadcrumbs.html @@ -0,0 +1,8 @@ + \ No newline at end of file diff --git a/layouts/partials/tag-entry.html b/layouts/partials/tag-entry.html new file mode 100644 index 0000000..378654b --- /dev/null +++ b/layouts/partials/tag-entry.html @@ -0,0 +1,7 @@ +
+
+

+ #{{ .Title }} +

+
+
\ No newline at end of file -- cgit v1.2.3