From c2d2ce85f8c7a2492c11496afe50fc88b1970a2c Mon Sep 17 00:00:00 2001 From: Olivia206 <olivia.simonet206@gmail.com> Date: Mon, 22 May 2023 18:13:08 +0200 Subject: [PATCH] fixed organization chart --- layouts/partials/blocks/templates/organization_chart.html | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/layouts/partials/blocks/templates/organization_chart.html b/layouts/partials/blocks/templates/organization_chart.html index 4e8e7b73..1eaf8894 100644 --- a/layouts/partials/blocks/templates/organization_chart.html +++ b/layouts/partials/blocks/templates/organization_chart.html @@ -27,7 +27,7 @@ <div class="persons"> {{- range .persons -}} {{ $person := site.GetPage (printf "/persons/%s" .slug) }} - {{ $summaryLength := len $person.Params.summary}} + <article class="person" itemscope itemtype="https://schema.org/Person"> <div class="description"> <h3 class="name" itemprop="name"> @@ -39,7 +39,11 @@ </a> {{ end }} </h3> - <p itemprop="jobTitle" {{- if ge $summaryLength $charLimit -}} data-column="true" {{- end -}}> + <p itemprop="jobTitle" + {{- if $person.Params.summary -}} + {{ $summaryLength := len $person.Params.summary}} + {{- if ge $summaryLength $charLimit -}} data-column="true" {{- end -}} + {{- end -}}> {{- if (partial "GetTextFromHTML" .role) }} {{ partial "PrepareHTML" .role }} {{- else if partial "GetTextFromHTML" $person.Params.summary }} -- GitLab