Spaces:
Running
Running
Upload streamlit_app.py
Browse files- streamlit_app.py +36 -0
streamlit_app.py
CHANGED
|
@@ -67,6 +67,42 @@ st.markdown(
|
|
| 67 |
color: #9aa4b2;
|
| 68 |
font-size: 12px;
|
| 69 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 70 |
</style>
|
| 71 |
""",
|
| 72 |
unsafe_allow_html=True,
|
|
|
|
| 67 |
color: #9aa4b2;
|
| 68 |
font-size: 12px;
|
| 69 |
}
|
| 70 |
+
|
| 71 |
+
/* ββ Mobile-responsive overrides (phones / narrow tablets) βββββββββββ
|
| 72 |
+
Streamlit's default st.columns() lays out equal-width children in a
|
| 73 |
+
flex row that never wraps. On a 380 px screen the 5 KPI tiles or the
|
| 74 |
+
2-column chart pairs become unreadably narrow. The rules below tell
|
| 75 |
+
any horizontal block to wrap, and force each child column to take
|
| 76 |
+
the full row width below 768 px. */
|
| 77 |
+
@media (max-width: 768px) {
|
| 78 |
+
div[data-testid="stHorizontalBlock"] {
|
| 79 |
+
flex-wrap: wrap !important;
|
| 80 |
+
}
|
| 81 |
+
div[data-testid="stHorizontalBlock"] > div[data-testid="column"] {
|
| 82 |
+
flex: 1 1 100% !important;
|
| 83 |
+
min-width: 100% !important;
|
| 84 |
+
width: 100% !important;
|
| 85 |
+
}
|
| 86 |
+
div[data-testid="stMetric"] {
|
| 87 |
+
padding: 12px 14px;
|
| 88 |
+
}
|
| 89 |
+
div[data-testid="stMetric"] [data-testid="stMetricValue"] {
|
| 90 |
+
font-size: 22px;
|
| 91 |
+
}
|
| 92 |
+
div[data-testid="stMetric"] [data-testid="stMetricLabel"] {
|
| 93 |
+
font-size: 11px;
|
| 94 |
+
}
|
| 95 |
+
/* Give Plotly charts a bit more vertical room since they now occupy
|
| 96 |
+
the full width β Plotly aspect ratio reads weird otherwise. */
|
| 97 |
+
div[data-testid="stPlotlyChart"] {
|
| 98 |
+
min-height: 300px;
|
| 99 |
+
}
|
| 100 |
+
/* Tighten the title so the KPI tiles are visible above the fold. */
|
| 101 |
+
h1 {
|
| 102 |
+
font-size: 24px !important;
|
| 103 |
+
margin-bottom: 4px !important;
|
| 104 |
+
}
|
| 105 |
+
}
|
| 106 |
</style>
|
| 107 |
""",
|
| 108 |
unsafe_allow_html=True,
|