Skip to content

Commit

Permalink
Update to bootstrap 5: adapt shortcode 'cardpane'
Browse files Browse the repository at this point in the history
  • Loading branch information
deining committed Feb 1, 2023
1 parent c8530e3 commit 0b6d928
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 6 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
3 changes: 2 additions & 1 deletion assets/scss/shortcodes/cards-pane.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.td-card-deck.card-deck {
.td-card-group.card-group {
@extend .td-max-width-on-larger-screens;
}

Expand All @@ -8,6 +8,7 @@

.highlight {
border: none;
margin: 0;
}
}

Expand Down
4 changes: 2 additions & 2 deletions layouts/shortcodes/card-code.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<div class="td-card card">
<div class="td-card card border me-4">
{{ $lang := "" }}
{{ with $.Get "lang" }}
{{ $lang = $.Get "lang" }}
Expand All @@ -12,7 +12,7 @@
{{- $.Get "header" | markdownify -}}
</div>
{{end}}
<div class="card-body code p-l0 m-0">
<div class="card-body code p-0 m-0">
{{ with $.Inner }}
{{- highlight $.Inner $lang $highlight -}}
{{ end }}
Expand Down
4 changes: 2 additions & 2 deletions layouts/shortcodes/card.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<div class="td-card card mb-4">
<div class="td-card card border me-4">
{{ with $.Get "header" }}
<div class="card-header">
{{ if eq $.Page.File.Ext "md" }}
Expand All @@ -19,7 +19,7 @@ <h5 class="card-title">
</h5>
{{ end }}
{{ with $.Get "subtitle" }}
<h6 class="card-title mb-2 text-muted">
<h6 class="card-title ms-2 text-muted">
{{ if eq $.Page.File.Ext "md" }}
{{ $.Get "subtitle" | markdownify }}
{{ else }}
Expand Down
2 changes: 1 addition & 1 deletion layouts/shortcodes/cardpane.html
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
<div class="td-card-deck card-deck mb-4">
<div class="td-card-group card-group p-0 mb-4">
{{- .Inner -}}
</div>

0 comments on commit 0b6d928

Please sign in to comment.