transforms landing, about and schedule page content to data driven
This commit is contained in:
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -51,6 +51,12 @@ def _migrate_add_missing_columns(sync_conn):
|
||||
("station_config", "play_store_icon_url", sa.String(500), ""),
|
||||
("station_config", "play_store_url", sa.String(500), ""),
|
||||
("station_config", "app_store_embed_html", sa.Text, ""),
|
||||
# Page content columns
|
||||
("station_config", "hero_subtitle", sa.Text, ""),
|
||||
("station_config", "about_intro", sa.Text, ""),
|
||||
("station_config", "about_donation_text", sa.Text, ""),
|
||||
("station_config", "schedule_intro", sa.Text, ""),
|
||||
("station_config", "events_intro", sa.Text, ""),
|
||||
# Color theme columns
|
||||
("station_config", "color_primary", sa.String(7), "#1a3a5c"),
|
||||
("station_config", "color_primary_light", sa.String(7), "#2a5a8c"),
|
||||
|
||||
@@ -106,6 +106,13 @@ class StationConfig(Base):
|
||||
play_store_url = Column(String(500), nullable=False, default="")
|
||||
app_store_embed_html = Column(Text, nullable=False, default="")
|
||||
|
||||
# Page content (freeform text, admin-editable)
|
||||
hero_subtitle = Column(Text, nullable=False, default="")
|
||||
about_intro = Column(Text, nullable=False, default="")
|
||||
about_donation_text = Column(Text, nullable=False, default="")
|
||||
schedule_intro = Column(Text, nullable=False, default="")
|
||||
events_intro = Column(Text, nullable=False, default="")
|
||||
|
||||
# Color theme — hex strings, e.g. "#1a3a5c"
|
||||
# server_default is required so PostgreSQL emits a proper DEFAULT in ALTER TABLE DDL
|
||||
color_primary = Column(String(7), nullable=False, server_default=text("'#1a3a5c'"), default="#1a3a5c")
|
||||
|
||||
@@ -78,6 +78,12 @@ class StationConfigResponse(BaseModel):
|
||||
play_store_icon_url: str
|
||||
play_store_url: str
|
||||
app_store_embed_html: str
|
||||
# Page content
|
||||
hero_subtitle: str
|
||||
about_intro: str
|
||||
about_donation_text: str
|
||||
schedule_intro: str
|
||||
events_intro: str
|
||||
# Color theme
|
||||
color_primary: str
|
||||
color_primary_light: str
|
||||
@@ -119,6 +125,12 @@ class StationConfigUpdate(BaseModel):
|
||||
play_store_icon_url: Optional[str] = None
|
||||
play_store_url: Optional[str] = None
|
||||
app_store_embed_html: Optional[str] = None
|
||||
# Page content
|
||||
hero_subtitle: Optional[str] = None
|
||||
about_intro: Optional[str] = None
|
||||
about_donation_text: Optional[str] = None
|
||||
schedule_intro: Optional[str] = None
|
||||
events_intro: Optional[str] = None
|
||||
# Color theme
|
||||
color_primary: Optional[str] = None
|
||||
color_primary_light: Optional[str] = None
|
||||
|
||||
@@ -217,6 +217,12 @@ STATION_CONFIG: dict = {
|
||||
"play_store_icon_url": "",
|
||||
"play_store_url": "",
|
||||
"app_store_embed_html": "",
|
||||
# Page content
|
||||
"hero_subtitle": "Your community-powered, nonprofit radio station — bringing music, stories, and connection to the mountain towns and beyond since 1987.",
|
||||
"about_intro": "For nearly four decades, KMountain Flower Radio has been the voice of our community — a nonprofit, listener-supported radio station dedicated to music, local news, and the stories that bind mountain towns together.",
|
||||
"about_donation_text": "As a 501(c)(3) nonprofit, every donation keeps our airwaves free and our signal strong. Members receive exclusive perks and the satisfaction of knowing they helped make this possible.",
|
||||
"schedule_intro": "All times are local (Mountain Time). Every show is free to listen to live at 98.7 FM or via our online stream.",
|
||||
"events_intro": "Come meet the team, enjoy live music, and support public radio in person. All events are open to the community — friends and family of listeners welcome.",
|
||||
# Color theme defaults (match _variables.scss)
|
||||
"color_primary": "#1a3a5c",
|
||||
"color_primary_light": "#2a5a8c",
|
||||
|
||||
Reference in New Issue
Block a user