File tree Expand file tree Collapse file tree 5 files changed +28
-28
lines changed Expand file tree Collapse file tree 5 files changed +28
-28
lines changed Original file line number Diff line number Diff line change 1+ {{<banner "caution" "Under development">}}
2+ <br >
3+ This product on our example site is under development and changes are being added frequently.
4+ <br >
5+ Please reach out to <strong >#friends-of-the-docs</strong > on Slack to ask questions.
6+ {{</banner >}}
Original file line number Diff line number Diff line change @@ -3,6 +3,11 @@ description: Test pages for nginx-hugo-theme
33title : Test pages
44weight : 100
55nd-landing-page : true
6+ cascade :
7+ nd-banner :
8+ enabled : true
9+ start-date : 2025-01-01
10+ md : /_banners/test-product-intro.md
611---
712{{<card-layout >}}
813 {{<card-section showAsCards =" true " >}}
Original file line number Diff line number Diff line change 3434
3535
3636{{/* Render a different block, if "loud" callouts are used */}}
37+ {{ $type := (index (split $class " ") 0) | strings.FirstUpper }}
3738{{ $specialTitles := slice "Caution" "Warning" "Deprecated" "Important" }}
3839{{ $specialTitleIcons := dict
3940 "Caution" "alert-triangle"
4041 "Warning" "alert-octagon"
4142 "Deprecated" "alert-octagon"
4243 "Important" "arrow-right-circle"
4344}}
44- {{ $icon := index $specialTitleIcons $title | default "" }}
45+ {{ $icon := index $specialTitleIcons $type | default "" }}
4546
46- {{ $isSpecialTitle := in $specialTitles $title }}
47+ {{ $isSpecialTitle := in $specialTitles $type }}
4748{{ if $isSpecialTitle }}
48- {{/* Loud callouts */}}
49+ {{/* Loud callouts */}}
50+ < blockquote class ="{{ $class }} " data-mf ="true " style ="display: none; ">
4951 < div >
50- < blockquote class ="{{ $class }} " data-mf ="true " style ="display: none; ">
51- < div >
52- < div class ="call-out-type ">
53- {{ partial "feather" (dict "context" . "icon" $icon) .}}
54- {{ $title }}
55- </ div >
56- < div class ="callout-content ">
57- {{ .content | markdownify }}
58- </ div >
52+ < div class ="call-out-type ">
53+ {{ partial "feather" (dict "context" . "icon" $icon) .}}
54+ {{ $title }}
5955 </ div >
60- </ blockquote >
61- </ div >
56+ < div class ="callout-content ">
57+ {{ .content | markdownify }}
58+ </ div >
59+ </ div >
60+ </ blockquote >
6261
6362{{ else }}
6463
Original file line number Diff line number Diff line change 11{{- $type := .Get 0 | default (.Get "type") | default "" -}}
22{{- $title := .Get 1 | default (.Get "title") | default "" -}}
33{{ partial "callout.html" (dict
4- "class" $type
4+ "class" (printf "%s %s" $type "call-out")
55 "title" $title
66 "icon" "fa-solid fa-triangle-exclamation"
77 "inline" true
8+ "type" ($type | strings.FirstUpper)
89 "content" .Inner
910) }}
Original file line number Diff line number Diff line change 2525 {{ warnf "The '< call-out > ' Shortcode parameter 'inline' must be 'true' or 'false', but got: '%s'. This will now default to 'false'" $inlineParam}}
2626{{ end }}
2727
28- {{ $inline := eq $inlineParam "true" }}
29-
30- {{ $sideOption := "side-callout" }}
31- {{ $inlineOption := "inline-callout" }}
32-
33- {{ if $inline }}
34- {{ $class = printf "%s %s" $class $inlineOption }}
35- {{ else }}
36- {{ $class = printf "%s %s" $class $sideOption }}
37- {{ end }}
38-
3928{{ partial "callout.html" (dict
40- "class" $class
29+ "class" (printf "%s %s" $class "call-out")
4130 "title" $title
4231 "icon" $icon
43- "inline" $inline
32+ "inline" $inlineParam
4433 "content" .Inner
4534) }}
You can’t perform that action at this time.
0 commit comments