diff --git a/modules/blox/blox/team-showcase/block.html b/modules/blox/blox/team-showcase/block.html index fbaf22bf..d3c46780 100644 --- a/modules/blox/blox/team-showcase/block.html +++ b/modules/blox/blox/team-showcase/block.html @@ -51,6 +51,7 @@ {{ $text := "" }} {{ with index $content "text" }}{{ $text = printf "%v" . | emojify | $page.RenderString }}{{ end }} {{ $alignClass := cond (eq $align "left") "items-start text-left" "items-center text-center" }} +{{ $headerWidthClass := cond (eq $align "left") "max-w-5xl" "max-w-3xl mx-auto" }} {{ $ctaAlignClass := cond (eq $align "left") "text-left" "text-center" }} {{ $columnsClasses := dict @@ -64,7 +65,7 @@
{{/* Section Header */}} -
+
{{ with $title }}

{{ . }} @@ -136,7 +137,7 @@ {{ $groupSortFieldLc = lower $groupSortField }} {{ end }} {{ $groupIsNumeric := or (eq $groupSortFieldLc "weight") (eq $groupSortFieldLc "graduation_year") }} - {{ $groupOrder := cond (and (not $groupIsNumeric) (not $groupSortAsc)) "desc" "asc" }} + {{ $groupOrder := cond $groupSortAsc "asc" "desc" }} {{ $groupProfiles := slice }} {{ range $allProfiles }} @@ -164,7 +165,8 @@ {{ if or (eq $groupSortFieldLc "name.family") (eq $groupSortFieldLc "family") (eq $groupSortFieldLc "last_name") (eq $groupSortFieldLc "name_family") (eq $groupSortFieldLc "family_name") }} {{ $primary = $familyLower }} {{ else if $isNumeric }} - {{ $primary = 999999 }} + {{ $missingSentinel := cond $groupSortAsc 999999 -999999 }} + {{ $primary = $missingSentinel }} {{ if or (eq $rawType "int") (eq $rawType "int64") (eq $rawType "float64") (eq $rawType "float32") (eq $rawType "uint") (eq $rawType "uint64") }} {{ $primary = int $raw }} {{ else if and (eq $rawType "string") (gt (len (findRE "^[0-9]+$" $raw)) 0) }} @@ -177,7 +179,8 @@ {{ end }} {{ $sortKey := "" }} {{ if $isNumeric }} - {{ $num := $primary | default 999999 }} + {{ $missingSentinel := cond $groupSortAsc 999999 -999999 }} + {{ $num := $primary | default $missingSentinel }} {{ $sortKey = printf "%010d|%s" $num $familyLower }} {{ else }} {{ $sortKey = printf "%s|%s" $primary $familyLower }} @@ -214,15 +217,15 @@
- + {{ if $avatar }} - {{ $image := $avatar.Fill "400x400 Center webp" }} + {{ $image := $avatar.Fit "400x500 Center webp" }} {{ $profile.title }} + class="w-full h-full object-cover object-center transition-transform duration-300 group-hover:scale-110">
{{ else }}
@@ -367,7 +370,7 @@ {{ end }} {{ else }} {{ $isNumeric := or (eq $sort_field_lc "weight") (eq $sort_field_lc "graduation_year") }} - {{ $order := cond (and (not $isNumeric) (not $sort_asc)) "desc" "asc" }} + {{ $order := cond $sort_asc "asc" "desc" }} {{ $sorted := slice }} {{ range $allProfiles }} {{ $profile := .profile }} @@ -380,7 +383,8 @@ {{ if or (eq $sort_field_lc "name.family") (eq $sort_field_lc "family") (eq $sort_field_lc "last_name") (eq $sort_field_lc "name_family") (eq $sort_field_lc "family_name") }} {{ $primary = $familyLower }} {{ else if $isNumeric }} - {{ $primary = 999999 }} + {{ $missingSentinel := cond $sort_asc 999999 -999999 }} + {{ $primary = $missingSentinel }} {{ if or (eq $rawType "int") (eq $rawType "int64") (eq $rawType "float64") (eq $rawType "float32") (eq $rawType "uint") (eq $rawType "uint64") }} {{ $primary = int $raw }} {{ else if and (eq $rawType "string") (gt (len (findRE "^[0-9]+$" $raw)) 0) }} @@ -393,7 +397,8 @@ {{ end }} {{ $sortKey := "" }} {{ if $isNumeric }} - {{ $num := $primary | default 999999 }} + {{ $missingSentinel := cond $sort_asc 999999 -999999 }} + {{ $num := $primary | default $missingSentinel }} {{ $sortKey = printf "%010d|%s" $num $familyLower }} {{ else }} {{ $sortKey = printf "%s|%s" $primary $familyLower }} @@ -410,15 +415,15 @@ {{ $initial := cond (gt (len $nameSource) 0) (upper (substr $nameSource 0 1)) "?" }}