Spaces:
Sleeping
Sleeping
Update app/ui_streamlit.py
Browse files- app/ui_streamlit.py +52 -8
app/ui_streamlit.py
CHANGED
|
@@ -1,26 +1,70 @@
|
|
| 1 |
# app/ui_streamlit.py
|
| 2 |
import os, json
|
| 3 |
from pathlib import Path
|
| 4 |
-
import streamlit as st
|
| 5 |
|
| 6 |
from app.main import get_env, ensure_index_exists
|
| 7 |
from app.search import search
|
| 8 |
|
|
|
|
|
|
|
| 9 |
st.markdown("""
|
| 10 |
<style>
|
| 11 |
-
/* ---
|
| 12 |
-
|
| 13 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 14 |
}
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 19 |
}
|
| 20 |
</style>
|
| 21 |
""", unsafe_allow_html=True)
|
| 22 |
|
| 23 |
|
|
|
|
| 24 |
# ββ Streamlit config ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
|
| 25 |
st.set_page_config(page_title="Grants Discovery App By Lupo", page_icon="π§", layout="wide")
|
| 26 |
|
|
|
|
| 1 |
# app/ui_streamlit.py
|
| 2 |
import os, json
|
| 3 |
from pathlib import Path
|
|
|
|
| 4 |
|
| 5 |
from app.main import get_env, ensure_index_exists
|
| 6 |
from app.search import search
|
| 7 |
|
| 8 |
+
import streamlit as st
|
| 9 |
+
|
| 10 |
st.markdown("""
|
| 11 |
<style>
|
| 12 |
+
/* --- Global safety net: make default text dark --- */
|
| 13 |
+
html, body, [class^="css"], [class*=" css"] {
|
| 14 |
+
color: #0f172a !important; /* slate-900 */
|
| 15 |
+
}
|
| 16 |
+
|
| 17 |
+
/* --- Streamlit selectbox/multiselect (BaseWeb rendering) --- */
|
| 18 |
+
div[data-baseweb="select"] * {
|
| 19 |
+
color: #0f172a !important;
|
| 20 |
+
}
|
| 21 |
+
div[data-baseweb="select"] {
|
| 22 |
+
background: #ffffff !important;
|
| 23 |
+
border-color: #cbd5e1 !important; /* slate-300 */
|
| 24 |
+
}
|
| 25 |
+
|
| 26 |
+
/* placeholder inside the closed select */
|
| 27 |
+
div[data-baseweb="select"] div[aria-hidden="true"] {
|
| 28 |
+
color: #64748b !important; /* slate-500 */
|
| 29 |
+
}
|
| 30 |
+
|
| 31 |
+
/* open dropdown menu (BaseWeb popover) */
|
| 32 |
+
div[data-baseweb="popover"] [role="listbox"],
|
| 33 |
+
div[data-baseweb="menu"] {
|
| 34 |
+
background: #ffffff !important;
|
| 35 |
+
}
|
| 36 |
+
div[data-baseweb="popover"] [role="option"],
|
| 37 |
+
div[data-baseweb="menu"] li {
|
| 38 |
+
color: #0f172a !important;
|
| 39 |
+
background: #ffffff !important;
|
| 40 |
+
}
|
| 41 |
+
|
| 42 |
+
/* --- Alternative rendering (ARIA hooks) in newer Streamlit builds --- */
|
| 43 |
+
div[role="button"][aria-haspopup="listbox"] * {
|
| 44 |
+
color: #0f172a !important;
|
| 45 |
+
}
|
| 46 |
+
ul[role="listbox"] li, div[role="option"] {
|
| 47 |
+
color: #0f172a !important;
|
| 48 |
+
background: #ffffff !important;
|
| 49 |
}
|
| 50 |
+
|
| 51 |
+
/* --- Streamlit component wrappers --- */
|
| 52 |
+
.stSelectbox, .stMultiSelect {
|
| 53 |
+
color: #0f172a !important;
|
| 54 |
+
}
|
| 55 |
+
.stSelectbox div, .stMultiSelect div {
|
| 56 |
+
color: #0f172a !important;
|
| 57 |
+
}
|
| 58 |
+
|
| 59 |
+
/* --- Hard reset in case a global rule set all <span> to white --- */
|
| 60 |
+
span, li {
|
| 61 |
+
color: inherit !important;
|
| 62 |
}
|
| 63 |
</style>
|
| 64 |
""", unsafe_allow_html=True)
|
| 65 |
|
| 66 |
|
| 67 |
+
|
| 68 |
# ββ Streamlit config ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
|
| 69 |
st.set_page_config(page_title="Grants Discovery App By Lupo", page_icon="π§", layout="wide")
|
| 70 |
|