diff --git a/.env.example b/.env.example index ef6c8b0..b0c284d 100644 --- a/.env.example +++ b/.env.example @@ -1,11 +1,12 @@ # Polar.sh Integration POLAR_ACCESS_TOKEN=your_polar_access_token_here -POLAR_30SEC_PRODUCT_ID=your_30sec_product_id_here +# The Distiller's Cut — single 60s host-read episode POLAR_60SEC_PRODUCT_ID=your_60sec_product_id_here -POLAR_BOTTLEDROP_PRODUCT_ID=your_bottledrop_product_id_here +# The Crate — monthly package POLAR_CRATE_PRODUCT_ID=your_crate_product_id_here +# The Full Barrel — flagship monthly package POLAR_FULLBARREL_PRODUCT_ID=your_fullbarrel_product_id_here -POLAR_LABEL_PRODUCT_ID=your_label_product_id_here +# The Single Barrel is a bespoke tier handled via /contact (no Polar product) POLAR_SUCCESS_URL=https://whiskey.fm/sponsor/success # Optional: Set to "sandbox" for testing, "production" for live (defaults to production) diff --git a/README.md b/README.md index e06c09a..2c7434e 100644 --- a/README.md +++ b/README.md @@ -177,8 +177,8 @@ This site uses Polar.sh for sponsor checkout. To set it up: 1. **Get your Polar credentials:** - Log in to your [Polar dashboard](https://polar.sh) - Go to Settings → API to get your access token - - Create two products for your sponsorship packages (30-second and 60-second - ads) + - Create one product per paid sponsorship package (The Distiller's Cut, The + Crate, and The Full Barrel) - Note the product IDs from each product's page 2. **Configure environment variables:** Create a `.env` file in the root @@ -186,12 +186,9 @@ This site uses Polar.sh for sponsor checkout. To set it up: ```env POLAR_ACCESS_TOKEN=your_polar_access_token_here - POLAR_30SEC_PRODUCT_ID=your_30sec_product_id_here POLAR_60SEC_PRODUCT_ID=your_60sec_product_id_here - POLAR_BOTTLEDROP_PRODUCT_ID=your_bottledrop_product_id_here POLAR_CRATE_PRODUCT_ID=your_crate_product_id_here POLAR_FULLBARREL_PRODUCT_ID=your_fullbarrel_product_id_here - POLAR_LABEL_PRODUCT_ID=your_label_product_id_here POLAR_SUCCESS_URL=https://whiskey.fm/sponsor/success ``` diff --git a/src/components/AdPackageCard.astro b/src/components/AdPackageCard.astro index 84b33f5..daef854 100644 --- a/src/components/AdPackageCard.astro +++ b/src/components/AdPackageCard.astro @@ -3,11 +3,21 @@ export interface Props { bullets: Array; heading: string; price: string; - productId: string; + productId?: string; period?: string; + ctaLabel?: string; + ctaHref?: string; } -const { bullets, heading, price, productId, period = 'per episode' } = Astro.props; +const { + bullets, + heading, + price, + productId, + period = 'per episode', + ctaLabel = 'Become a sponsor', + ctaHref = `/api/checkout?products=${productId}` +} = Astro.props; ---
{price} - - / - - - {period} - + { + period && ( + <> + + / + + + {period} + + + ) + } diff --git a/src/pages/sponsor.astro b/src/pages/sponsor.astro index 25eca92..0d7f7fd 100644 --- a/src/pages/sponsor.astro +++ b/src/pages/sponsor.astro @@ -219,43 +219,22 @@ const currentYear = new Date().getFullYear();
- - - @@ -268,10 +247,23 @@ const currentYear = new Date().getFullYear(); 'Social media mentions for each episode' ]} heading="The Full Barrel" - price="$4k" + price="$7,000" period="per month" productId=`${import.meta.env.POLAR_FULLBARREL_PRODUCT_ID || 'YOUR_FULLBARREL_PRODUCT_ID'}` /> +