File tree Expand file tree Collapse file tree 8 files changed +22
-16
lines changed Expand file tree Collapse file tree 8 files changed +22
-16
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 #friends-of-the-docs 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
3
3
title : Test pages
4
4
weight : 100
5
5
nd-landing-page : true
6
+ cascade :
7
+ nd-banner :
8
+ enabled : true
9
+ start-date : 2025-01-01
10
+ md : /_banners/test-product-intro.md
6
11
---
7
12
{{<card-layout >}}
8
13
{{<card-section showAsCards =" true " >}}
Original file line number Diff line number Diff line change 3
3
{{ $title := .title | default "" }}
4
4
{{ $icon := .icon | default "" }}
5
5
{{ $inlineParam := .inline | default "false" | lower }}
6
+ {{ $type := .type | default "" }}
6
7
7
8
{{ if not (in (slice "true" "false") $inlineParam) }}
8
9
{{ errorf "Invalid parameter 'inline'='%s' passed to blockquote partial from '%s'. Allowed values: true, false" $inlineParam .Page.Path }}
41
42
"Deprecated" "alert-octagon"
42
43
"Important" "arrow-right-circle"
43
44
}}
44
- {{ $icon := index $specialTitleIcons $title | default "" }}
45
-
46
- {{ $isSpecialTitle := in $specialTitles $title }}
45
+ {{ $icon := index $specialTitleIcons $type | default "" }}
46
+ {{ $isSpecialTitle := in $specialTitles $type }}
47
47
{{ if $isSpecialTitle }}
48
48
{{/* Loud callouts */}}
49
49
< div >
Original file line number Diff line number Diff line change 1
1
{{- $type := .Get 0 | default (.Get "type") | default "" -}}
2
2
{{- $title := .Get 1 | default (.Get "title") | default "" -}}
3
3
{{ partial "callout.html" (dict
4
- "class" $type
4
+ "class" (printf "%s %s" $type "call-out")
5
5
"title" $title
6
6
"icon" "fa-solid fa-triangle-exclamation"
7
7
"inline" true
8
+ "type" ($type | strings.FirstUpper)
8
9
"content" .Inner
9
10
) }}
Original file line number Diff line number Diff line change 14
14
15
15
*/}}
16
16
17
- {{ $class := .Get 0 | default (.Get "class ") | default "" }}
17
+ {{ $type := .Get 0 | default (.Get "type ") | default "" | strings.FirstUpper }}
18
18
{{ $title := .Get 1 | default (.Get "title") | default "" }}
19
19
{{ $icon := .Get 2 | default (.Get "icon") | default "" }}
20
20
25
25
{{ warnf "The '< call-out > ' Shortcode parameter 'inline' must be 'true' or 'false', but got: '%s'. This will now default to 'false'" $inlineParam}}
26
26
{{ end }}
27
27
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 }}
28
+ {{ $class := printf "%s %s" ($type | lower) "call-out" }}
38
29
39
30
{{ partial "callout.html" (dict
40
31
"class" $class
41
32
"title" $title
42
33
"icon" $icon
43
- "inline " $inline
34
+ "type " $type
44
35
"content" .Inner
45
36
) }}
Original file line number Diff line number Diff line change 3
3
"title" "Caution"
4
4
"icon" ""
5
5
"inline" "false"
6
+ "type" "Caution"
6
7
"content" .Inner
7
8
) }}
Original file line number Diff line number Diff line change 3
3
"title" "Important"
4
4
"icon" ""
5
5
"inline" "false"
6
+ "type" "Important"
6
7
"content" .Inner
7
8
) }}
Original file line number Diff line number Diff line change 3
3
"title" "Warning"
4
4
"icon" ""
5
5
"inline" "false"
6
+ "type" "Warning"
6
7
"content" .Inner
7
8
) }}
You can’t perform that action at this time.
0 commit comments