6262
6363<!-- Main code -->
6464{{ if not $error }}
65- {{- partial "assets/section-title.html" (dict "heading" $args.heading "justify" $args.justify) -}}
65+ {{ if or (gt (len $pages) 0) (not $args.hideEmpty) }}
66+ {{- partial "assets/section-title.html" (dict "heading" $args.heading "justify" $args.justify) -}}
6667
67- {{ $partial := "assets/card-group.html" }}
68- {{ $params := dict }}
69- {{- $params = merge $params (dict
70- "page" page
71- "list" $pages
72- "limit" $args.limit
73- "cols" $args.cols
74- "icon-rounded" $args.iconRounded
75- "href" (cond $moreButton $moreLink "")
76- "href-title" (cond $moreButton $moreTitle "")
77- "href-force" (gt $result.total (len $result.pages))
78- )}}
68+ {{ $partial := "assets/card-group.html" }}
69+ {{ $params := dict }}
70+ {{- $params = merge $params (dict
71+ "page" page
72+ "list" $pages
73+ "limit" $args.limit
74+ "cols" $args.cols
75+ "icon-rounded" $args.iconRounded
76+ "href" (cond $moreButton $moreLink "")
77+ "href-title" (cond $moreButton $moreTitle "")
78+ "href-force" (gt $result.total (len $result.pages))
79+ )}}
7980
80- {{ if $args.scroll }}
81- {{ $partial := "assets/stack.html" }}
82- {{ $params = merge $params (dict
83- "header-style" "none"
84- "body-style" "title"
85- "footer-style" "none"
86- "gutter" 1
87- "padding" 3
88- "ratio" "1x1"
89- "orientation" "horizontal-sm"
90- "styles" (cond $args.bento $styles "")
91- ) -}}
92- {{ else }}
93- {{ $params = merge $params (dict
94- "header-style" $args.headerStyle
95- "footer-style" $args.footerStyle
96- "padding" $args.padding
97- "class" (or $args.class "border-0")
98- "icon-style" "fa-2x"
99- "align" "start"
100- "orientation" $args.orientation
101- "hook" "assets/live-card.html"
102- "pagination" $args.pagination
103- "paginate" $paginate
104- ) -}}
81+ {{ if $args.scroll }}
82+ {{ $partial := "assets/stack.html" }}
83+ {{ $params = merge $params (dict
84+ "header-style" "none"
85+ "body-style" "title"
86+ "footer-style" "none"
87+ "gutter" 1
88+ "padding" 3
89+ "ratio" "1x1"
90+ "orientation" "horizontal-sm"
91+ "styles" (cond $args.bento $styles "")
92+ ) -}}
93+ {{ else }}
94+ {{ $params = merge $params (dict
95+ "header-style" $args.headerStyle
96+ "footer-style" $args.footerStyle
97+ "padding" $args.padding
98+ "class" (or $args.class "border-0")
99+ "icon-style" "fa-2x"
100+ "align" "start"
101+ "orientation" $args.orientation
102+ "hook" "assets/live-card.html"
103+ "pagination" $args.pagination
104+ "paginate" $paginate
105+ ) -}}
106+ {{ end }}
107+ {{ if gt (len $pages) 0 }}
108+ {{ partial $partial $params }}
109+ {{ else }}
110+ {{- $padding := partial "utilities/GetPadding.html" -}}
111+ < p class ="pt-{{ $padding.y }} "> {{- T "emptyList" }}.</ p >
112+ {{ end }}
105113 {{ end }}
106- {{ partial $partial $params }}
107114{{ end }}
0 commit comments