File tree Expand file tree Collapse file tree 3 files changed +32
-10
lines changed Expand file tree Collapse file tree 3 files changed +32
-10
lines changed Original file line number Diff line number Diff line change @@ -1083,6 +1083,10 @@ blockquote {
1083
1083
/* Removes negative margins from multi-line codeblocks */
1084
1084
margin : 0 ;
1085
1085
}
1086
+
1087
+ .callout-content {
1088
+ margin : 0 ;
1089
+ }
1086
1090
}
1087
1091
1088
1092
blockquote .note {
@@ -1134,14 +1138,16 @@ li > blockquote {
1134
1138
}
1135
1139
1136
1140
blockquote .call-out {
1137
- padding : 0.5rem ;
1141
+ --padding : 0.75rem ;
1142
+ padding : var (--padding );
1138
1143
1139
1144
.call-out-type {
1140
1145
display : block;
1141
- padding : 0.25rem 0.5rem ;
1142
- margin : -0.5rem 0 0.5rem -0.5rem ;
1143
- width : calc (100% + 1rem );
1144
1146
font-weight : 500 ;
1147
+ margin : calc (-1 * var (--padding )) calc (-1 * var (--padding )) var (--padding )
1148
+ calc (-1 * var (--padding ));
1149
+
1150
+ padding : 0.25rem var (--padding );
1145
1151
}
1146
1152
1147
1153
br {
@@ -1157,6 +1163,9 @@ blockquote.caution {
1157
1163
background-color : oklch (var (--color-callout-caution-shadow ));
1158
1164
border-bottom : 1px solid oklch (var (--color-callout-caution-primary ));
1159
1165
}
1166
+ .call-out-type .feather {
1167
+ color : oklch (var (--color-callout-caution-primary ));
1168
+ }
1160
1169
}
1161
1170
1162
1171
blockquote .warning {
@@ -1167,6 +1176,9 @@ blockquote.warning {
1167
1176
background-color : oklch (var (--color-callout-warning-shadow ));
1168
1177
border-bottom : 1px solid oklch (var (--color-callout-warning-primary ));
1169
1178
}
1179
+ .call-out-type .feather {
1180
+ color : oklch (var (--color-callout-warning-primary ));
1181
+ }
1170
1182
}
1171
1183
1172
1184
blockquote .important {
Original file line number Diff line number Diff line change 35
35
36
36
{{/* Render a different block, if "loud" callouts are used */}}
37
37
{{ $specialTitles := slice "Caution" "Warning" "Deprecated" "Important" }}
38
+ {{ $specialTitleIcons := dict
39
+ "Caution" "alert-triangle"
40
+ "Warning" "alert-octagon"
41
+ "Deprecated" "alert-octagon"
42
+ "Important" "arrow-right-circle"
43
+ }}
44
+ {{ $icon := index $specialTitleIcons $title | default "" }}
45
+
38
46
{{ $isSpecialTitle := in $specialTitles $title }}
39
47
{{ if $isSpecialTitle }}
40
48
{{/* Loud callouts */}}
49
+ < div >
41
50
< blockquote class ="{{ $class }} " data-mf ="true " style ="display: none; ">
42
51
< div >
43
- {{ with $icon }}
44
- < i class ="{{ . }} "> </ i >
45
- {{ end }}
46
52
< div class ="call-out-type ">
53
+ {{ partial "feather" (dict "context" . "icon" $icon) .}}
47
54
{{ $title }}
48
55
</ div >
49
- < div class ="special -content ">
56
+ < div class ="callout -content ">
50
57
{{ .content | markdownify }}
51
58
</ div >
52
59
</ div >
53
60
</ blockquote >
61
+ </ div >
54
62
55
63
{{ else }}
56
64
59
67
{{ $cleanTitle := strings.TrimSuffix ":" $title}}
60
68
61
69
< blockquote class ="{{ $class }} note " data-mf ="true " style ="display: none; " data-title ="{{ $cleanTitle }} ">
62
- < div >
70
+ < div class =" callout-content " >
63
71
{{ with $icon }}
64
72
< i class ="{{ . }} "> </ i >
65
73
{{ end }}
74
+ < div class ="callout-content ">
66
75
{{ .content | markdownify }}
76
+ </ div >
67
77
</ div >
68
78
</ blockquote >
69
79
Original file line number Diff line number Diff line change 6
6
{{</ call-out > }}
7
7
8
8
Backwards compatibility usage:
9
- {{< call-out "warning" "Custom title""fa fa-check-circle" "true"> }}
9
+ {{< call-out "warning" "Custom title" "fa fa-check-circle" "true"> }}
10
10
This callout uses the icon check-circle. **This should be an inline callout.**
11
11
{{</ call-out > }}
12
12
You can’t perform that action at this time.
0 commit comments