From 35947a3d782169c2c5e27f1c62b5adaf72ccf758 Mon Sep 17 00:00:00 2001 From: alexisben <alex@noesya.coop> Date: Tue, 17 Jan 2023 16:38:21 +0100 Subject: [PATCH] fix persons__section --- assets/sass/_theme/sections/persons.sass | 2 ++ config.yaml | 2 +- layouts/organizations/list.html | 17 +++++++++++++---- layouts/persons/list.html | 3 ++- 4 files changed, 18 insertions(+), 6 deletions(-) diff --git a/assets/sass/_theme/sections/persons.sass b/assets/sass/_theme/sections/persons.sass index ec12c21b..0b29cce3 100644 --- a/assets/sass/_theme/sections/persons.sass +++ b/assets/sass/_theme/sections/persons.sass @@ -141,6 +141,8 @@ ol.persons--list .persons__section * + .persons margin-top: $spacing-section-y + .persons:last-child + padding-bottom: $spacing3 .persons__page .hero diff --git a/config.yaml b/config.yaml index a3e5b61e..f926a8e1 100644 --- a/config.yaml +++ b/config.yaml @@ -16,7 +16,7 @@ params: truncate_description: 200 # Set to 0 to disable truncate persons: index: - layout: grid # grid | list + layout: list # grid | list home: toc: disabled: true diff --git a/layouts/organizations/list.html b/layouts/organizations/list.html index f8148b25..77d7a6d6 100644 --- a/layouts/organizations/list.html +++ b/layouts/organizations/list.html @@ -1,15 +1,24 @@ {{ define "main" }} + {{- $is_partners_block_present := false -}} + {{ range .Params.blocks }} + {{- if eq .template "partners" -}} + {{- $is_partners_block_present = true -}} + {{ end }} + {{ end }} + {{ partial "organizations/hero.html" . }} <div class="document-content"> + {{ partial "blocks/list.html" . }} + <div class="container"> {{ partial "pages/summary.html" (dict "context" . ) }} - {{ partial "organizations/organizations.html" . }} - {{ partial "commons/pagination.html" . }} + {{- if not $is_partners_block_present -}} + {{ partial "organizations/organizations.html" . }} + {{ partial "commons/pagination.html" . }} + {{ end }} </div> - - {{ partial "blocks/list.html" . }} </div> {{ end }} diff --git a/layouts/persons/list.html b/layouts/persons/list.html index 6197b5ff..c40bba59 100644 --- a/layouts/persons/list.html +++ b/layouts/persons/list.html @@ -30,6 +30,8 @@ "block_wrapped" $summary_block ) }} + {{ partial "blocks/list.html" . }} + <div class="container"> {{- if not $is_organigram_present -}} {{ partial "persons/taxonomies.html" . }} @@ -40,7 +42,6 @@ {{- end -}} </div> - {{ partial "blocks/list.html" . }} </div> {{ end }} -- GitLab