Update app.py
Browse files
app.py
CHANGED
|
@@ -10,11 +10,24 @@ from components.doctor_info import render_doctor_list
|
|
| 10 |
from components.how_to_use import render_how_to_use_guide
|
| 11 |
|
| 12 |
# --- Style and Theme ---
|
|
|
|
| 13 |
css = """
|
|
|
|
| 14 |
.gradio-container { max-width: 1000px !important; margin: auto !important; }
|
| 15 |
.centered-text { text-align: center; }
|
| 16 |
-
"""
|
| 17 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 18 |
with gr.Blocks(title="DiaSpark: Your Health Management Platform", css=css) as demo:
|
| 19 |
|
| 20 |
user_state = gr.State({"email": None, "id": None, "logged_in": False, "gender": None, "username": None})
|
|
|
|
| 10 |
from components.how_to_use import render_how_to_use_guide
|
| 11 |
|
| 12 |
# --- Style and Theme ---
|
| 13 |
+
# --- Style and Theme with NEW Mobile-Responsive CSS ---
|
| 14 |
css = """
|
| 15 |
+
/* General container style for all screens */
|
| 16 |
.gradio-container { max-width: 1000px !important; margin: auto !important; }
|
| 17 |
.centered-text { text-align: center; }
|
|
|
|
| 18 |
|
| 19 |
+
/* --- THIS IS THE NEW MOBILE-RESPONSIVE RULE --- */
|
| 20 |
+
/* This rule applies ONLY when the screen width is 600px or less */
|
| 21 |
+
@media (max-width: 600px) {
|
| 22 |
+
/* Find all rows inside the Gradio app */
|
| 23 |
+
.gradio-row {
|
| 24 |
+
/* Change the layout from horizontal to vertical */
|
| 25 |
+
flex-direction: column !important;
|
| 26 |
+
/* Add a small gap between the stacked elements for breathing room */
|
| 27 |
+
gap: 1rem !important;
|
| 28 |
+
}
|
| 29 |
+
}
|
| 30 |
+
"""
|
| 31 |
with gr.Blocks(title="DiaSpark: Your Health Management Platform", css=css) as demo:
|
| 32 |
|
| 33 |
user_state = gr.State({"email": None, "id": None, "logged_in": False, "gender": None, "username": None})
|