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 branches found
No related tags found
No related merge requests found
...@@ -4,9 +4,30 @@ params: ...@@ -4,9 +4,30 @@ params:
enable: false enable: false
blank: true blank: true
page: https://gdpr.eu/cookies/ page: https://gdpr.eu/cookies/
plausible: false
seo:
title:
separator: "|"
logo:
header: "/assets/images/logo.svg"
footer: "/assets/images/logo.svg"
breadcrumb: breadcrumb:
position: hero-start # hero-start | hero-end | after-hero | none 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: posts:
default_image: false default_image: false
date_format: ":date_long" date_format: ":date_long"
...@@ -16,28 +37,9 @@ params: ...@@ -16,28 +37,9 @@ params:
show_description: true show_description: true
truncate_description: 200 # Set to 0 to disable truncate truncate_description: 200 # Set to 0 to disable truncate
layout: list # grid | list 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: programs:
related_posts: related_posts:
quantity: 4 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: image_sizes:
design_system: design_system:
lightbox: lightbox:
......
{{ $summary := .summary | default (partial "PrepareText" .context.Params.summary) }} {{ $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 -}} {{- if .block_wrapped -}}
<section class="block block-summary"> <section class="block block-summary">
<div class="container"> <div class="container">
......
{{- $direction := "" -}} {{- $direction := "" -}}
{{- $breadcrumb_is_after_hero := eq site.Params.breadcrumb.position "after-hero" -}} {{- $breadcrumb_is_after_hero := eq site.Params.breadcrumb.position "after-hero" -}}
{{- $subtitle := .subtitle -}}
{{ if .image }} {{ if .image }}
{{- $direction = partial "GetImageDirection" .image -}} {{- $direction = partial "GetImageDirection" .image -}}
{{ end }} {{ 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 }}"> <header class="hero {{ if .image -}}hero--with-image hero--image-{{- $direction -}}{{- end }} {{ if $breadcrumb_is_after_hero -}} hero--no-margin {{- end }}">
<div class="container"> <div class="container">
{{- if eq site.Params.breadcrumb.position "hero-start" -}} {{- if eq site.Params.breadcrumb.position "hero-start" -}}
...@@ -12,10 +21,10 @@ ...@@ -12,10 +21,10 @@
{{- end -}} {{- end -}}
{{- end -}} {{- end -}}
<div class="content"> <div class="content">
{{- if .subtitle -}} {{- if $subtitle -}}
<hgroup> <hgroup>
<h1>{{ partial "PrepareHTML" .title }}</h1> <h1>{{ partial "PrepareHTML" .title }}</h1>
<p>{{ partial "PrepareHTML" .subtitle }}</p> <p>{{ partial "PrepareHTML" $subtitle }}</p>
</hgroup> </hgroup>
{{- else -}} {{- else -}}
<h1>{{ partial "PrepareHTML" .title }}</h1> <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