Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -22,13 +22,14 @@ st.markdown("""
|
|
| 22 |
<style>
|
| 23 |
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');
|
| 24 |
|
| 25 |
-
/* Global Text Visibility Fix */
|
| 26 |
.stApp {
|
| 27 |
background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
|
| 28 |
color: #0f172a !important;
|
| 29 |
font-family: 'Inter', sans-serif;
|
| 30 |
}
|
| 31 |
|
|
|
|
| 32 |
p, span, div, label, h1, h2, h3, h4, h5, h6 {
|
| 33 |
color: #0f172a;
|
| 34 |
}
|
|
@@ -53,44 +54,38 @@ st.markdown("""
|
|
| 53 |
color: #334155 !important;
|
| 54 |
}
|
| 55 |
|
| 56 |
-
/* SIDEBAR VISIBILITY FIXES
|
|
|
|
|
|
|
| 57 |
[data-testid="stSidebar"] {
|
| 58 |
background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
|
| 59 |
border-right: 1px solid #334155;
|
| 60 |
}
|
| 61 |
|
| 62 |
-
/*
|
| 63 |
-
[data-testid="stSidebar"] h1, [data-testid="stSidebar"] h2, [data-testid="stSidebar"] h3
|
|
|
|
|
|
|
| 64 |
color: #f8fafc !important;
|
| 65 |
}
|
| 66 |
|
| 67 |
-
/*
|
| 68 |
-
|
| 69 |
-
|
| 70 |
-
|
| 71 |
}
|
| 72 |
-
|
| 73 |
-
/* Input Boxes (Selectbox, DateInput) Text Color Fix */
|
| 74 |
-
/* This targets the text INSIDE the white input box/dropdown */
|
| 75 |
[data-testid="stSidebar"] div[data-baseweb="select"] div {
|
| 76 |
-
|
| 77 |
}
|
| 78 |
-
|
|
|
|
| 79 |
color: #0f172a !important;
|
| 80 |
}
|
| 81 |
-
[data-testid="stSidebar"] div[role="listbox"] li {
|
| 82 |
-
color: #0f172a !important;
|
| 83 |
-
}
|
| 84 |
-
|
| 85 |
-
/* Markdown Text in Sidebar */
|
| 86 |
-
[data-testid="stSidebar"] .stMarkdown p {
|
| 87 |
-
color: #cbd5e1 !important;
|
| 88 |
-
}
|
| 89 |
|
| 90 |
-
/* Link Button Fix
|
| 91 |
[data-testid="stSidebar"] a {
|
| 92 |
-
background-color: #3b82f6 !important;
|
| 93 |
-
color: #ffffff !important;
|
| 94 |
font-weight: 700 !important;
|
| 95 |
text-decoration: none;
|
| 96 |
border: 1px solid #2563eb !important;
|
|
@@ -108,23 +103,6 @@ st.markdown("""
|
|
| 108 |
transform: translateY(-1px);
|
| 109 |
}
|
| 110 |
|
| 111 |
-
/* Link Button Container Background (for st.link_button wrapper) */
|
| 112 |
-
[data-testid="stSidebar"] button[kind="secondary"] {
|
| 113 |
-
background-color: #f8fafc !important; /* Light bg for button */
|
| 114 |
-
color: #0f172a !important; /* Dark text */
|
| 115 |
-
border: 1px solid #cbd5e1 !important;
|
| 116 |
-
font-weight: 600 !important;
|
| 117 |
-
}
|
| 118 |
-
[data-testid="stSidebar"] button[kind="secondary"]:hover {
|
| 119 |
-
background-color: #e2e8f0 !important;
|
| 120 |
-
border-color: #94a3b8 !important;
|
| 121 |
-
color: #0f172a !important;
|
| 122 |
-
}
|
| 123 |
-
/* Specific fix for link button text inside */
|
| 124 |
-
[data-testid="stSidebar"] button[kind="secondary"] p {
|
| 125 |
-
color: #0f172a !important;
|
| 126 |
-
}
|
| 127 |
-
|
| 128 |
/* HOTSPOTS */
|
| 129 |
.hotspot-card { background: white; padding: 16px; border-radius: 10px; border-left: 5px solid; margin-bottom: 12px; box-shadow: 0 2px 4px rgba(0,0,0,0.05); transition: all 0.2s; }
|
| 130 |
.hotspot-card:hover { transform: translateX(4px); box-shadow: 0 4px 6px rgba(0,0,0,0.1); }
|
|
@@ -495,4 +473,4 @@ with tab_insights:
|
|
| 495 |
"2. Deploy biometric re-verification for 'Rural A' cluster")
|
| 496 |
|
| 497 |
st.markdown("---")
|
| 498 |
-
st.markdown("""<div style="text-align: center; font-size: 13px; color: #94a3b8;"><b>Project S.A.T.A.R.K AI</b> | UIDAI Hackathon 2026</div>""", unsafe_allow_html=True)
|
|
|
|
| 22 |
<style>
|
| 23 |
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');
|
| 24 |
|
| 25 |
+
/* Global Text Visibility Fix - Main Area */
|
| 26 |
.stApp {
|
| 27 |
background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
|
| 28 |
color: #0f172a !important;
|
| 29 |
font-family: 'Inter', sans-serif;
|
| 30 |
}
|
| 31 |
|
| 32 |
+
/* Default text color for Main Area (Dark) */
|
| 33 |
p, span, div, label, h1, h2, h3, h4, h5, h6 {
|
| 34 |
color: #0f172a;
|
| 35 |
}
|
|
|
|
| 54 |
color: #334155 !important;
|
| 55 |
}
|
| 56 |
|
| 57 |
+
/* --- SIDEBAR VISIBILITY FIXES (DARK MODE COMPATIBLE) --- */
|
| 58 |
+
|
| 59 |
+
/* 1. Force Sidebar Background to Dark Blue */
|
| 60 |
[data-testid="stSidebar"] {
|
| 61 |
background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
|
| 62 |
border-right: 1px solid #334155;
|
| 63 |
}
|
| 64 |
|
| 65 |
+
/* 2. FORCE ALL TEXT IN SIDEBAR TO BE WHITE/LIGHT */
|
| 66 |
+
[data-testid="stSidebar"] h1, [data-testid="stSidebar"] h2, [data-testid="stSidebar"] h3,
|
| 67 |
+
[data-testid="stSidebar"] p, [data-testid="stSidebar"] span, [data-testid="stSidebar"] label,
|
| 68 |
+
[data-testid="stSidebar"] div {
|
| 69 |
color: #f8fafc !important;
|
| 70 |
}
|
| 71 |
|
| 72 |
+
/* 3. EXCEPTION: Text INSIDE Input Boxes (Selectbox, DateInput) must be DARK */
|
| 73 |
+
/* Because the input box background is usually white */
|
| 74 |
+
[data-testid="stSidebar"] input {
|
| 75 |
+
color: #0f172a !important;
|
| 76 |
}
|
|
|
|
|
|
|
|
|
|
| 77 |
[data-testid="stSidebar"] div[data-baseweb="select"] div {
|
| 78 |
+
color: #0f172a !important;
|
| 79 |
}
|
| 80 |
+
/* Fix for Dropdown Options List */
|
| 81 |
+
div[role="listbox"] li, div[role="listbox"] div {
|
| 82 |
color: #0f172a !important;
|
| 83 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 84 |
|
| 85 |
+
/* Link Button Fix */
|
| 86 |
[data-testid="stSidebar"] a {
|
| 87 |
+
background-color: #3b82f6 !important;
|
| 88 |
+
color: #ffffff !important;
|
| 89 |
font-weight: 700 !important;
|
| 90 |
text-decoration: none;
|
| 91 |
border: 1px solid #2563eb !important;
|
|
|
|
| 103 |
transform: translateY(-1px);
|
| 104 |
}
|
| 105 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 106 |
/* HOTSPOTS */
|
| 107 |
.hotspot-card { background: white; padding: 16px; border-radius: 10px; border-left: 5px solid; margin-bottom: 12px; box-shadow: 0 2px 4px rgba(0,0,0,0.05); transition: all 0.2s; }
|
| 108 |
.hotspot-card:hover { transform: translateX(4px); box-shadow: 0 4px 6px rgba(0,0,0,0.1); }
|
|
|
|
| 473 |
"2. Deploy biometric re-verification for 'Rural A' cluster")
|
| 474 |
|
| 475 |
st.markdown("---")
|
| 476 |
+
st.markdown("""<div style="text-align: center; font-size: 13px; color: #94a3b8;"><b>Project S.A.T.A.R.K AI</b> | UIDAI Hackathon 2026</div>""", unsafe_allow_html=True)
|