feat: render sponsors page from basketball-api instead of hardcoded HTML #225

Open
opened 2026-04-06 16:20:44 +00:00 by forgejo_admin · 0 comments
Contributor

Type

Feature

Lineage

Depends on basketball-api#357 (sponsor model extension). Part of WS-S29 sponsor management story.

Repo

forgejo_admin/westside-landing

User Story

As an admin, I want committed sponsors to automatically appear on the website when I set display_on_site=true, so that adding a new sponsor doesn't require a code change.

Context

The /sponsors page currently has Snoopy THA Barber, NanoReleaf, and Coach West Recruiting hardcoded in Svelte markup. Once the basketball-api Sponsor model has presentation fields (tier, logo_url, website_url, description, cta_text, display_on_site), this page should fetch from the API and render dynamically.

File Targets

Files the agent should modify:

  • src/routes/(public)/sponsors/+page.svelte — replace hardcoded sponsor cards with API-driven rendering
  • src/routes/(public)/sponsors/+page.ts (or +page.server.ts) — load function fetching from basketball-api

Files the agent should NOT touch:

  • src/app.css — sponsor CSS classes already exist and should be reused

Acceptance Criteria

  • Sponsors page fetches from GET /public/sponsors?display_on_site=true (new public endpoint needed on basketball-api)
  • Each sponsor card renders: logo (if available), business_name, description, cta_text as button linking to website_url
  • Sponsors grouped by section: "Sponsors" (cash tiers) and "Partners" (community_partner tier)
  • Existing visual design preserved (sponsor-card, sponsor-logo, sponsor-info CSS classes)
  • Graceful fallback if API is unreachable (show static content or "loading" state)
  • "Become a Sponsor" CTA section preserved at bottom

Test Expectations

  • Manual: sponsors page loads and renders cards from API
  • Manual: adding a sponsor with display_on_site=true in the API makes it appear without code deploy
  • Manual: sponsor with no logo renders text-only card gracefully
  • Manual: community_partner tier sponsors appear in "Partners" section, not "Sponsors"

Constraints

  • Requires basketball-api#357 to merge first
  • Requires a new public (unauthenticated) endpoint on basketball-api for sponsor display data
  • Follow existing SvelteKit load patterns in the codebase
  • No Tailwind — pure CSS vars + explicit styles per project convention

Checklist

  • PR opened
  • No unrelated changes
  • arch-domain-sponsorship — domain model
  • westside-sponsors — canonical sponsor reference
### Type Feature ### Lineage Depends on basketball-api#357 (sponsor model extension). Part of WS-S29 sponsor management story. ### Repo `forgejo_admin/westside-landing` ### User Story As an admin, I want committed sponsors to automatically appear on the website when I set display_on_site=true, so that adding a new sponsor doesn't require a code change. ### Context The /sponsors page currently has Snoopy THA Barber, NanoReleaf, and Coach West Recruiting hardcoded in Svelte markup. Once the basketball-api Sponsor model has presentation fields (tier, logo_url, website_url, description, cta_text, display_on_site), this page should fetch from the API and render dynamically. ### File Targets Files the agent should modify: - `src/routes/(public)/sponsors/+page.svelte` — replace hardcoded sponsor cards with API-driven rendering - `src/routes/(public)/sponsors/+page.ts` (or +page.server.ts) — load function fetching from basketball-api Files the agent should NOT touch: - `src/app.css` — sponsor CSS classes already exist and should be reused ### Acceptance Criteria - [ ] Sponsors page fetches from `GET /public/sponsors?display_on_site=true` (new public endpoint needed on basketball-api) - [ ] Each sponsor card renders: logo (if available), business_name, description, cta_text as button linking to website_url - [ ] Sponsors grouped by section: "Sponsors" (cash tiers) and "Partners" (community_partner tier) - [ ] Existing visual design preserved (sponsor-card, sponsor-logo, sponsor-info CSS classes) - [ ] Graceful fallback if API is unreachable (show static content or "loading" state) - [ ] "Become a Sponsor" CTA section preserved at bottom ### Test Expectations - [ ] Manual: sponsors page loads and renders cards from API - [ ] Manual: adding a sponsor with display_on_site=true in the API makes it appear without code deploy - [ ] Manual: sponsor with no logo renders text-only card gracefully - [ ] Manual: community_partner tier sponsors appear in "Partners" section, not "Sponsors" ### Constraints - Requires basketball-api#357 to merge first - Requires a new public (unauthenticated) endpoint on basketball-api for sponsor display data - Follow existing SvelteKit load patterns in the codebase - No Tailwind — pure CSS vars + explicit styles per project convention ### Checklist - [ ] PR opened - [ ] No unrelated changes ### Related - `arch-domain-sponsorship` — domain model - `westside-sponsors` — canonical sponsor reference
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
ldraney/westside-app#225
No description provided.