From 0b7219b653d987c723471b7edb8e90b75d0231fb Mon Sep 17 00:00:00 2001 From: alexisben <alex@noesya.coop> Date: Fri, 20 Jan 2023 09:52:53 +0100 Subject: [PATCH] fix sitemap --- assets/sass/_theme/blocks/sitemap.sass | 4 +++- layouts/pages/sitemap.html | 25 ++++++++++++------------- 2 files changed, 15 insertions(+), 14 deletions(-) diff --git a/assets/sass/_theme/blocks/sitemap.sass b/assets/sass/_theme/blocks/sitemap.sass index aaa5c685..bb45be78 100644 --- a/assets/sass/_theme/blocks/sitemap.sass +++ b/assets/sass/_theme/blocks/sitemap.sass @@ -3,4 +3,6 @@ a text-decoration: none ul + h3 - margin-top: $spacing3 \ No newline at end of file + margin-top: $spacing3 + &:first-of-type + padding-top: 0 \ No newline at end of file diff --git a/layouts/pages/sitemap.html b/layouts/pages/sitemap.html index 65c90074..45fd62f3 100644 --- a/layouts/pages/sitemap.html +++ b/layouts/pages/sitemap.html @@ -20,13 +20,13 @@ {{ partial "blocks/list.html" . }} - <section class="block block-sitemap"> - <div class="container"> - <div class="block-content"> - {{ range .Site.Sections }} - {{ if ne .Type "sitemap" }} - {{ $permalink := .Permalink }} - <h3 id="{{ .Type }}"> + {{ range .Site.Sections }} + {{ if ne .Type "sitemap" }} + {{ $permalink := .Permalink }} + <section class="block block-sitemap" id="{{ .Type }}"> + <div class="container"> + <div class="block-content"> + <h3> <a href="{{ $permalink }}">{{ safeHTML .Title }}</a> </h3> <ul> @@ -36,11 +36,10 @@ {{ end }} {{ end }} </ul> - {{ end }} - {{ end }} - </div> - </div> - </section> - + </div> + </div> + </section> + {{ end }} + {{ end }} </div> {{ end }} -- GitLab