Skip to content

Commit 3e0994b

Browse files
updates sponsorship page with latest packages and statistics (#8)
* updates sponsorship page with latest packages and statistics * restore things lost in the paste * fix broke ass countup * pacify linter * dynamic year * animation and intrigue * cruft * Apply suggestions from code review Co-authored-by: Robbie Wagner <rwwagner90@gmail.com> * adds text balance to the headline * fix code rabbit nit * restore product IDs to ad reads * hookup new products * fix readme * updates alignment, adds link to contact page, adds param to sponsor for frequency --------- Co-authored-by: Robbie Wagner <rwwagner90@gmail.com>
1 parent c5b530b commit 3e0994b

4 files changed

Lines changed: 281 additions & 57 deletions

File tree

.env.example

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22
POLAR_ACCESS_TOKEN=your_polar_access_token_here
33
POLAR_30SEC_PRODUCT_ID=your_30sec_product_id_here
44
POLAR_60SEC_PRODUCT_ID=your_60sec_product_id_here
5+
POLAR_BOTTLEDROP_PRODUCT_ID=your_bottledrop_product_id_here
6+
POLAR_CRATE_PRODUCT_ID=your_crate_product_id_here
7+
POLAR_FULLBARREL_PRODUCT_ID=your_fullbarrel_product_id_here
8+
POLAR_LABEL_PRODUCT_ID=your_label_product_id_here
59
POLAR_SUCCESS_URL=https://whiskey.fm/sponsor/success
610

711
# Optional: Set to "sandbox" for testing, "production" for live (defaults to production)

README.md

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -177,15 +177,21 @@ This site uses Polar.sh for sponsor checkout. To set it up:
177177
1. **Get your Polar credentials:**
178178
- Log in to your [Polar dashboard](https://polar.sh)
179179
- Go to Settings → API to get your access token
180-
- Create two products for your sponsorship packages (30-second and 60-second ads)
180+
- Create two products for your sponsorship packages (30-second and 60-second
181+
ads)
181182
- Note the product IDs from each product's page
182183

183-
2. **Configure environment variables:**
184-
Create a `.env` file in the root directory with:
184+
2. **Configure environment variables:** Create a `.env` file in the root
185+
directory with:
186+
185187
```env
186188
POLAR_ACCESS_TOKEN=your_polar_access_token_here
187189
POLAR_30SEC_PRODUCT_ID=your_30sec_product_id_here
188190
POLAR_60SEC_PRODUCT_ID=your_60sec_product_id_here
191+
POLAR_BOTTLEDROP_PRODUCT_ID=your_bottledrop_product_id_here
192+
POLAR_CRATE_PRODUCT_ID=your_crate_product_id_here
193+
POLAR_FULLBARREL_PRODUCT_ID=your_fullbarrel_product_id_here
194+
POLAR_LABEL_PRODUCT_ID=your_label_product_id_here
189195
POLAR_SUCCESS_URL=https://whiskey.fm/sponsor/success
190196
```
191197

@@ -201,6 +207,7 @@ This site uses Polar.sh for sponsor checkout. To set it up:
201207
- Test with a real payment to confirm everything works
202208

203209
The integration uses the `@polar-sh/astro` package which provides:
210+
204211
- Server-side checkout session creation at `/api/checkout`
205212
- Automatic tax compliance through Polar's Merchant of Record service
206213
- Support for multiple products and dynamic pricing

src/components/AdPackageCard.astro

Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,36 +4,43 @@ export interface Props {
44
heading: string;
55
price: string;
66
productId: string;
7+
period?: string;
78
}
89
9-
const { bullets, heading, price, productId } = Astro.props;
10+
const { bullets, heading, price, productId, period = 'per episode' } = Astro.props;
1011
---
1112

12-
<div class="dark:bg-dark-background relative z-10 mb-6 rounded-lg bg-white p-1">
13+
<div
14+
class="dark:bg-dark-background relative z-10 mb-6 grid grid-rows-[auto_1fr] rounded-lg bg-white p-1"
15+
>
1316
<h2
14-
class="bg-light-card text-light-text-heading dark:bg-dark-card px-5 py-4 font-bold lg:py-6 dark:text-white"
17+
class="bg-light-card text-light-text-heading dark:bg-dark-card px-5 py-4 text-xl font-bold lg:py-6 dark:text-white"
1518
>
1619
{heading}
1720
</h2>
1821

19-
<ul class="list-disc px-8">
22+
<ul class="flex flex-1 flex-col px-8">
2023
{
2124
bullets.map((bullet) => {
22-
return <li class="dark:border-dark-border border-b py-6">{bullet}</li>;
25+
return (
26+
<li class="dark:border-dark-border border-b py-6 text-balance">
27+
{bullet}
28+
</li>
29+
);
2330
})
2431
}
2532

2633
<h3
27-
class="text-light-text-heading mt-8 mb-12 px-5 text-4xl font-bold tabular-nums dark:text-white"
34+
class="text-light-text-heading mt-8 mb-12 flex-1 content-end px-5 text-4xl font-bold tabular-nums dark:text-white"
2835
>
2936
{price}
3037
<span
3138
class="text-light-text-body dark:text-dark-text-body text-3xl font-light"
3239
>
3340
/
3441
</span>
35-
<span class="text-light-text-body dark:text-dark-text-body text-2xl">
36-
per episode
42+
<span class="text-light-text-body dark:text-dark-text-body text-lg">
43+
{period}
3744
</span>
3845
</h3>
3946

@@ -47,4 +54,4 @@ const { bullets, heading, price, productId } = Astro.props;
4754
</a>
4855
</div>
4956
</ul>
50-
</div>
57+
</div>

0 commit comments

Comments
 (0)