Skip to content

Commit b199122

Browse files
committed
style: improve spacing between groups
1 parent 967404b commit b199122

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

modules/blox/blox/team-showcase/block.html

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ <h2 class="text-3xl sm:text-4xl lg:text-5xl font-bold text-gray-900 dark:text-wh
7070
{{ $groups := $block.content.user_groups }}
7171

7272
{{ if $groups }}
73-
{{ range $groupItem := $groups }}
73+
{{ range $i, $groupItem := $groups }}
7474
{{ $groupName := "" }}
7575
{{ $groupSortField := $sort_field }}
7676
{{ $groupSortAsc := $sort_asc }}
@@ -124,15 +124,17 @@ <h2 class="text-3xl sm:text-4xl lg:text-5xl font-bold text-gray-900 dark:text-wh
124124
{{ end }}
125125
{{ $groupProfiles = sort $groupProfiles "sort_val" $groupOrder }}
126126

127-
{{ if and (or (gt (len $groupProfiles) 0) $show_empty_groups) (gt (len $groups) 1) }}
128-
<div class="col-span-full mb-4">
127+
{{ $hasGroupContent := or (gt (len $groupProfiles) 0) $show_empty_groups }}
128+
129+
{{ if and $hasGroupContent (gt (len $groups) 1) }}
130+
<div class="col-span-full {{ if gt $i 0 }}mt-8 md:mt-10 lg:mt-12{{ end }} mb-4">
129131
<h3 class="text-2xl font-bold text-gray-900 dark:text-white mb-6 pb-2 border-b border-gray-200 dark:border-gray-700">
130132
{{ $groupName | markdownify }}
131133
</h3>
132134
</div>
133135
{{ end }}
134136

135-
{{ if or (gt (len $groupProfiles) 0) $show_empty_groups }}
137+
{{ if $hasGroupContent }}
136138
<div class="{{ $gridClass }} w-full">
137139
{{ if eq (len $groupProfiles) 0 }}
138140
{{ if $show_empty_groups }}

0 commit comments

Comments
 (0)