Skip to content

Commit 879c041

Browse files
drmowinckelsclaude
andcommitted
use directory cards in home featured members section
Reuse the directory card partial so featured members surface the same info as the directory listing (photo, social links, languages, last update, location) and the cards link through to each member's directory profile via .data.Permalink instead of dead-ending on the home page. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 0587fd3 commit 879c041

1 file changed

Lines changed: 4 additions & 56 deletions

File tree

themes/hugo-rladiesplus/layouts/partials/home/featured.html

Lines changed: 4 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -13,63 +13,11 @@ <h2 class="section-title fade-in-up">
1313
{{ end }}
1414
{{ $featured := first 3 ($directory | shuffle) }}
1515

16-
<div class="grid grid-cols-1 md:grid-cols-3 gap-8 max-w-5xl mx-auto">
17-
{{ range $i, $member := $featured }}
18-
<div class="card card-hover text-center fade-in-up stagger-{{ add $i 1 }}">
19-
<div class="p-6">
20-
{{ $img := $member.Params.image | default "/images/placeholder_user.svg" }}
21-
<img src="{{ $img }}" alt="Portrait of {{ $member.Title }}"
22-
width="96" height="96" loading="lazy"
23-
class="w-24 h-24 rounded-full object-cover mx-auto mb-4">
24-
25-
<h3 class="text-lg font-semibold mb-1">{{ $member.Title }}</h3>
26-
27-
{{ with $member.Params.honorific }}
28-
<span class="text-xs font-medium text-primary">{{ . }}</span>
29-
{{ end }}
30-
31-
{{ with $member.Params.work }}
32-
<p class="text-sm text-muted mt-2">
33-
{{ with .title }}{{ . }}{{ end }}
34-
{{ with .organisation }}<br>{{ . }}{{ end }}
35-
</p>
36-
{{ end }}
37-
38-
{{ with $member.Params.location }}
39-
<p class="text-xs text-muted mt-2">
40-
<i class="fa-solid fa-map-marker-alt mr-1"></i>
41-
{{ with .city }}{{ . }}, {{ end }}{{ .country }}
42-
</p>
43-
{{ end }}
44-
45-
{{ with $member.Params.social_media }}
46-
<div class="flex justify-center gap-3 mt-3">
47-
{{ with .github }}
48-
<a href="https://github.com/{{ . }}" target="_blank" rel="noopener" class="text-muted hover:text-primary transition-colors" aria-label="GitHub">
49-
<i class="fa-brands fa-github"></i>
50-
</a>
51-
{{ end }}
52-
{{ with .bluesky }}
53-
<a href="https://bsky.app/profile/{{ . }}" target="_blank" rel="noopener" class="text-muted hover:text-primary transition-colors" aria-label="Bluesky">
54-
<i class="fa-brands fa-bluesky"></i>
55-
</a>
56-
{{ end }}
57-
{{ with .mastodon }}
58-
<a href="{{ . }}" target="_blank" rel="noopener" class="text-muted hover:text-primary transition-colors" aria-label="Mastodon">
59-
<i class="fa-brands fa-mastodon"></i>
60-
</a>
61-
{{ end }}
62-
{{ with .linkedin }}
63-
<a href="https://linkedin.com/in/{{ . }}" target="_blank" rel="noopener" class="text-muted hover:text-primary transition-colors" aria-label="LinkedIn">
64-
<i class="fa-brands fa-linkedin"></i>
65-
</a>
66-
{{ end }}
67-
</div>
68-
{{ end }}
69-
</div>
70-
</div>
16+
<ul class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6 list-unstyled p-0 max-w-5xl mx-auto fade-in-up stagger-2">
17+
{{ range $featured }}
18+
{{ partial "funcs/directory/card.html" (dict "data" . "name" . "size" "medium") }}
7119
{{ end }}
72-
</div>
20+
</ul>
7321

7422
{{ with .Site.GetPage "section" "directory" }}
7523
<div class="text-center mt-12 fade-in-up">

0 commit comments

Comments
 (0)