From 0b6d928e412d19a679d7ca239303431badc909bb Mon Sep 17 00:00:00 2001 From: Andreas Deininger Date: Wed, 25 Jan 2023 15:43:57 +0100 Subject: [PATCH] Update to bootstrap 5: adapt shortcode 'cardpane' --- CHANGELOG.md | 4 ++++ assets/scss/shortcodes/cards-pane.scss | 3 ++- layouts/shortcodes/card-code.html | 4 ++-- layouts/shortcodes/card.html | 4 ++-- layouts/shortcodes/cardpane.html | 2 +- 5 files changed, 11 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d5cbe0cf14..f9f8f21930 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -21,6 +21,10 @@ For a list of issues targeted for the next release, see the [23Q1][] milestone. - Dropped `$primary-light`. - Dropped `color-diff()`. +- **[Adaptation of shortcode 'cardpane'][1376]. With the update to Bootstrap 5, + the class name used in the `cardpane` shortcode and the associated css file + had to be changed from `card-deck` to `card-group`. + **Other changes**: - Non-breaking changes that result from the Bootstrap v5 upgrade: diff --git a/assets/scss/shortcodes/cards-pane.scss b/assets/scss/shortcodes/cards-pane.scss index f1a66f7759..686ba673ab 100644 --- a/assets/scss/shortcodes/cards-pane.scss +++ b/assets/scss/shortcodes/cards-pane.scss @@ -1,4 +1,4 @@ -.td-card-deck.card-deck { +.td-card-group.card-group { @extend .td-max-width-on-larger-screens; } @@ -8,6 +8,7 @@ .highlight { border: none; + margin: 0; } } diff --git a/layouts/shortcodes/card-code.html b/layouts/shortcodes/card-code.html index a7c5465d83..0e1b668e05 100644 --- a/layouts/shortcodes/card-code.html +++ b/layouts/shortcodes/card-code.html @@ -1,4 +1,4 @@ -
+
{{ $lang := "" }} {{ with $.Get "lang" }} {{ $lang = $.Get "lang" }} @@ -12,7 +12,7 @@ {{- $.Get "header" | markdownify -}}
{{end}} -
+
{{ with $.Inner }} {{- highlight $.Inner $lang $highlight -}} {{ end }} diff --git a/layouts/shortcodes/card.html b/layouts/shortcodes/card.html index f0558133b7..bf97c14d7b 100644 --- a/layouts/shortcodes/card.html +++ b/layouts/shortcodes/card.html @@ -1,4 +1,4 @@ -
+
{{ with $.Get "header" }}
{{ if eq $.Page.File.Ext "md" }} @@ -19,7 +19,7 @@
{{ end }} {{ with $.Get "subtitle" }} -
+
{{ if eq $.Page.File.Ext "md" }} {{ $.Get "subtitle" | markdownify }} {{ else }} diff --git a/layouts/shortcodes/cardpane.html b/layouts/shortcodes/cardpane.html index 2617fdbaa2..1969e2c622 100644 --- a/layouts/shortcodes/cardpane.html +++ b/layouts/shortcodes/cardpane.html @@ -1,3 +1,3 @@ -
+
{{- .Inner -}}
\ No newline at end of file