Skip to content
Snippets Groups Projects
Commit 18f56a78 authored by alexisben's avatar alexisben
Browse files

add option for summary position

parent 24ae5615
No related merge requests found
......@@ -4,9 +4,30 @@ params:
enable: false
blank: true
page: https://gdpr.eu/cookies/
plausible: false
seo:
title:
separator: "|"
logo:
header: "/assets/images/logo.svg"
footer: "/assets/images/logo.svg"
breadcrumb:
position: hero-start # hero-start | hero-end | after-hero | none
plausible:
summary:
position: content # content | hero
home:
toc:
disabled: true
organizations:
dark_logo_background: false
pages:
index:
truncate_description: 200 # Set to 0 to disable truncate
partners:
map_marker_icon: '/assets/images/map-marker.svg'
persons:
index:
layout: list # grid | list
posts:
default_image: false
date_format: ":date_long"
......@@ -16,28 +37,9 @@ params:
show_description: true
truncate_description: 200 # Set to 0 to disable truncate
layout: list # grid | list
pages:
index:
truncate_description: 200 # Set to 0 to disable truncate
partners:
map_marker_icon: '/assets/images/map-marker.svg'
persons:
index:
layout: list # grid | list
programs:
related_posts:
quantity: 4
home:
toc:
disabled: true
logo:
header: "/assets/images/logo.svg"
footer: "/assets/images/logo.svg"
organizations:
dark_logo_background: false
seo:
title:
separator: "|"
image_sizes:
design_system:
lightbox:
......
{{ $summary := .summary | default (partial "PrepareText" .context.Params.summary) }}
{{- if eq .site.Params.summary.position "content" -}}
{{- if eq site.Params.summary.position "content" -}}
{{- if .block_wrapped -}}
<section class="block block-summary">
<div class="container">
......
{{- $direction := "" -}}
{{- $breadcrumb_is_after_hero := eq site.Params.breadcrumb.position "after-hero" -}}
{{- $subtitle := .subtitle -}}
{{ if .image }}
{{- $direction = partial "GetImageDirection" .image -}}
{{ end }}
{{- $summary := partial "PrepareText" .context.Params.summary -}}
{{ if not $subtitle }}
{{ if and (eq site.Params.summary.position "hero") $summary }}
{{ $subtitle = $summary }}
{{ end }}
{{ end }}
<header class="hero {{ if .image -}}hero--with-image hero--image-{{- $direction -}}{{- end }} {{ if $breadcrumb_is_after_hero -}} hero--no-margin {{- end }}">
<div class="container">
{{- if eq site.Params.breadcrumb.position "hero-start" -}}
......@@ -12,10 +21,10 @@
{{- end -}}
{{- end -}}
<div class="content">
{{- if .subtitle -}}
{{- if $subtitle -}}
<hgroup>
<h1>{{ partial "PrepareHTML" .title }}</h1>
<p>{{ partial "PrepareHTML" .subtitle }}</p>
<p>{{ partial "PrepareHTML" $subtitle }}</p>
</hgroup>
{{- else -}}
<h1>{{ partial "PrepareHTML" .title }}</h1>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment