diff --git a/assets/sass/_theme/_configuration.sass b/assets/sass/_theme/_configuration.sass index 774ff0f9aa4a65b774c0fe35d1ab7155ef636a97..1336740cc03e30fe29512ab44f13db92d9bcb832 100644 --- a/assets/sass/_theme/_configuration.sass +++ b/assets/sass/_theme/_configuration.sass @@ -80,6 +80,12 @@ $lead-sidebar-size-desktop: px2rem(32) !default $lead-sidebar-line-height: $lead-line-height !default $lead-sidebar-weight: $lead-weight !default +$lead-hero-font-family: $lead-sidebar-font-family !default +$lead-hero-size: $lead-size !default +$lead-hero-size-desktop: $lead-sidebar-size-desktop !default +$lead-hero-line-height: $lead-sidebar-line-height !default +$lead-hero-weight: $lead-sidebar-weight !default + // Body $body-size-desktop: px2rem(22) !default $body-size: px2rem(18) !default diff --git a/assets/sass/_theme/design-system/hero.sass b/assets/sass/_theme/design-system/hero.sass index 28833f74a895687e32394e82c660311c4b10ce8f..318ae6e90e77d69a2e31fe13a062a436d5aa099c 100644 --- a/assets/sass/_theme/design-system/hero.sass +++ b/assets/sass/_theme/design-system/hero.sass @@ -21,6 +21,8 @@ h1 + p margin-top: $spacing1 + .lead + @include lead-hero figure position: relative &, img, picture diff --git a/assets/sass/_theme/design-system/typography.sass b/assets/sass/_theme/design-system/typography.sass index 48d71d99189909e61421c391a63dd71e6434cbc6..82b06aafe0d1b7d7a2844b4cb825a058101a0a0b 100644 --- a/assets/sass/_theme/design-system/typography.sass +++ b/assets/sass/_theme/design-system/typography.sass @@ -118,6 +118,15 @@ h2, .h2 .lead @include lead +@mixin lead-hero + font-family: $lead-hero-font-family + font-size: $lead-hero-size + font-weight: $lead-hero-weight + line-height: $lead-hero-line-height + @include media-breakpoint-up(desktop) + font-size: $lead-hero-size-desktop + + @mixin body-text font-family: $body-font-family font-size: $body-size diff --git a/assets/sass/_theme/sections/papers.sass b/assets/sass/_theme/sections/papers.sass index d8d6f1539c466edb3faef019e174ffbdbf89cd40..961afc26435fadba62a3307463860b29f454d71c 100644 --- a/assets/sass/_theme/sections/papers.sass +++ b/assets/sass/_theme/sections/papers.sass @@ -52,12 +52,12 @@ aside order: 2 padding: 0 half($grid-gutter-sm) + margin-bottom: $spacing3 @include media-breakpoint-up(desktop) .hero .content > h1, > hgroup width: auto - .paper-sidebar @include container-margin-left margin-top: 0 diff --git a/assets/sass/_theme/sections/programs.sass b/assets/sass/_theme/sections/programs.sass index 076fa264a174891e236ea66c3c96d7c6f4b4bb11..901750817bd664bc7d8fb9e0e9b895545e0dc55d 100644 --- a/assets/sass/_theme/sections/programs.sass +++ b/assets/sass/_theme/sections/programs.sass @@ -22,12 +22,13 @@ ol.programs .container position: relative &:not(.full-width) - .lead - font-family: $lead-font-family - font-weight: $lead-weight - line-height: $lead-line-height - @include media-breakpoint-up(desktop) - font-size: $lead-size-desktop + .document-content + .lead + font-family: $lead-font-family + font-weight: $lead-weight + line-height: $lead-line-height + @include media-breakpoint-up(desktop) + font-size: $lead-size-desktop ol.programs margin-bottom: $spacing3 diff --git a/config.yaml b/config.yaml index cae0fce7162e99c4cbbdb3b7e81cb61b771b8195..f8730c57a51063e9fe70ebe80eea675c25607473 100644 --- a/config.yaml +++ b/config.yaml @@ -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: @@ -139,10 +141,6 @@ params: mobile: 400 tablet: 800 desktop: 900 - hero_single: - mobile: 400 - tablet: 800 - desktop: 900 persons: hero: mobile: 400 diff --git a/layouts/diplomas/term.html b/layouts/diplomas/term.html index 807600e004d965ff28e56ef214cb0b84a2e45e2f..0190e79eeab6914c52967daf4e63a497d50255f9 100644 --- a/layouts/diplomas/term.html +++ b/layouts/diplomas/term.html @@ -2,6 +2,11 @@ {{ partial "diplomas/hero-single.html" . }} <div class="document-content"> + + {{ partial "posts/summary.html" (dict + "context" . + "block_wrapped" true + ) }} {{ partial "blocks/list.html" . }} <div class="container"> <ol class="programs"> diff --git a/layouts/papers/list.html b/layouts/papers/list.html index cf1842505e5f7807726303e5c1892677f06f44a8..cad287b8e5bf48e2eb1823ef18adee35e922e5e2 100644 --- a/layouts/papers/list.html +++ b/layouts/papers/list.html @@ -1,12 +1,6 @@ {{ define "main" }} - {{- $title := or .Params.header_text .Title -}} - {{- partial "header/hero.html" - (dict - "title" $title - "image" .Params.image - "sizes" site.Params.image_sizes.sections.papers.hero - "context" . - ) -}} +{{ partial "papers/hero.html" . }} + <div class="document-content"> <div class="container"> <ul class="papers"> diff --git a/layouts/papers/single.html b/layouts/papers/single.html index f03da63b98e732d1cde266b92e354fc6b9ebcde3..946db8ac1c84c34946c475ee7850779a436bad0d 100644 --- a/layouts/papers/single.html +++ b/layouts/papers/single.html @@ -1,19 +1,13 @@ {{ define "main" }} - {{- $title := or .Params.header_text .Title -}} - {{- partial "header/hero.html" - (dict - "title" $title - "subtitle" .Params.summary - "image" .Params.image - "sizes" site.Params.image_sizes.sections.papers.hero_single - "context" . - ) -}} +{{ partial "papers/hero.html" . }} + <div class="document-content" itemscope itemtype="https://schema.org/ScholarlyArticle"> <meta itemprop="name" content="{{ partial "PrepareHTML" .Title }}"> {{ partial "papers/sidebar.html" . }} <div class="container"> <div class="content"> + {{ partial "papers/summary.html" . }} {{ partial "papers/abstract.html" . }} {{ partial "papers/authors.html" . }} {{ partial "papers/body.html" . }} diff --git a/layouts/partials/categories/summary.html b/layouts/partials/categories/summary.html index 4ed5a570f5d60bc07d29393efb221e5fa06a7b8b..85e4edf81a14c7fedc7c790f755b91710a4d9224 100644 --- a/layouts/partials/categories/summary.html +++ b/layouts/partials/categories/summary.html @@ -1 +1 @@ -{{- partial "commons/summary.html" . -}} +{{- partial "commons/summary-in-content.html" . -}} diff --git a/layouts/partials/commons/summary.html b/layouts/partials/commons/summary-in-content.html similarity index 62% rename from layouts/partials/commons/summary.html rename to layouts/partials/commons/summary-in-content.html index ba373dae0ab485522d315405e034689c36c3c5c1..5432dbe8f9cfba79fdf392c7b5bb0f746f910eba 100644 --- a/layouts/partials/commons/summary.html +++ b/layouts/partials/commons/summary-in-content.html @@ -1,7 +1,5 @@ -{{- $text := (partial "GetTextFromHTML" .context.Params.summary) -}} - -{{- if $text -}} - +{{ $summary := .summary | default (partial "PrepareText" .context.Params.summary) }} +{{- if eq site.Params.summary.position "content" -}} {{- if .block_wrapped -}} <section class="block block-summary"> <div class="container"> @@ -10,9 +8,7 @@ <div class="container"> {{- end -}} - <p class="lead" role="heading" aria-level="2"> - {{ partial "PrepareText" .context.Params.summary }} - </p> + <p class="lead" role="heading" aria-level="2">{{ $summary }}</p> {{- if .block_wrapped -}} </div> diff --git a/layouts/partials/diplomas/hero-single.html b/layouts/partials/diplomas/hero-single.html index 6bd1f4316602337264941abc45c0d527d90bb5aa..cb95352560d4d4bc659781a8a9f6fa951d0c8419 100644 --- a/layouts/partials/diplomas/hero-single.html +++ b/layouts/partials/diplomas/hero-single.html @@ -1,11 +1,24 @@ {{- $title := or .Params.header_text .Title -}} +{{ $subtitle := "" }} +{{- $summary := partial "PrepareText" .Params.summary -}} +{{ if and (eq site.Params.summary.position "hero") $summary }} + {{ $subtitle = $summary }} +{{ end }} + <header class="hero"> <div class="container"> {{- if .Params.breadcrumb | default true -}} {{ partial "header/breadcrumbs.html" . }} {{- end -}} <div class="content"> - <h1>{{ partial "PrepareHTML" $title }}</h1> + {{- if $subtitle -}} + <hgroup> + <h1>{{ partial "PrepareHTML" $title }}</h1> + <p class="lead">{{ partial "PrepareHTML" $subtitle }}</p> + </hgroup> + {{- else -}} + <h1>{{ partial "PrepareHTML" $title }}</h1> + {{- end -}} {{- if .Params.image }} <figure> {{ partial "commons/image.html" diff --git a/layouts/partials/diplomas/summary.html b/layouts/partials/diplomas/summary.html index 4ed5a570f5d60bc07d29393efb221e5fa06a7b8b..85e4edf81a14c7fedc7c790f755b91710a4d9224 100644 --- a/layouts/partials/diplomas/summary.html +++ b/layouts/partials/diplomas/summary.html @@ -1 +1 @@ -{{- partial "commons/summary.html" . -}} +{{- partial "commons/summary-in-content.html" . -}} diff --git a/layouts/partials/header/hero.html b/layouts/partials/header/hero.html index a172e9549c835fa03a760f73e6b2b4c81ccfcd63..d3c557c9e4868841836d6133966462ead8d3c026 100644 --- a/layouts/partials/header/hero.html +++ b/layouts/partials/header/hero.html @@ -1,9 +1,20 @@ {{- $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 -}} +{{- $subtitle_is_summary := false -}} + +{{ if not $subtitle }} + {{ if and (eq site.Params.summary.position "hero") $summary }} + {{ $subtitle = $summary }} + {{ $subtitle_is_summary = true }} + {{ 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 +23,10 @@ {{- end -}} {{- end -}} <div class="content"> - {{- if .subtitle -}} + {{- if $subtitle -}} <hgroup> <h1>{{ partial "PrepareHTML" .title }}</h1> - <p>{{ partial "PrepareHTML" .subtitle }}</p> + <p {{ if $subtitle_is_summary -}} class="lead" {{- end -}}>{{ partial "PrepareHTML" $subtitle }}</p> </hgroup> {{- else -}} <h1>{{ partial "PrepareHTML" .title }}</h1> diff --git a/layouts/partials/home/summary.html b/layouts/partials/home/summary.html index 4ed5a570f5d60bc07d29393efb221e5fa06a7b8b..85e4edf81a14c7fedc7c790f755b91710a4d9224 100644 --- a/layouts/partials/home/summary.html +++ b/layouts/partials/home/summary.html @@ -1 +1 @@ -{{- partial "commons/summary.html" . -}} +{{- partial "commons/summary-in-content.html" . -}} diff --git a/layouts/partials/organizations/summary.html b/layouts/partials/organizations/summary.html index 4ed5a570f5d60bc07d29393efb221e5fa06a7b8b..85e4edf81a14c7fedc7c790f755b91710a4d9224 100644 --- a/layouts/partials/organizations/summary.html +++ b/layouts/partials/organizations/summary.html @@ -1 +1 @@ -{{- partial "commons/summary.html" . -}} +{{- partial "commons/summary-in-content.html" . -}} diff --git a/layouts/partials/pages/summary.html b/layouts/partials/pages/summary.html index 4ed5a570f5d60bc07d29393efb221e5fa06a7b8b..85e4edf81a14c7fedc7c790f755b91710a4d9224 100644 --- a/layouts/partials/pages/summary.html +++ b/layouts/partials/pages/summary.html @@ -1 +1 @@ -{{- partial "commons/summary.html" . -}} +{{- partial "commons/summary-in-content.html" . -}} diff --git a/layouts/partials/papers/hero.html b/layouts/partials/papers/hero.html new file mode 100644 index 0000000000000000000000000000000000000000..a338c1a5c897c466a86141bce9bf9b84ed8019ba --- /dev/null +++ b/layouts/partials/papers/hero.html @@ -0,0 +1,8 @@ +{{- $title := or .Params.header_text .Title -}} +{{- partial "header/hero.html" + (dict + "title" $title + "image" .Params.image + "sizes" site.Params.image_sizes.sections.papers.hero + "context" . + ) -}} \ No newline at end of file diff --git a/layouts/partials/papers/summary.html b/layouts/partials/papers/summary.html new file mode 100644 index 0000000000000000000000000000000000000000..45c401a2ced34930b5498a17b9ea91189e5c5e78 --- /dev/null +++ b/layouts/partials/papers/summary.html @@ -0,0 +1,6 @@ +{{ $summary := (partial "PrepareText" .Params.summary) }} +{{- if and (eq site.Params.summary.position "content") $summary -}} +<section> + <h2 class="lead">{{ $summary }}</h2> +</section> +{{ end }} \ No newline at end of file diff --git a/layouts/partials/persons/hero-single.html b/layouts/partials/persons/hero-single.html index 37e4352768ca477695b29b538623fe1ef2058ffa..09386e776bdad38e84b2fbd95b87ab061abec497 100644 --- a/layouts/partials/persons/hero-single.html +++ b/layouts/partials/persons/hero-single.html @@ -1,10 +1,24 @@ +{{ $subtitle := "" }} +{{- $summary := partial "PrepareText" .Params.summary -}} +{{ if and (eq site.Params.summary.position "hero") $summary }} + {{ $subtitle = $summary }} +{{ end }} + <header class="hero"> <div class="container"> {{- if eq site.Params.breadcrumb.position "hero-start" -}} {{ partial "header/breadcrumbs.html" . }} {{- end -}} <div class="content"> - <h1>{{ safeHTML (partial "CorrectPunctuation" .Title) }}</h1> + {{- if $subtitle -}} + <hgroup> + <h1>{{ partial "PrepareHTML" .Title }}</h1> + <p class="lead">{{ partial "PrepareHTML" $subtitle }}</p> + </hgroup> + {{- else -}} + <h1>{{ partial "PrepareHTML" .Title }}</h1> + {{- end -}} + {{ if .Params.image }} <div class="avatar"> {{ partial "commons/image.html" diff --git a/layouts/partials/persons/summary.html b/layouts/partials/persons/summary.html index 4ed5a570f5d60bc07d29393efb221e5fa06a7b8b..85e4edf81a14c7fedc7c790f755b91710a4d9224 100644 --- a/layouts/partials/persons/summary.html +++ b/layouts/partials/persons/summary.html @@ -1 +1 @@ -{{- partial "commons/summary.html" . -}} +{{- partial "commons/summary-in-content.html" . -}} diff --git a/layouts/partials/posts/summary.html b/layouts/partials/posts/summary.html index 4ed5a570f5d60bc07d29393efb221e5fa06a7b8b..85e4edf81a14c7fedc7c790f755b91710a4d9224 100644 --- a/layouts/partials/posts/summary.html +++ b/layouts/partials/posts/summary.html @@ -1 +1 @@ -{{- partial "commons/summary.html" . -}} +{{- partial "commons/summary-in-content.html" . -}} diff --git a/layouts/partials/programs/hero-single.html b/layouts/partials/programs/hero-single.html index c0ed3bb3fe702bf986dfc4dd1128b68c2be3cf0a..52958fc94d73abcd24857764f14bcb4c1edaa93b 100644 --- a/layouts/partials/programs/hero-single.html +++ b/layouts/partials/programs/hero-single.html @@ -1,11 +1,23 @@ {{- $title := or .Params.header_text .Title -}} +{{ $subtitle := "" }} +{{- $summary := partial "PrepareText" .Params.summary -}} +{{ if and (eq site.Params.summary.position "hero") $summary }} + {{ $subtitle = $summary }} +{{ end }} <header class="hero hero-program"> <div class="container"> {{- if .Params.breadcrumb | default true -}} {{ partial "header/breadcrumbs.html" . }} {{- end -}} <div class="content"> - <h1>{{ partial "PrepareHTML" $title }}</h1> + {{- if $subtitle -}} + <hgroup> + <h1>{{ partial "PrepareHTML" $title }}</h1> + <p class="lead">{{ partial "PrepareHTML" $subtitle }}</p> + </hgroup> + {{- else -}} + <h1>{{ partial "PrepareHTML" $title }}</h1> + {{- end -}} </div> </div> diff --git a/layouts/partials/programs/summary.html b/layouts/partials/programs/summary.html index 4ed5a570f5d60bc07d29393efb221e5fa06a7b8b..85e4edf81a14c7fedc7c790f755b91710a4d9224 100644 --- a/layouts/partials/programs/summary.html +++ b/layouts/partials/programs/summary.html @@ -1 +1 @@ -{{- partial "commons/summary.html" . -}} +{{- partial "commons/summary-in-content.html" . -}} diff --git a/layouts/partials/sitemap/summary.html b/layouts/partials/sitemap/summary.html index 4ed5a570f5d60bc07d29393efb221e5fa06a7b8b..85e4edf81a14c7fedc7c790f755b91710a4d9224 100644 --- a/layouts/partials/sitemap/summary.html +++ b/layouts/partials/sitemap/summary.html @@ -1 +1 @@ -{{- partial "commons/summary.html" . -}} +{{- partial "commons/summary-in-content.html" . -}} diff --git a/layouts/persons/single.html b/layouts/persons/single.html index b5624399ba57384ecca368b70758c304a217e173..efba062f9ae476493e1f95f52438b38d95e788bd 100644 --- a/layouts/persons/single.html +++ b/layouts/persons/single.html @@ -36,11 +36,9 @@ <div class="informations"> <div> - {{ if (partial "GetTextFromHTML" .Params.summary) }} - <div class="lead" itemprop="description"> - {{ partial "PrepareText" .Params.summary }} - </div> - {{ end }} + {{ partial "persons/summary.html" (dict + "context" . + ) }} {{ if (partial "GetTextFromHTML" .Content) }} <div class="rich-text"> {{ partial "PrepareHTML" .Content }}