diff --git a/assets/sass/_theme/_utils.sass b/assets/sass/_theme/_utils.sass index a5dad852dd8d72ddea56b888b0b4aa690eb058bf..a19eb3280bafdca565a32abed40f011e10dbf7a0 100644 --- a/assets/sass/_theme/_utils.sass +++ b/assets/sass/_theme/_utils.sass @@ -330,13 +330,15 @@ @mixin top-flex @include in-page-without-sidebar + align-items: baseline display: flex .block-title width: col(4) + &:not(.hidden) + .description + margin-left: $grid-gutter .description margin-top: 0 width: col(8) - margin-left: $grid-gutter @mixin collapsed-figcaption figcaption diff --git a/assets/sass/_theme/blocks/files.sass b/assets/sass/_theme/blocks/files.sass index 13a0c4ad469869ee170abedf06e90fc47dc17c45..f890850fd3f325ead5e1f66abe9cdb3f12002193 100644 --- a/assets/sass/_theme/blocks/files.sass +++ b/assets/sass/_theme/blocks/files.sass @@ -1,4 +1,6 @@ .block-files + .top + @include top-flex .files @include list-reset li @@ -42,13 +44,5 @@ @include grid(2, desktop, half($grid-gutter)) @include in-page-without-sidebar - .top - display: flex - .block-title - width: col(4) - .description - margin-top: 0 - width: col(8) - margin-left: $grid-gutter .files @include grid(3, desktop, half($grid-gutter)) diff --git a/assets/sass/_theme/blocks/pages.sass b/assets/sass/_theme/blocks/pages.sass index 5002944cd3a659ec84972411e6b46925db3e561a..2f96c675ba9584173bce3c7a827c4ccd39c08d97 100644 --- a/assets/sass/_theme/blocks/pages.sass +++ b/assets/sass/_theme/blocks/pages.sass @@ -1,5 +1,6 @@ .block-pages .top + @include top-flex a text-decoration: none .grid, .cards @@ -39,17 +40,11 @@ @include in-page-without-sidebar .top - @include grid - .block-title - grid-column: 1 / 5 - a - @include icon(arrow, after, true) - @include hover-translate-icon - .description - @include h2 - grid-column: 5 / 13 - margin-top: -0.25em - font-style: $h2-size-desktop + a + @include icon(arrow, after, true) + @include hover-translate-icon + .description + @include h2 &--grid .grid @@ -186,3 +181,31 @@ display: block li + li margin-top: $spacing0 + + &--alternate + .grid + article .media img + aspect-ratio: unset + @include media-breakpoint-up(desktop) + article + width: col(4, 8) + &:not(:first-child) + margin-top: -5% + &:nth-child(even) + margin-left: auto + &.image-portrait + + .image-portrait + margin-top: -30% + + .image-square, + + .image-landscape + margin-top: -15% + @include in-page-without-sidebar + .top + .description + @include body-text + .grid + width: col(10) + margin-left: auto + margin-right: auto + article + width: col(4, 10) \ No newline at end of file diff --git a/assets/sass/_theme/blocks/posts.sass b/assets/sass/_theme/blocks/posts.sass index e818b3b05ace0cf9fec06223d377484e2acb1604..ea96eb955c498b7473f868b2a1db5f2a7c6a0d5f 100644 --- a/assets/sass/_theme/blocks/posts.sass +++ b/assets/sass/_theme/blocks/posts.sass @@ -2,10 +2,8 @@ .top margin-bottom: $spacing2 a - @include hover-translate-icon @include icon(arrow-right, after, true) - align-items: flex-end - display: flex + @include hover-translate-icon text-decoration: none .posts @include grid(1) diff --git a/assets/sass/_theme/design-system/typography.sass b/assets/sass/_theme/design-system/typography.sass index 593d2941f7872f0aa01607de888076d1f847421f..f41c48e2a1c87dbbc48194ae348a616bdd7f2677 100644 --- a/assets/sass/_theme/design-system/typography.sass +++ b/assets/sass/_theme/design-system/typography.sass @@ -316,7 +316,7 @@ sup font-family: 'Icon' font-style: normal font-weight: 400 - src: url('../fonts/fonticons/IconFont.woff2') format("woff2"), url('../fonts/fonticons/IconFont.woff') format("woff"), url('../fonts/fonticons/IconFont.ttf') format("truetype") + src: url('/assets/fonts/fonticons/IconFont.woff2') format("woff2"), url('/assets/fonts/fonticons/IconFont.woff') format("woff"), url('/assets/fonts/fonticons/IconFont.ttf') format("truetype") @each $name, $glyph in $icons .icon-#{$name} diff --git a/layouts/pages/list.html b/layouts/pages/list.html index b2ece41f20dd44b00502bbea34a0daf745664620..5a9b5ca5fe4567b78f0c32a9b328acf944ba0da9 100644 --- a/layouts/pages/list.html +++ b/layouts/pages/list.html @@ -28,7 +28,6 @@ <div class="block block-pages block-pages--grid {{ $page_class }}"> <div class="container"> <div class="block-content"> - {{- partial "blocks/default_title.html" "pages" -}} {{- partial "blocks/templates/pages/grid.html" (dict "pages" .Params.children "show_images" true diff --git a/layouts/partials/blocks/default_title.html b/layouts/partials/blocks/default_title.html deleted file mode 100644 index 14c9b99b4a5628a6e5146281c3bc0c2b74f4415e..0000000000000000000000000000000000000000 --- a/layouts/partials/blocks/default_title.html +++ /dev/null @@ -1 +0,0 @@ -<p class="block-title hidden">{{- i18n (printf "blocks.%s.title" . ) -}}</p> \ No newline at end of file diff --git a/layouts/partials/blocks/templates/call_to_action.html b/layouts/partials/blocks/templates/call_to_action.html index c8158d22a16051092723261a5476dbe2caa02e32..8860ebe6d623deff5ddd2599e2e747cf63c134ab 100644 --- a/layouts/partials/blocks/templates/call_to_action.html +++ b/layouts/partials/blocks/templates/call_to_action.html @@ -8,11 +8,9 @@ <div class="block-content"> <div class="call_to_action call_to_action--with{{ if not .image }}out{{ end }}-image"> <div> - {{- if not $title -}} - {{ partial "blocks/default_title.html" $template }} - {{ else }} + {{ if $title }} <p class="block-title">{{ partial "PrepareHTML" $title }}</p> - {{ end -}} + {{ end }} {{- if (partial "GetTextFromHTML" .text) }} <div class="description"> diff --git a/layouts/partials/blocks/templates/chapter.html b/layouts/partials/blocks/templates/chapter.html index d56bffe6f94b1ed2bb159a4e0e4f3b06eb4c682a..a198f8f2d514795a6d9080826b2105b1496ca344 100644 --- a/layouts/partials/blocks/templates/chapter.html +++ b/layouts/partials/blocks/templates/chapter.html @@ -18,13 +18,11 @@ <div class="block-content"> <div class="chapter"> <div class="text"> - {{- if not $title -}} - {{ partial "blocks/default_title.html" $template }} - {{ else }} + {{ if $title }} <div class="top"> <p class="block-title">{{ partial "PrepareHTML" $title }}</p> </div> - {{ end -}} + {{ end }} {{ if (partial "GetTextFromHTML" .text) -}} <div class="rich-text"> {{ partial "PrepareHTML" .text }} diff --git a/layouts/partials/blocks/templates/contact.html b/layouts/partials/blocks/templates/contact.html index d8c96ebded4567faaa96812c1ec5fa9e0003e9b5..883b8fec3bad00a05c881ab6169ea463fbb3cdba 100644 --- a/layouts/partials/blocks/templates/contact.html +++ b/layouts/partials/blocks/templates/contact.html @@ -6,12 +6,12 @@ <div class="{{ $class }}{{ if $title }} block-with-title{{ end }}"> <div class="container"> <div class="block-content"> - {{- if not $title -}} - {{ partial "blocks/default_title.html" $template }} - {{ else }} + {{ if or $title .description }} <div class="top"> + {{ if $title }} <p class="block-title">{{ partial "PrepareHTML" $title }}</p> - {{- if .description }} + {{ end }} + {{- if .description }} <div class="description"> {{ partial "PrepareHTML" .description }} </div> diff --git a/layouts/partials/blocks/templates/datatable.html b/layouts/partials/blocks/templates/datatable.html index c7b3e0021ceb59c47bad077ef79171344d19720a..7d708acfd85651e6d8f072ba8229d13846238db0 100644 --- a/layouts/partials/blocks/templates/datatable.html +++ b/layouts/partials/blocks/templates/datatable.html @@ -6,9 +6,7 @@ <div class="block block-datatable{{ if $title }} block-with-title{{ end }}"> <div class="container"> <div class="block-content"> - {{- if not $title -}} - {{ partial "blocks/default_title.html" $template }} - {{ else }} + {{ if or $title .description }} <div class="top"> <p class="block-title">{{ partial "PrepareHTML" $title }}</p> {{ with .description }} @@ -17,7 +15,8 @@ </div> {{ end }} </div> - {{ end -}} + {{ end }} + <div class="table-responsive"> <table> {{- if .caption }} diff --git a/layouts/partials/blocks/templates/definitions.html b/layouts/partials/blocks/templates/definitions.html index a86362848064e5b001a4a6f9b01119278e833dc9..359028205783952b78e29b3261838b2bdbbb5cdb 100644 --- a/layouts/partials/blocks/templates/definitions.html +++ b/layouts/partials/blocks/templates/definitions.html @@ -5,9 +5,7 @@ <div class="block block-definitions{{ if $title }} block-with-title{{ end }}"> <div class="container"> <div class="block-content"> - {{- if not $title -}} - {{ partial "blocks/default_title.html" $template }} - {{ else }} + {{- if $title -}} <div class="top"> <p class="block-title">{{ partial "PrepareHTML" $title }}</p> </div> diff --git a/layouts/partials/blocks/templates/embed.html b/layouts/partials/blocks/templates/embed.html index ab8838934aa7f4475fc78101a2ffe5c329a72531..7d019bb9c885a2d8a5cf39da0087441ab0bcd1b5 100644 --- a/layouts/partials/blocks/templates/embed.html +++ b/layouts/partials/blocks/templates/embed.html @@ -5,9 +5,7 @@ <div class="block block-embed{{ if $title }} block-with-title{{ end }}"> <div class="container"> <div class="block-content"> - {{- if not $title -}} - {{ partial "blocks/default_title.html" $template }} - {{ else }} + {{- if $title -}} <div class="top"> <p class="block-title">{{ partial "PrepareHTML" $title }}</p> </div> diff --git a/layouts/partials/blocks/templates/features.html b/layouts/partials/blocks/templates/features.html index 8fe48da246e9831f91570a6539ee07c60cc7fb04..bd563ad86ba0cd8705652e16711c96c237623564 100644 --- a/layouts/partials/blocks/templates/features.html +++ b/layouts/partials/blocks/templates/features.html @@ -6,11 +6,9 @@ <div class="block block-features{{ if $title }} block-with-title{{ end }}"> <div class="container"> <div class="block-content"> - {{- if (or $title .description) }} + {{- if or $title .description }} <div class="top"> - {{- if not $title -}} - {{ partial "blocks/default_title.html" $template }} - {{ else }} + {{- if $title -}} <p class="block-title">{{ partial "PrepareHTML" $title }}</p> {{ end -}} {{- if .description }} diff --git a/layouts/partials/blocks/templates/files.html b/layouts/partials/blocks/templates/files.html index 5de8a9b0b31f997618cc8bd980b2bb42ceddbf92..c51a97e790895b9072bff1b2eff858bb0eadd4da 100644 --- a/layouts/partials/blocks/templates/files.html +++ b/layouts/partials/blocks/templates/files.html @@ -7,9 +7,7 @@ <div class="block-content"> {{- if or $title .description }} <div class="top"> - {{- if not $title -}} - {{ partial "blocks/default_title.html" $template }} - {{ else }} + {{- if $title -}} <p class="block-title">{{ partial "PrepareHTML" $title }}</p> {{ end -}} {{- if .description }} diff --git a/layouts/partials/blocks/templates/gallery.html b/layouts/partials/blocks/templates/gallery.html index 9abd4b3bc3b5bbba3720ddcfb94914b68488f997..5a446fcee30502a09d4dc2b87a306156013d6a6e 100644 --- a/layouts/partials/blocks/templates/gallery.html +++ b/layouts/partials/blocks/templates/gallery.html @@ -10,11 +10,9 @@ <div class="block block-gallery{{ if $title }} block-with-title{{ end }} {{ $layout_class }}"> <div class="container"> <div class="block-content"> - {{- if (or $title .description) }} + {{- if or $title .description }} <div class="top"> - {{- if not $title -}} - {{ partial "blocks/default_title.html" $template }} - {{ else }} + {{- if $title -}} <p class="block-title">{{ partial "PrepareHTML" $title }}</p> {{ end -}} {{- if .description }} diff --git a/layouts/partials/blocks/templates/image.html b/layouts/partials/blocks/templates/image.html index 177b519141a48fd4d05a1f167268cf7766f61471..4d468ac2031eb18a1c22f3ba0e56a993ba287baf 100644 --- a/layouts/partials/blocks/templates/image.html +++ b/layouts/partials/blocks/templates/image.html @@ -11,9 +11,7 @@ <div class="block block-image{{ if $title }} block-with-title{{ end }} {{ $image_class -}}"> <div class="container"> <div class="block-content"> - {{- if not $title -}} - {{ partial "blocks/default_title.html" $template }} - {{ else }} + {{- if $title -}} <div class="top"> <p class="block-title">{{ partial "PrepareHTML" $title }}</p> </div> diff --git a/layouts/partials/blocks/templates/key_figures.html b/layouts/partials/blocks/templates/key_figures.html index f6c0e6ebf0dc56640a3df515fa4b119963f5d3f8..071b516f31893bd7e3252c2d3a332d8288e74b48 100644 --- a/layouts/partials/blocks/templates/key_figures.html +++ b/layouts/partials/blocks/templates/key_figures.html @@ -8,9 +8,7 @@ <div class="block-content"> {{- if (or $title .description) }} <div class="top"> - {{- if not $title -}} - {{ partial "blocks/default_title.html" $template }} - {{ else }} + {{- if $title -}} <p class="block-title">{{ partial "PrepareHTML" $title }}</p> {{ end -}} {{- if .description }} diff --git a/layouts/partials/blocks/templates/organization_chart.html b/layouts/partials/blocks/templates/organization_chart.html index fb9a5079ed9465c792d212c08eb29c8c95263d45..14f7fad4bb93410b4f414b1991ae5dfea2c1b61f 100644 --- a/layouts/partials/blocks/templates/organization_chart.html +++ b/layouts/partials/blocks/templates/organization_chart.html @@ -12,9 +12,7 @@ <div class="block-content"> {{ if (or $title .description) -}} <div class="top"> - {{- if not $title -}} - {{ partial "blocks/default_title.html" $template }} - {{ else }} + {{- if $title -}} <p class="block-title">{{ partial "PrepareHTML" $title }}</p> {{ end -}} {{- if .description }} diff --git a/layouts/partials/blocks/templates/pages.html b/layouts/partials/blocks/templates/pages.html index 1488d338229f961a1e272e692e4ff2f936416d68..fefcf6d943542a5e00bae10b87528c3e61aea91a 100644 --- a/layouts/partials/blocks/templates/pages.html +++ b/layouts/partials/blocks/templates/pages.html @@ -52,9 +52,7 @@ <div class="block block-pages{{ if $title }} block-with-title{{ end }} {{ $layout_class }} {{ $page_class }}"> <div class="container"> <div class="block-content"> - {{- if not $title -}} - {{ partial "blocks/default_title.html" $template }} - {{ else }} + {{- if $title -}} <div class="top"> {{ partial "blocks/title_with_link.html" (dict "title" $title diff --git a/layouts/partials/blocks/templates/pages/alternate.html b/layouts/partials/blocks/templates/pages/alternate.html index f9df7a47ac51582f48ba0dfa2eb75e29bed878bc..1f5da346c6e1df8cb2cde68d15d590b94582fef4 100644 --- a/layouts/partials/blocks/templates/pages/alternate.html +++ b/layouts/partials/blocks/templates/pages/alternate.html @@ -1,11 +1,17 @@ {{ $show_descriptions := .show_descriptions }} {{ $show_images := .show_images }} +{{ $image_class := "" }} -<div class="cards"> +<div class="grid"> {{ range .pages }} {{- $page := partial "GetPageByUrl" .page -}} {{ with $page }} - <article class="card"> + {{ if .Params.image }} + {{ $image_class = printf "image-%s" (partial "GetImageDirection" .Params.image) }} + {{ else }} + {{ $image_class = "" }} + {{ end }} + <article class="{{ $image_class }}"> <h3> <a href="{{- .Permalink -}}"> {{- partial "PrepareHTML" .Title -}} @@ -23,8 +29,6 @@ {{ end }} {{ end }} - <p class="more meta" aria-hidden="true">{{- i18n "commons.more" -}}</p> - {{ if $show_images }} {{- partial "pages/page-media.html" . -}} {{ end }} diff --git a/layouts/partials/blocks/templates/partners.html b/layouts/partials/blocks/templates/partners.html index 6bc0c586847bb0423da484864638da3bf8efae25..3815a63ca858085bae957d885adb335da8cb4d8f 100644 --- a/layouts/partials/blocks/templates/partners.html +++ b/layouts/partials/blocks/templates/partners.html @@ -22,11 +22,9 @@ <div class="block block-partners{{ if $title }} block-with-title{{ end }} {{ $layout_class }}"> <div class="container"> <div class="block-content"> - {{ if (or $title .description) -}} + {{ if or $title .description -}} <div class="top"> - {{- if not $title -}} - {{ partial "blocks/default_title.html" $template }} - {{ else }} + {{- if $title -}} <p class="block-title">{{ partial "PrepareHTML" $title }}</p> {{ end -}} {{- if .description }} diff --git a/layouts/partials/blocks/templates/posts.html b/layouts/partials/blocks/templates/posts.html index 67344949a07d2f6401d04ee584e6be4a57c0d1c3..e6e13fc5f1313457401d709127fc8269d11f2a66 100644 --- a/layouts/partials/blocks/templates/posts.html +++ b/layouts/partials/blocks/templates/posts.html @@ -23,9 +23,7 @@ {{ $title_link = $posts_page.Permalink }} {{- end -}} - {{- if not $title -}} - {{ partial "blocks/default_title.html" $template }} - {{ else }} + {{- if $title -}} {{ partial "blocks/title_with_link.html" (dict "title" $title "link" $title_link diff --git a/layouts/partials/blocks/templates/programs.html b/layouts/partials/blocks/templates/programs.html index 93c167da549d86a17fb0865c97ad4f5b1153297d..2425196971cdde4b9ce38895edb8292a1fb16f74 100644 --- a/layouts/partials/blocks/templates/programs.html +++ b/layouts/partials/blocks/templates/programs.html @@ -5,9 +5,7 @@ <div class="block block-programs{{ if $title }} block-with-title{{ end }}"> <div class="container"> <div class="block-content"> - {{- if not $title -}} - {{ partial "blocks/default_title.html" $template }} - {{ else }} + {{- if $title -}} <div class="top"> <p class="block-title">{{ partial "PrepareHTML" $title }}</p> </div> diff --git a/layouts/partials/blocks/templates/sound.html b/layouts/partials/blocks/templates/sound.html index be8fa4a970769c5e5ef79461c01cd326f78c8c6e..277e803ef014a95179d60dbef423dd806b5c51bb 100644 --- a/layouts/partials/blocks/templates/sound.html +++ b/layouts/partials/blocks/templates/sound.html @@ -6,9 +6,7 @@ <div class="container"> <div class="block-content"> <div> - {{- if not $title -}} - {{ partial "blocks/default_title.html" $template }} - {{ else }} + {{- if $title -}} <div class="top"> <p class="block-title">{{ partial "PrepareHTML" $title }}</p> </div> diff --git a/layouts/partials/blocks/templates/testimonials.html b/layouts/partials/blocks/templates/testimonials.html index 6a5ec4d3d826311c7f092f08cea1625e0b8225fc..123c97b5d101033eb79a67b4c6001fcc93cf5dd5 100644 --- a/layouts/partials/blocks/templates/testimonials.html +++ b/layouts/partials/blocks/templates/testimonials.html @@ -12,9 +12,7 @@ <div class="block block-testimonials{{ if $title }} block-with-title{{ end }}{{ if $is_carousel}} with-carousel{{ end }}"> <div class="container"> <div class="block-content"> - {{- if not $title -}} - {{ partial "blocks/default_title.html" $template }} - {{ else }} + {{- if $title -}} <p class="block-title hidden">{{ partial "PrepareHTML" $title }}</p> {{ end -}} diff --git a/layouts/partials/blocks/templates/timeline/horizontal.html b/layouts/partials/blocks/templates/timeline/horizontal.html index d95d8696d6ec9dfca751d136a7e5bfdc0f0a162b..4fbbf21747457a77b4032b21c44b3ae1bba117ef 100644 --- a/layouts/partials/blocks/templates/timeline/horizontal.html +++ b/layouts/partials/blocks/templates/timeline/horizontal.html @@ -1,7 +1,5 @@ <div class="timeline"> - {{- if not .title -}} - {{ partial "blocks/default_title.html" .template }} - {{ else }} + {{- if .title -}} <p class="block-title">{{ partial "PrepareHTML" .title }}</p> {{ end -}} diff --git a/layouts/partials/blocks/templates/timeline/vertical.html b/layouts/partials/blocks/templates/timeline/vertical.html index 8c0b02ef713440934d6b37a690b34f405cf23a78..cbab7e2d056814e8e23d9ce05440a3d16df3ff0c 100644 --- a/layouts/partials/blocks/templates/timeline/vertical.html +++ b/layouts/partials/blocks/templates/timeline/vertical.html @@ -1,7 +1,5 @@ <div class="block-content"> - {{- if not .title -}} - {{ partial "blocks/default_title.html" .template }} - {{ else }} + {{- if .title -}} <div class="top"> <p class="block-title">{{ partial "PrepareHTML" .title }}</p> </div> diff --git a/layouts/partials/blocks/templates/video.html b/layouts/partials/blocks/templates/video.html index 9d664872d06b88e7f4f27b12d20ef395795066a8..00c653e6f8ecee5f5b29951c8a7c908f127a4cbc 100644 --- a/layouts/partials/blocks/templates/video.html +++ b/layouts/partials/blocks/templates/video.html @@ -6,9 +6,7 @@ <div class="container"> <div class="block-content"> <div> - {{- if not $title -}} - {{ partial "blocks/default_title.html" $template }} - {{ else }} + {{- if $title -}} <div class="top"> <p class="block-title">{{ partial "PrepareHTML" $title }}</p> </div> diff --git a/layouts/partials/publications/downloads.html b/layouts/partials/publications/downloads.html index 29e17952553361b86a2d5cbafa3be56115631564..379bba754f489ef6633dab92ecaeaa57467decab 100644 --- a/layouts/partials/publications/downloads.html +++ b/layouts/partials/publications/downloads.html @@ -3,7 +3,9 @@ <h2 class="h5">{{ i18n "publications.downloads" }}</h2> <nav> {{ range .Params.links }} - <a href="{{ .url }}" target="_blank" rel="noopener" class="link-btn">{{ .label }}</a> + {{ if .url }} + <a href="{{ .url }}" target="_blank" rel="noopener" class="link-btn">{{ .label }}</a> + {{ end }} {{ end }} </nav> </div>