Skip to content

Commit 0eeb1d4

Browse files
committed
fix: Add default option to callout to be inline
1 parent ef072ee commit 0eeb1d4

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

assets/css/v2/style.css

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -775,6 +775,9 @@ h2 {
775775

776776
/* tables */
777777
table {
778+
position: relative;
779+
z-index: -1;
780+
778781
td {
779782
padding: var(--table-row-space-between) 0;
780783
}

layouts/shortcodes/call-out.html

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,14 @@
1+
{{ $class := .Get 0 }}
2+
{{ $sideOption := "side-callout" }}
3+
{{ $inlineOption := "inline-callout" }}
4+
5+
<!-- Add default option for callouts that are "inline" if one is not provided -->
6+
{{ if and (not (strings.Contains $class $inlineOption)) (not (strings.Contains $class $sideOption)) }}
7+
{{ $class = printf "%s %s" $class $inlineOption }}
8+
{{ end }}
9+
110
<!-- Blockquote element with a class that is the first parameter passed to the shortcode -->
2-
<blockquote class="{{ .Get 0 }} side-callout">
11+
<blockquote class="{{ $class }}">
312
<div>
413
<!-- Check if the third parameter (icon class) is provided -->
514
{{ with .Get 2 }}

0 commit comments

Comments
 (0)