adds color themeing support to the site
This commit is contained in:
1 parent
bfd6c5bb9e
commit
ee79662e5d
37 files changed
+1046
-15
No files matched your search
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -51,6 +51,20 @@ 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, ""),
|
||||
# Color theme columns
|
||||
("station_config", "color_primary", sa.String(7), "#1a3a5c"),
|
||||
("station_config", "color_primary_light", sa.String(7), "#2a5a8c"),
|
||||
("station_config", "color_primary_dark", sa.String(7), "#0e2440"),
|
||||
("station_config", "color_primary_muted", sa.String(7), "#3a6a9c"),
|
||||
("station_config", "color_accent", sa.String(7), "#e87a2e"),
|
||||
("station_config", "color_accent_light", sa.String(7), "#f09a4e"),
|
||||
("station_config", "color_accent_dark", sa.String(7), "#c85a1e"),
|
||||
("station_config", "color_accent_muted", sa.String(7), "#f0a86a"),
|
||||
("station_config", "color_background", sa.String(7), "#faf6f0"),
|
||||
("station_config", "color_text", sa.String(7), "#3a3632"),
|
||||
("station_config", "color_success", sa.String(7), "#4a9e4f"),
|
||||
("station_config", "color_danger", sa.String(7), "#c83030"),
|
||||
("station_config", "color_info", sa.String(7), "#3a8abf"),
|
||||
]
|
||||
|
||||
# Determine dialect
|
||||
|
||||
@@ -105,6 +105,21 @@ class StationConfig(Base):
|
||||
play_store_url = Column(String(500), nullable=False, default="")
|
||||
app_store_embed_html = Column(Text, nullable=False, default="")
|
||||
|
||||
# Color theme — hex strings, e.g. "#1a3a5c"
|
||||
color_primary = Column(String(7), nullable=False, default="#1a3a5c")
|
||||
color_primary_light = Column(String(7), nullable=False, default="#2a5a8c")
|
||||
color_primary_dark = Column(String(7), nullable=False, default="#0e2440")
|
||||
color_primary_muted = Column(String(7), nullable=False, default="#3a6a9c")
|
||||
color_accent = Column(String(7), nullable=False, default="#e87a2e")
|
||||
color_accent_light = Column(String(7), nullable=False, default="#f09a4e")
|
||||
color_accent_dark = Column(String(7), nullable=False, default="#c85a1e")
|
||||
color_accent_muted = Column(String(7), nullable=False, default="#f0a86a")
|
||||
color_background = Column(String(7), nullable=False, default="#faf6f0")
|
||||
color_text = Column(String(7), nullable=False, default="#3a3632")
|
||||
color_success = Column(String(7), nullable=False, default="#4a9e4f")
|
||||
color_danger = Column(String(7), nullable=False, default="#c83030")
|
||||
color_info = Column(String(7), nullable=False, default="#3a8abf")
|
||||
|
||||
|
||||
class HistoryEntry(Base):
|
||||
__tablename__ = "history_entries"
|
||||
|
||||
@@ -78,6 +78,20 @@ class StationConfigResponse(BaseModel):
|
||||
play_store_icon_url: str
|
||||
play_store_url: str
|
||||
app_store_embed_html: str
|
||||
# Color theme
|
||||
color_primary: str
|
||||
color_primary_light: str
|
||||
color_primary_dark: str
|
||||
color_primary_muted: str
|
||||
color_accent: str
|
||||
color_accent_light: str
|
||||
color_accent_dark: str
|
||||
color_accent_muted: str
|
||||
color_background: str
|
||||
color_text: str
|
||||
color_success: str
|
||||
color_danger: str
|
||||
color_info: str
|
||||
|
||||
model_config = {"from_attributes": True}
|
||||
|
||||
@@ -105,6 +119,20 @@ class StationConfigUpdate(BaseModel):
|
||||
play_store_icon_url: Optional[str] = None
|
||||
play_store_url: Optional[str] = None
|
||||
app_store_embed_html: Optional[str] = None
|
||||
# Color theme
|
||||
color_primary: Optional[str] = None
|
||||
color_primary_light: Optional[str] = None
|
||||
color_primary_dark: Optional[str] = None
|
||||
color_primary_muted: Optional[str] = None
|
||||
color_accent: Optional[str] = None
|
||||
color_accent_light: Optional[str] = None
|
||||
color_accent_dark: Optional[str] = None
|
||||
color_accent_muted: Optional[str] = None
|
||||
color_background: Optional[str] = None
|
||||
color_text: Optional[str] = None
|
||||
color_success: Optional[str] = None
|
||||
color_danger: Optional[str] = None
|
||||
color_info: Optional[str] = None
|
||||
|
||||
|
||||
# ── HistoryEntry ──────────────────────────────────────────
|
||||
|
||||
Reference in new issue
Block a user