Skip to content

Commit 2c2d7cd

Browse files
committed
fix(team-showcase): align headers, square avatars, respect sort order
1 parent d1d1c8a commit 2c2d7cd

File tree

1 file changed

+15
-14
lines changed

1 file changed

+15
-14
lines changed

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

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,10 @@
5151
{{ $text := "" }}
5252
{{ with index $content "text" }}{{ $text = printf "%v" . | emojify | $page.RenderString }}{{ end }}
5353
{{ $alignClass := cond (eq $align "left") "items-start text-left" "items-center text-center" }}
54-
{{ $headerWidthClass := cond (eq $align "left") "max-w-5xl" "max-w-3xl mx-auto" }}
54+
{{ $headerContainerClass := cond (eq $align "left")
55+
"flex flex-col gap-4 items-start text-left w-full max-w-5xl"
56+
"flex flex-col gap-3 items-center text-center max-w-prose mx-auto justify-center px-6"
57+
}}
5558
{{ $ctaAlignClass := cond (eq $align "left") "text-left" "text-center" }}
5659

5760
{{ $columnsClasses := dict
@@ -65,21 +68,21 @@
6568
<div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
6669

6770
{{/* Section Header */}}
68-
<div class="flex flex-col gap-4 {{ $alignClass }} {{ $headerWidthClass }} mb-12">
71+
<div class="{{ $headerContainerClass }} {{ $alignClass }} mb-12">
6972
{{ with $title }}
70-
<h2 class="text-3xl sm:text-4xl lg:text-5xl font-bold text-gray-900 dark:text-white tracking-tight">
73+
<div class="text-3xl sm:text-4xl lg:text-5xl font-bold text-gray-900 dark:text-white tracking-tight">
7174
{{ . }}
72-
</h2>
75+
</div>
7376
{{ end }}
7477

7578
{{ with $subtitle }}
76-
<p class="mt-4 text-xl text-gray-600 dark:text-gray-400">
79+
<p class="text-xl text-gray-600 dark:text-gray-400">
7780
{{ . }}
7881
</p>
7982
{{ end }}
8083

8184
{{ with $text }}
82-
<div class="mt-6 prose prose-lg lg:prose-xl dark:prose-invert max-w-3xl">
85+
<div class="prose prose-lg lg:prose-xl dark:prose-invert max-w-prose">
8386
{{ . }}
8487
</div>
8588
{{ end }}
@@ -217,16 +220,15 @@ <h3 class="text-2xl font-bold text-gray-900 dark:text-white mb-6 pb-2 border-b b
217220
<div class="group relative">
218221
<div class="relative overflow-hidden rounded-2xl bg-white dark:bg-gray-800 shadow-lg hover:shadow-xl transition-all duration-300 transform hover:-translate-y-1">
219222

220-
<a href="{{ $link }}" class="block relative aspect-[4/5] overflow-hidden" aria-label="{{ $profile.title }}">
223+
<a href="{{ $link }}" class="block relative aspect-square overflow-hidden bg-gray-100 dark:bg-gray-800" aria-label="{{ $profile.title }}">
221224
{{ if $avatar }}
222-
{{ $image := $avatar.Fit "400x500 Center webp" }}
225+
{{ $image := $avatar.Fit "600x600 Center q90" }}
223226
<img src="{{ $image.RelPermalink }}"
224227
alt="{{ $profile.title }}"
225228
width="{{ $image.Width }}"
226229
height="{{ $image.Height }}"
227230
loading="lazy"
228-
class="w-full h-full object-cover object-center transition-transform duration-300 group-hover:scale-110">
229-
<div class="absolute inset-0 bg-gradient-to-t from-black/60 via-transparent to-transparent opacity-0 group-hover:opacity-100 transition-opacity duration-300"></div>
231+
class="w-full h-full object-contain object-center transition-transform duration-300 group-hover:scale-105">
230232
{{ else }}
231233
<div class="absolute inset-0 bg-gray-100 dark:bg-gray-700 flex items-center justify-center text-4xl font-semibold text-gray-600 dark:text-gray-200">
232234
{{ $initial }}
@@ -415,16 +417,15 @@ <h3 class="text-xl font-bold text-gray-900 dark:text-white mb-1">
415417
{{ $initial := cond (gt (len $nameSource) 0) (upper (substr $nameSource 0 1)) "?" }}
416418
<div class="group relative">
417419
<div class="relative overflow-hidden rounded-2xl bg-white dark:bg-gray-800 shadow-lg hover:shadow-xl transition-all duration-300 transform hover:-translate-y-1">
418-
<a href="{{ $link }}" class="block relative aspect-[4/5] overflow-hidden" aria-label="{{ $profile.title }}">
420+
<a href="{{ $link }}" class="block relative aspect-square overflow-hidden bg-gray-100 dark:bg-gray-800" aria-label="{{ $profile.title }}">
419421
{{ if $avatar }}
420-
{{ $image := $avatar.Fit "400x500 Center webp" }}
422+
{{ $image := $avatar.Fit "600x600 Center q90" }}
421423
<img src="{{ $image.RelPermalink }}"
422424
alt="{{ $profile.title }}"
423425
width="{{ $image.Width }}"
424426
height="{{ $image.Height }}"
425427
loading="lazy"
426-
class="w-full h-full object-cover object-center transition-transform duration-300 group-hover:scale-110">
427-
<div class="absolute inset-0 bg-gradient-to-t from-black/60 via-transparent to-transparent opacity-0 group-hover:opacity-100 transition-opacity duration-300"></div>
428+
class="w-full h-full object-contain object-center transition-transform duration-300 group-hover:scale-105">
428429
{{ else }}
429430
<div class="absolute inset-0 bg-gray-100 dark:bg-gray-700 flex items-center justify-center text-4xl font-semibold text-gray-600 dark:text-gray-200">
430431
{{ $initial }}

0 commit comments

Comments
 (0)