Skip to content

Commit 3d0ae04

Browse files
authored
style: bigger pictures for highlights album (#101)
1 parent d2b8a01 commit 3d0ae04

File tree

2 files changed

+13
-9
lines changed

2 files changed

+13
-9
lines changed

layouts/partials/hb/modules/gallery/highlight.html

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,18 @@
66
{{- end }}
77
{{- $imgs = where $imgs ".Image.Params.highlight" true }}
88
{{- $imgs = partial "hb/modules/gallery/functions/sort-imgs" $imgs }}
9-
{{- range first (default 10 site.Params.hb.gallery.highlight_images_count) $imgs }}
10-
<div class="hb-gallery-album-item hb-gallery-album-item-highlight flex-grow-1 position-relative">
11-
{{- partialCached "hb/modules/gallery/img" .Image .Image }}
12-
{{- partialCached "hb/modules/gallery/info" .Image .Image }}
13-
<p
14-
class="hb-gallery-title position-absolute bottom-0 mb-0 px-1 text-white text-center w-100 text-truncate">
15-
{{- default .Image.Name .Image.Title -}}
16-
</p>
9+
{{- if $imgs }}
10+
<div class="hb-gallery-album hb-gallery-album-items bigger-pictures d-flex flex-wrap hb-module">
11+
{{- range first (default 10 site.Params.hb.gallery.highlight_images_count) $imgs }}
12+
<div class="hb-gallery-album-item hb-gallery-album-item-highlight flex-grow-1 position-relative">
13+
{{- partialCached "hb/modules/gallery/img" .Image .Image }}
14+
{{- partialCached "hb/modules/gallery/info" .Image .Image }}
15+
<p
16+
class="hb-gallery-title position-absolute bottom-0 mb-0 px-1 text-white text-center w-100 text-truncate">
17+
{{- default .Image.Name .Image.Title -}}
18+
</p>
19+
</div>
20+
{{- end }}
1721
</div>
1822
{{- end }}
1923
{{- end }}

layouts/partials/hb/modules/gallery/list.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
<div class="hb-gallery">
33
{{ partial "hb/modules/gallery/content" . }}
44
<div class="hb-gallery-albums">
5+
{{- partial "hb/modules/gallery/highlight" . }}
56
<div
67
class="hb-gallery-album hb-gallery-album-items d-flex flex-wrap hb-module">
7-
{{- partial "hb/modules/gallery/highlight" . }}
88
{{- range .Paginator.Pages }}
99
{{- $page := . }}
1010
{{- $imgs := slice }}

0 commit comments

Comments
 (0)