22 lines
880 B
HTML
22 lines
880 B
HTML
{{ if .Params.balloon_resources }}
|
|
<div class="balloon-layout">
|
|
{{ partial "balloon/head-item.html" . }}
|
|
|
|
{{ $res := .Site.GetPage .Params.balloon_resources }}
|
|
{{ $pages := $res.Resources.ByType "page" }}
|
|
|
|
{{ if $pages }}
|
|
{{ $max_idx := sub (len $pages) 1 }}
|
|
|
|
{{ range $index, $value := (sort $pages "Params.weight" "asc") }}
|
|
{{ partial "balloon/title-item.html" . }}
|
|
{{ partial "balloon/card-item.html" (dict "ctx" . "last_item" (eq $index $max_idx)) }}
|
|
{{ end }}
|
|
{{ else }}
|
|
<span>{{ i18n "no_page_under_resouces" (dict "resources_name" "balloon_resources" "resources_path" .Params.balloon_resources ) }}</span>
|
|
{{ end }}
|
|
</div>
|
|
{{ else }}
|
|
<span>{{ i18n "resources_not_found" (dict "resources_name" "balloon_resources")}}</span>
|
|
{{ end }}
|