Skip to content

Commit f94ff29

Browse files
committed
Address review feedback
- Anchor Meetup host match to scheme+host (case-insensitive), no longer false-matches lookalike hosts like notmeetup.com - Swap Tailwind v3-only classes (shrink-0, text-[10px]) for v2 equivalents (flex-shrink-0, text-xs) actually supported by the pinned Tailwind 2.2.19 build - Safelist group-hover:text-purple-600 in purgecss config since it only renders inside the upcoming-events loop and would otherwise be purged on a build with zero upcoming events - Mark the badge logo as decorative (empty alt) since the adjacent group name already supplies the link's accessible name - Give each upcoming-card arrow link a unique aria-label including the event title - Drop opacity-75 from past-event cards so the badge (and all past card text) keeps sufficient contrast; existing gray tones already distinguish past from upcoming - Render the group badge on individual calendar event pages too, so removing Ohio's hand-written prose link doesn't orphan that page
1 parent e18ad5f commit f94ff29

5 files changed

Lines changed: 15 additions & 6 deletions

File tree

‎purgecss.config.cjs‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,9 @@ module.exports = {
2222
// These never appear in committed markup, so pin the whole status palette.
2323
'bg-blue-500', 'bg-green-500', 'bg-purple-500',
2424
'bg-orange-500', 'bg-red-500', 'bg-yellow-500',
25+
// Only rendered inside the calendar's upcoming-events loop, so a CI
26+
// build with zero upcoming events would otherwise purge it.
27+
'group-hover:text-purple-600',
2528
],
2629
},
2730
output: 'assets/css/tailwind.css',

‎themes/powershell-community/layouts/_default/calendar.html‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ <h3 class="text-xl font-bold text-gray-900 mb-2 group-hover:text-purple-600">{{
9898
</div>
9999
<!-- Arrow -->
100100
<div class="hidden md:flex items-center pr-6">
101-
<a href="{{ .Params.externalUrl }}" target="_blank" rel="noopener" aria-label="View event details">
101+
<a href="{{ .Params.externalUrl }}" target="_blank" rel="noopener" aria-label="View details for {{ .Title }}">
102102
<i class="fas fa-external-link-alt text-gray-400"></i>
103103
</a>
104104
</div>
@@ -125,7 +125,7 @@ <h2 class="text-3xl font-bold text-gray-900">Past Events</h2>
125125
<div class="space-y-4 mb-10">
126126
{{ range (sort $past "Params.startDate" "desc") }}
127127
{{ $matchedGroup := partial "calendar-matched-user-group.html" (dict "externalUrl" .Params.externalUrl "site" $.Site) }}
128-
<div class="bg-gray-50 rounded-lg border border-gray-200 p-4 opacity-75">
128+
<div class="bg-gray-50 rounded-lg border border-gray-200 p-4">
129129
<div class="flex items-center justify-between">
130130
<div>
131131
<h3 class="font-semibold text-gray-700">{{ .Title }}</h3>

‎themes/powershell-community/layouts/_default/single.html‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,12 @@
4444

4545
<!-- Title -->
4646
<h1 class="text-3xl lg:text-4xl font-bold text-gray-900 mb-4 leading-tight">{{ .Title }}</h1>
47+
{{ if eq .Section "calendar" }}
48+
{{ $matchedGroup := partial "calendar-matched-user-group.html" (dict "externalUrl" .Params.externalUrl "site" .Site) }}
49+
{{ with $matchedGroup }}
50+
<div class="mb-4">{{ partial "calendar-user-group-badge.html" . }}</div>
51+
{{ end }}
52+
{{ end }}
4753

4854
<!-- Author and Reading Time -->
4955
<div class="flex items-center justify-between">

‎themes/powershell-community/layouts/partials/calendar-matched-user-group.html‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
*/}}
1212
{{- $url := .externalUrl -}}
1313
{{- $site := .site -}}
14-
{{- $slugPattern := `^.*meetup\.com/([^/?#]+).*$` -}}
14+
{{- $slugPattern := `(?i)^https?://(?:www\.)?meetup\.com/([^/?#]+).*$` -}}
1515
{{- $match := "" -}}
1616
{{- if $url -}}
1717
{{- $eventSlug := replaceRE $slugPattern "$1" $url -}}

‎themes/powershell-community/layouts/partials/calendar-user-group-badge.html‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@
55
*/}}
66
{{- $group := . -}}
77
<a href="{{ $group.RelPermalink }}" class="inline-flex items-center gap-1.5 text-blue-600 hover:text-blue-700">
8-
<span class="inline-flex items-center justify-center w-5 h-5 rounded-full bg-blue-100 overflow-hidden shrink-0">
8+
<span class="inline-flex items-center justify-center w-5 h-5 rounded-full bg-blue-100 overflow-hidden flex-shrink-0">
99
{{ if $group.Params.logo }}
10-
<img src="{{ $group.Params.logo }}" alt="{{ $group.Title }} logo" width="20" height="20" class="w-full h-full object-contain">
10+
<img src="{{ $group.Params.logo }}" alt="" width="20" height="20" class="w-full h-full object-contain">
1111
{{ else }}
12-
<i class="fas fa-people-group text-[10px]"></i>
12+
<i class="fas fa-people-group text-xs" aria-hidden="true"></i>
1313
{{ end }}
1414
</span>
1515
{{ $group.Title }}

0 commit comments

Comments
 (0)