Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -327,7 +327,6 @@ st.markdown(
|
|
| 327 |
hero_html = img_tag(THEME["hero"]["logo"], "ST_LOG SUITE")
|
| 328 |
st.markdown(f"<div class='hero'>{hero_html}</div>", unsafe_allow_html=True)
|
| 329 |
|
| 330 |
-
# ========= Cards =========
|
| 331 |
def build_card_vars(style: Dict[str, Any]) -> str:
|
| 332 |
s = []
|
| 333 |
if "width" in style: s.append(f"--c-w:{int(style['width'])}px")
|
|
@@ -338,21 +337,21 @@ def build_card_vars(style: Dict[str, Any]) -> str:
|
|
| 338 |
if "bg_bot" in style: s.append(f"--c-bg-bot:{style['bg_bot']}")
|
| 339 |
if "border" in style: s.append(f"--c-border:{style['border']}")
|
| 340 |
if "border_width" in style: s.append(f"--c-bw:{int(style['border_width'])}px")
|
| 341 |
-
if "title_color" in style: s.append(f"--c-title-color:{style['title_color
|
| 342 |
if "title_fs" in style: s.append(f"--c-title-fs:{int(style['title_fs'])}px")
|
| 343 |
-
if "blurb_color" in style: s.append(f"--c-blurb-color:{style['blurb_color
|
| 344 |
if "blurb_fs" in style: s.append(f"--c-blurb-fs:{int(style['blurb_fs'])}px")
|
| 345 |
-
if "btn_bg1" in style: s.append(f"--c-btn-bg1:{style['btn_bg1
|
| 346 |
-
if "btn_bg2" in style: s.append(f"--c-btn-bg2:{style['btn_bg2
|
| 347 |
-
if "btn_text" in style: s.append(f"--c-btn-text:{style['btn_text
|
| 348 |
-
if "btn_border" in style: s.append(f"--c-btn-border:{style['btn_border
|
| 349 |
if "btn_fs" in style: s.append(f"--c-btn-fs:{int(style['btn_fs'])}px")
|
| 350 |
-
if "btn_pad_v" in style: s.append(f"--c-btn-pv:{int(style['btn_pad_v
|
| 351 |
-
if "btn_pad_h" in style: s.append(f"--c-btn-ph:{int(style['btn_pad_h
|
| 352 |
-
if "icon_diam" in style: s.append(f"--c-icon-d:{int(style['icon_diam
|
| 353 |
-
if "icon_img" in style: s.append(f"--c-icon-img:{int(style['icon_img
|
| 354 |
-
if "icon_bg" in style: s.append(f"--c-icon-bg:{style['icon_bg
|
| 355 |
-
if "icon_border" in style: s.append(f"--c-icon-border:{style['icon_border
|
| 356 |
return "; ".join(s)
|
| 357 |
|
| 358 |
def app_card(card_cfg: Dict[str, Any]) -> str:
|
|
|
|
| 327 |
hero_html = img_tag(THEME["hero"]["logo"], "ST_LOG SUITE")
|
| 328 |
st.markdown(f"<div class='hero'>{hero_html}</div>", unsafe_allow_html=True)
|
| 329 |
|
|
|
|
| 330 |
def build_card_vars(style: Dict[str, Any]) -> str:
|
| 331 |
s = []
|
| 332 |
if "width" in style: s.append(f"--c-w:{int(style['width'])}px")
|
|
|
|
| 337 |
if "bg_bot" in style: s.append(f"--c-bg-bot:{style['bg_bot']}")
|
| 338 |
if "border" in style: s.append(f"--c-border:{style['border']}")
|
| 339 |
if "border_width" in style: s.append(f"--c-bw:{int(style['border_width'])}px")
|
| 340 |
+
if "title_color" in style: s.append(f"--c-title-color:{style['title_color']}")
|
| 341 |
if "title_fs" in style: s.append(f"--c-title-fs:{int(style['title_fs'])}px")
|
| 342 |
+
if "blurb_color" in style: s.append(f"--c-blurb-color:{style['blurb_color']}")
|
| 343 |
if "blurb_fs" in style: s.append(f"--c-blurb-fs:{int(style['blurb_fs'])}px")
|
| 344 |
+
if "btn_bg1" in style: s.append(f"--c-btn-bg1:{style['btn_bg1']}")
|
| 345 |
+
if "btn_bg2" in style: s.append(f"--c-btn-bg2:{style['btn_bg2']}")
|
| 346 |
+
if "btn_text" in style: s.append(f"--c-btn-text:{style['btn_text']}")
|
| 347 |
+
if "btn_border" in style: s.append(f"--c-btn-border:{style['btn_border']}")
|
| 348 |
if "btn_fs" in style: s.append(f"--c-btn-fs:{int(style['btn_fs'])}px")
|
| 349 |
+
if "btn_pad_v" in style: s.append(f"--c-btn-pv:{int(style['btn_pad_v'])}px")
|
| 350 |
+
if "btn_pad_h" in style: s.append(f"--c-btn-ph:{int(style['btn_pad_h'])}px")
|
| 351 |
+
if "icon_diam" in style: s.append(f"--c-icon-d:{int(style['icon_diam'])}px")
|
| 352 |
+
if "icon_img" in style: s.append(f"--c-icon-img:{int(style['icon_img'])}px")
|
| 353 |
+
if "icon_bg" in style: s.append(f"--c-icon-bg:{style['icon_bg']}")
|
| 354 |
+
if "icon_border" in style: s.append(f"--c-icon-border:{style['icon_border']}")
|
| 355 |
return "; ".join(s)
|
| 356 |
|
| 357 |
def app_card(card_cfg: Dict[str, Any]) -> str:
|