Files
daily-counter/app/styles.py
John Ahlroos da7e881311
Some checks failed
Build & Release / build-docker-image (push) Failing after 3m15s
Build & Release / deploy-to-production (push) Has been skipped
Initial import
2026-04-06 20:32:01 +02:00

25 lines
638 B
Python

import streamlit as st
import sql
def _load_css(filepath):
with open(filepath) as file:
st.html(f"<style>{file.read()}</style>")
def _load_color_selector_styles():
colors = sql.get_colors(1) #FIXME Change to use user profile color palette
for idx, c in enumerate(colors.keys()):
css_color = '#' + colors[c][0]
st.html(f"""
<style>
.st-key-color-selector label:has(> input[value='{idx}']) {{
background-color: {css_color};
}}
</style>
""")
def init_styles():
_load_css("css/theme.css")
_load_color_selector_styles()