From 4d2e98b3cddba6e89933e7a656feeacef575938f Mon Sep 17 00:00:00 2001 From: Tyler Date: Sun, 17 May 2026 01:39:43 -0700 Subject: Revert "Add TopBar: search hint, NYSE clock, account chip; fix sticky" This reverts commit 676ef596d16f39f5e101ea50ef025dd5415705ce. --- app.py | 104 +++++++++-------------------------------------------------------- 1 file changed, 14 insertions(+), 90 deletions(-) diff --git a/app.py b/app.py index 2ef27d6..87a6716 100644 --- a/app.py +++ b/app.py @@ -220,53 +220,14 @@ button[kind="secondary"]:hover { padding-bottom: 3rem !important; } -/* ── Allow sticky positioning inside Streamlit's main column ────────────── */ -section[data-testid="stMain"] { overflow: visible !important; } - -/* ── TopBar ─────────────────────────────────────────────────────────────── */ -.psm-top { - position: sticky; top: 0; z-index: 200; - background: var(--ink-0); border-bottom: 1px solid var(--line-1); - padding: 10px 0; margin-bottom: 0.75rem; - display: flex; align-items: center; gap: 16px; -} -.psm-search-bar { - flex: 1; max-width: 460px; - display: flex; align-items: center; gap: 8px; - background: var(--ink-2); border: 1px solid var(--line-2); - border-radius: var(--r-2); padding: 7px 12px; -} -.psm-search-bar input { - flex: 1; background: transparent; border: none; outline: none; - font-family: var(--font-mono); font-size: var(--fs-13); color: var(--fg-1); - pointer-events: none; -} -.psm-search-bar input::placeholder { color: var(--fg-3); } -.psm-search-bar .kbd { - font-family: var(--font-mono); font-size: var(--fs-12); color: var(--fg-3); - border: 1px solid var(--line-2); padding: 1px 6px; - border-radius: var(--r-1); background: var(--ink-1); flex-shrink: 0; -} -.psm-topbar-clock { - font-family: var(--font-mono); font-size: var(--fs-12); color: var(--fg-2); - display: flex; gap: 10px; align-items: center; -} -.psm-topbar-dot { - width: 6px; height: 6px; border-radius: 50%; - background: var(--fg-4); flex-shrink: 0; -} -.psm-topbar-dot.open { background: var(--positive); box-shadow: 0 0 5px var(--positive); } -.psm-topbar-account { - display: flex; align-items: center; gap: 8px; - padding: 5px 12px; border: 1px solid var(--line-2); border-radius: var(--r-full); - font-family: var(--font-sans); font-size: var(--fs-13); color: var(--fg-1); - margin-left: auto; -} -.psm-topbar-av { - width: 20px; height: 20px; border-radius: 50%; - background: var(--brass); color: var(--brass-ink); - display: flex; align-items: center; justify-content: center; - font-family: var(--font-display); font-style: italic; font-size: 11px; +/* ── Sticky market bar ──────────────────────────────────────────────────── */ +.st-key-market_bar_sticky { + position: sticky !important; + top: 0 !important; + z-index: 200 !important; + background: var(--ink-0) !important; + padding-bottom: 0.5rem !important; + margin-bottom: -0.5rem !important; } /* ── Tabs ───────────────────────────────────────────────────────────────── */ @@ -823,57 +784,20 @@ with st.sidebar: render_top_movers(True) -# ── TopBar ──────────────────────────────────────────────────────────────────── - -st.markdown( - "
" - "" - "
" - "" - "NYSE · Closed" - "--:--:-- ET" - "
" - "" - "
", - unsafe_allow_html=True, -) - # ── Market Bar ──────────────────────────────────────────────────────────────── -with st.container(): +with st.container(key="market_bar_sticky"): render_market_bar() st.divider() -# ── TopBar clock + / shortcut ───────────────────────────────────────────────── +# ── ⌘K / Ctrl+K shortcut — focuses sidebar ticker search ───────────────────── components.html( "