88 {{ errorf "Invalid parameter 'inline'='%s' passed to blockquote partial from '%s'. Allowed values: true, false" $inlineParam .Page.Path }}
99{{ end }}
1010
11+ {{/* Figure out inline/side and set class accordingly */}}
1112{{ $inline := eq $inlineParam "true" }}
1213{{ $sideOption := "side-callout" }}
1314{{ $inlineOption := "inline-callout" }}
1819 {{ $class = printf "%s %s" $class $inlineOption }}
1920{{ end }}
2021
22+ {{/* Render a different block, if "loud" callouts are used */}}
23+ {{ $specialTitles := slice "Caution" "Warning" "Deprecated" "Important" }}
24+ {{ $isSpecialTitle := in $specialTitles $title }}
25+
26+ {{/* Old frame callout */}}
2127< blockquote class ="{{ $class }} " data-mf ="false ">
2228 < div >
2329 {{ with $icon }}
2834 </ div >
2935</ blockquote >
3036
31- < blockquote class ="{{ $class }} " data-mf ="true " style ="display: none; ">
37+
38+ {{ if $isSpecialTitle }}
39+ {{/* Loud callouts */}}
40+ < blockquote class ="{{ $class }} " data-mf ="true " style ="display: none; ">
41+ < div >
42+ {{ with $icon }}
43+ < i class ="{{ . }} "> </ i >
44+ {{ end }}
45+ < div class ="special-header ">
46+ < h3 > {{ $title }}</ h3 >
47+ </ div >
48+ < div class ="special-content ">
49+ I AM THE SPECIAL CALLOUT - NOT FINISHED YET
50+ {{ .content | markdownify }}
51+ </ div >
52+ </ div >
53+ </ blockquote >
54+
55+ {{ else }}
56+
57+ {{/* "Generic" mf callout */}}
58+
59+ {{ $cleanTitle := strings.TrimSuffix ":" $title}}
60+
61+ < blockquote class ="{{ $class }} note " data-mf ="true " style ="display: none; " data-title ="{{ $cleanTitle }} ">
3262 < div >
3363 {{ with $icon }}
3464 < i class ="{{ . }} "> </ i >
3565 {{ end }}
36- {{ with $title }}
37- < h2 class ="callout-title "> {{ $title }}</ h2 >
38- {{ end }}
3966 {{ .content | markdownify }}
4067 </ div >
41- </ blockquote >
68+ </ blockquote >
69+
70+ {{ end }}
0 commit comments