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
|
||||
|
||||
Reference in New Issue
Block a user