File tree Expand file tree Collapse file tree 2 files changed +11
-2
lines changed
exampleSite/content/test-product Expand file tree Collapse file tree 2 files changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -4,10 +4,13 @@ title: Test pages
4
4
weight : 100
5
5
hasCustomContent : true
6
6
---
7
+ <!-- <card-layout> - Available params: title (required: string)-->
7
8
{{< card-layout >}}
9
+ <!-- <card-section> - Available params: title (required: string), showAsCards (optional: boolean, default false) -->
8
10
<!-- If there is no "title" for <card-section>, it is implied it is the main content section and not a new content section -->
9
11
{{< card-section >}}
10
12
{{< card title="Call Out usages" >}}
13
+ <!-- <card> - Available params: title (required: string), titleUrl (optional: string, relative path or absolute URL (e.g. https://google.com)) -->
11
14
Examples for call-out shortcode
12
15
{{</ card >}}
13
16
{{< card title="Code Block usages" >}}
Original file line number Diff line number Diff line change @@ -10,7 +10,9 @@ <h2 class="card-title"><a href="{{- .Get "titleUrl" -}}">{{- .Get "title" -}}</a
10
10
{{- else -}}
11
11
< h2 class ="card-title "> {{- .Get "title" -}}</ h2 >
12
12
{{- end -}}
13
- {{ end }}
13
+ {{- else -}}
14
+ {{ errorf "Missing param 'title'" }}
15
+ {{- end -}}
14
16
< p > {{- .Inner -}}</ p >
15
17
</ div >
16
18
< div class ="col-md-5 card " data-mf ="false ">
@@ -19,7 +21,11 @@ <h3 class="card-title" style="display: flex; align-items: center; gap: 5px;">
19
21
{{- if .Get "icon" -}}
20
22
< img class ="card-img-top " src ="{{ .Site.BaseURL }}/images/icons/{{ .Get "icon " }}.png"/>
21
23
{{- end -}}
22
- < a href ="{{- .Get "titleUrl " -}}"> {{- .Get "title" -}}</ a >
24
+ {{- if and (.Get "title") (.Get "titleUrl") -}}
25
+ < a href ="{{- .Get "titleUrl " -}}"> {{- .Get "title" -}}</ a >
26
+ {{- else -}}
27
+ {{ errorf "Missing either params 'titleUrl' or 'title'" }}
28
+ {{- end -}}
23
29
</ h3 >
24
30
< p > {{- .Inner -}}</ p >
25
31
</ div >
You can’t perform that action at this time.
0 commit comments