Skip to content

Commit f126cf7

Browse files
feat(sponsors): add community support links to sponsors page
1 parent 1c2f4ba commit f126cf7

1 file changed

Lines changed: 38 additions & 11 deletions

File tree

app/pages/sponsors.vue

Lines changed: 38 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,13 @@ const SPONSORSHIP_TIER_PRICES = {
66
gold: 1000,
77
} as const
88
9+
const SPONSORSHIP_TIER_LINKS = {
10+
silver:
11+
'https://opencollective.com/npmx/contribute/patron-98135/checkout?interval=month&amount=500&contributeAs=me',
12+
gold: 'https://opencollective.com/npmx/contribute/patron-98135/checkout?interval=month&amount=1000&contributeAs=me',
13+
platinum: 'https://opencollective.com/npmx/donate?interval=oneTime&amount=20&contributeAs=me',
14+
} as const
15+
916
const { t } = useI18n()
1017
const currencyFormatter = useNumberFormatter({
1118
style: 'currency',
@@ -159,45 +166,65 @@ defineOgImage(
159166
{{ $t('sponsors_page.tiers.title') }}
160167
</h2>
161168

162-
<div class="border border-fg/80 rounded-xl p-5 bg-bg-muted">
169+
<LinkBase
170+
:to="SPONSORSHIP_TIER_LINKS.silver"
171+
no-new-tab-icon
172+
no-underline
173+
class="block border border-fg/80 rounded-xl p-5 bg-bg-muted transition-colors hover:bg-bg-subtle focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-fg"
174+
>
163175
<div class="flex items-center justify-between gap-3 mb-2">
164176
<h3 class="font-mono text-base text-fg uppercase tracking-wider">
165177
{{ $t('sponsors_page.tiers.silver.name') }}
166178
</h3>
167-
<span class="i-lucide:coins size-4 text-fg-subtle" aria-hidden="true" />
179+
<span class="flex items-center gap-2 text-fg-subtle" aria-hidden="true">
180+
<span class="i-lucide:coins size-4" />
181+
<span class="i-lucide:external-link size-3.5" />
182+
</span>
168183
</div>
169184
<p class="text-sm text-fg-subtle font-mono">
170185
{{ formatTierPrice(SPONSORSHIP_TIER_PRICES.silver) }}
171186
</p>
172-
</div>
187+
</LinkBase>
173188

174-
<div
175-
class="border border-badge-yellow/80 rounded-xl p-5 bg-linear-to-br from-badge-yellow/8 to-bg-subtle/40 relative overflow-hidden mt-4"
189+
<LinkBase
190+
:to="SPONSORSHIP_TIER_LINKS.gold"
191+
no-new-tab-icon
192+
no-underline
193+
class="block border border-badge-yellow/80 rounded-xl p-5 bg-linear-to-br from-badge-yellow/8 to-bg-subtle/40 relative overflow-hidden mt-4 transition-colors hover:from-badge-yellow/12 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-badge-yellow"
176194
>
177195
<div class="flex items-center justify-between gap-3 mb-2 relative">
178196
<h3 class="font-mono text-base text-fg uppercase tracking-wider">
179197
{{ $t('sponsors_page.tiers.gold.name') }}
180198
</h3>
181-
<span class="i-lucide:medal size-4 text-badge-yellow" aria-hidden="true" />
199+
<span class="flex items-center gap-2" aria-hidden="true">
200+
<span class="i-lucide:medal size-4 text-badge-yellow" />
201+
<span class="i-lucide:external-link size-3.5 text-fg-subtle" />
202+
</span>
182203
</div>
183204
<p class="text-sm text-fg-subtle font-mono">
184205
{{ formatTierPrice(SPONSORSHIP_TIER_PRICES.gold) }}
185206
</p>
186-
</div>
207+
</LinkBase>
187208

188-
<div
189-
class="border border-badge-blue/80 rounded-xl p-5 bg-linear-to-br from-badge-blue/8 to-bg-subtle/40 relative overflow-hidden mt-4"
209+
<LinkBase
210+
:to="SPONSORSHIP_TIER_LINKS.platinum"
211+
no-new-tab-icon
212+
no-underline
213+
class="block border border-badge-blue/80 rounded-xl p-5 bg-linear-to-br from-badge-blue/8 to-bg-subtle/40 relative overflow-hidden mt-4 transition-colors hover:from-badge-blue/12 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-badge-blue"
190214
>
191215
<div class="flex items-center justify-between gap-3 mb-2">
192216
<h3 class="font-mono text-base text-fg uppercase tracking-wider">
193217
{{ $t('sponsors_page.tiers.platinum.name') }}
194218
</h3>
195-
<span class="i-lucide:crown size-4 text-badge-blue" aria-hidden="true" />
219+
<span class="flex items-center gap-2" aria-hidden="true">
220+
<span class="i-lucide:crown size-4 text-badge-blue" />
221+
<span class="i-lucide:external-link size-3.5 text-fg-subtle" />
222+
</span>
196223
</div>
197224
<p class="text-sm text-fg-subtle font-mono">
198225
{{ $t('sponsors_page.tiers.custom') }}
199226
</p>
200-
</div>
227+
</LinkBase>
201228
</div>
202229
</section>
203230
</div>

0 commit comments

Comments
 (0)