From f9bc2f3f94cb3e9fd28f344e95c632453ebf7309 Mon Sep 17 00:00:00 2001 From: alexisben <alex@noesya.coop> Date: Mon, 10 Jul 2023 17:44:55 +0200 Subject: [PATCH] remove default title --- assets/sass/_theme/_utils.sass | 2 +- layouts/pages/list.html | 1 - layouts/partials/blocks/default_title.html | 1 - layouts/partials/blocks/templates/call_to_action.html | 6 ++---- layouts/partials/blocks/templates/chapter.html | 6 ++---- layouts/partials/blocks/templates/contact.html | 8 ++++---- layouts/partials/blocks/templates/datatable.html | 7 +++---- layouts/partials/blocks/templates/definitions.html | 4 +--- layouts/partials/blocks/templates/embed.html | 4 +--- layouts/partials/blocks/templates/features.html | 6 ++---- layouts/partials/blocks/templates/files.html | 4 +--- layouts/partials/blocks/templates/gallery.html | 6 ++---- layouts/partials/blocks/templates/image.html | 4 +--- layouts/partials/blocks/templates/key_figures.html | 4 +--- layouts/partials/blocks/templates/organization_chart.html | 4 +--- layouts/partials/blocks/templates/pages.html | 4 +--- layouts/partials/blocks/templates/partners.html | 6 ++---- layouts/partials/blocks/templates/posts.html | 4 +--- layouts/partials/blocks/templates/programs.html | 4 +--- layouts/partials/blocks/templates/sound.html | 4 +--- layouts/partials/blocks/templates/testimonials.html | 4 +--- .../partials/blocks/templates/timeline/horizontal.html | 4 +--- layouts/partials/blocks/templates/timeline/vertical.html | 4 +--- layouts/partials/blocks/templates/video.html | 4 +--- 24 files changed, 32 insertions(+), 73 deletions(-) delete mode 100644 layouts/partials/blocks/default_title.html diff --git a/assets/sass/_theme/_utils.sass b/assets/sass/_theme/_utils.sass index 0478716b..a19eb328 100644 --- a/assets/sass/_theme/_utils.sass +++ b/assets/sass/_theme/_utils.sass @@ -330,7 +330,7 @@ @mixin top-flex @include in-page-without-sidebar - align-items: basline + align-items: baseline display: flex .block-title width: col(4) diff --git a/layouts/pages/list.html b/layouts/pages/list.html index b2ece41f..5a9b5ca5 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 14c9b99b..00000000 --- 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 c8158d22..8860ebe6 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 d56bffe6..a198f8f2 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 d8c96ebd..883b8fec 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 c7b3e002..7d708acf 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 a8636284..35902820 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 ab883893..7d019bb9 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 8fe48da2..bd563ad8 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 5de8a9b0..c51a97e7 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 9abd4b3b..5a446fce 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 177b5191..4d468ac2 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 f6c0e6eb..071b516f 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 fb9a5079..14f7fad4 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 1488d338..fefcf6d9 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/partners.html b/layouts/partials/blocks/templates/partners.html index 6bc0c586..3815a63c 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 67344949..e6e13fc5 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 93c167da..24251969 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 be8fa4a9..277e803e 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 6a5ec4d3..123c97b5 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 d95d8696..4fbbf217 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 8c0b02ef..cbab7e2d 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 9d664872..00c653e6 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> -- GitLab