Spaces:
Sleeping
Sleeping
Update app.py
Browse filesmobile friendly
app.py
CHANGED
|
@@ -1004,22 +1004,25 @@ custom_css = """
|
|
| 1004 |
margin: 0 !important;
|
| 1005 |
background-color: #000000 !important;
|
| 1006 |
color: #ffffff !important;
|
|
|
|
| 1007 |
}
|
| 1008 |
|
| 1009 |
/* Remove padding and ensure full-width components */
|
| 1010 |
.response-area, .input-area, .history-display, .analytics-display {
|
| 1011 |
-
padding:
|
| 1012 |
margin: 0 !important;
|
| 1013 |
width: 100% !important;
|
| 1014 |
box-sizing: border-box !important;
|
| 1015 |
border: 1px solid #333333 !important;
|
|
|
|
| 1016 |
}
|
| 1017 |
|
| 1018 |
-
/* Textbox and
|
| 1019 |
.response-area, .history-display, .analytics-display {
|
| 1020 |
background-color: #1a1a1a !important;
|
| 1021 |
color: #ffffff !important;
|
| 1022 |
-
|
|
|
|
| 1023 |
}
|
| 1024 |
|
| 1025 |
/* Input area */
|
|
@@ -1027,12 +1030,13 @@ custom_css = """
|
|
| 1027 |
background-color: #1a1a1a !important;
|
| 1028 |
color: #ffffff !important;
|
| 1029 |
border: 1px solid #333333 !important;
|
|
|
|
| 1030 |
}
|
| 1031 |
|
| 1032 |
/* Font styling */
|
| 1033 |
* {
|
| 1034 |
font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
|
| 1035 |
-
font-size: 16px !important;
|
| 1036 |
}
|
| 1037 |
|
| 1038 |
/* Button styling */
|
|
@@ -1040,6 +1044,9 @@ button {
|
|
| 1040 |
background-color: #333333 !important;
|
| 1041 |
color: #ffffff !important;
|
| 1042 |
border: 1px solid #555555 !important;
|
|
|
|
|
|
|
|
|
|
| 1043 |
}
|
| 1044 |
button:hover {
|
| 1045 |
background-color: #555555 !important;
|
|
@@ -1050,11 +1057,57 @@ select {
|
|
| 1050 |
background-color: #1a1a1a !important;
|
| 1051 |
color: #ffffff !important;
|
| 1052 |
border: 1px solid #333333 !important;
|
|
|
|
|
|
|
| 1053 |
}
|
| 1054 |
|
| 1055 |
/* Markdown text */
|
| 1056 |
.markdown {
|
| 1057 |
color: #ffffff !important;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1058 |
}
|
| 1059 |
"""
|
| 1060 |
|
|
|
|
| 1004 |
margin: 0 !important;
|
| 1005 |
background-color: #000000 !important;
|
| 1006 |
color: #ffffff !important;
|
| 1007 |
+
overflow-x: hidden !important; /* Prevent horizontal scroll on mobile */
|
| 1008 |
}
|
| 1009 |
|
| 1010 |
/* Remove padding and ensure full-width components */
|
| 1011 |
.response-area, .input-area, .history-display, .analytics-display {
|
| 1012 |
+
padding: 8px !important; /* Reduced padding for mobile */
|
| 1013 |
margin: 0 !important;
|
| 1014 |
width: 100% !important;
|
| 1015 |
box-sizing: border-box !important;
|
| 1016 |
border: 1px solid #333333 !important;
|
| 1017 |
+
border-radius: 4px !important; /* Subtle rounding for modern look */
|
| 1018 |
}
|
| 1019 |
|
| 1020 |
+
/* Textbox and output styling */
|
| 1021 |
.response-area, .history-display, .analytics-display {
|
| 1022 |
background-color: #1a1a1a !important;
|
| 1023 |
color: #ffffff !important;
|
| 1024 |
+
min-height: 150px !important; /* Smaller height for mobile */
|
| 1025 |
+
overflow-y: auto !important; /* Smooth scrolling for long outputs */
|
| 1026 |
}
|
| 1027 |
|
| 1028 |
/* Input area */
|
|
|
|
| 1030 |
background-color: #1a1a1a !important;
|
| 1031 |
color: #ffffff !important;
|
| 1032 |
border: 1px solid #333333 !important;
|
| 1033 |
+
min-height: 80px !important; /* Compact for mobile journaling */
|
| 1034 |
}
|
| 1035 |
|
| 1036 |
/* Font styling */
|
| 1037 |
* {
|
| 1038 |
font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
|
| 1039 |
+
font-size: 16px !important; /* Default for desktop */
|
| 1040 |
}
|
| 1041 |
|
| 1042 |
/* Button styling */
|
|
|
|
| 1044 |
background-color: #333333 !important;
|
| 1045 |
color: #ffffff !important;
|
| 1046 |
border: 1px solid #555555 !important;
|
| 1047 |
+
padding: 10px !important; /* Slightly larger for touch */
|
| 1048 |
+
min-height: 44px !important; /* WCAG-compliant touch target */
|
| 1049 |
+
border-radius: 4px !important;
|
| 1050 |
}
|
| 1051 |
button:hover {
|
| 1052 |
background-color: #555555 !important;
|
|
|
|
| 1057 |
background-color: #1a1a1a !important;
|
| 1058 |
color: #ffffff !important;
|
| 1059 |
border: 1px solid #333333 !important;
|
| 1060 |
+
padding: 8px !important;
|
| 1061 |
+
min-height: 44px !important; /* Touch-friendly */
|
| 1062 |
}
|
| 1063 |
|
| 1064 |
/* Markdown text */
|
| 1065 |
.markdown {
|
| 1066 |
color: #ffffff !important;
|
| 1067 |
+
line-height: 1.5 !important; /* Better readability */
|
| 1068 |
+
}
|
| 1069 |
+
|
| 1070 |
+
/* Mobile-specific adjustments */
|
| 1071 |
+
@media (max-width: 600px) {
|
| 1072 |
+
* {
|
| 1073 |
+
font-size: 14px !important; /* Smaller fonts for mobile */
|
| 1074 |
+
}
|
| 1075 |
+
.gradio-container {
|
| 1076 |
+
padding: 8px !important; /* Minimal padding for breathing room */
|
| 1077 |
+
}
|
| 1078 |
+
.response-area, .history-display, .analytics-display {
|
| 1079 |
+
min-height: 100px !important; /* Compact outputs */
|
| 1080 |
+
padding: 6px !important;
|
| 1081 |
+
}
|
| 1082 |
+
.input-area {
|
| 1083 |
+
min-height: 60px !important; /* Smaller input box */
|
| 1084 |
+
}
|
| 1085 |
+
button, select {
|
| 1086 |
+
padding: 8px !important;
|
| 1087 |
+
font-size: 13px !important;
|
| 1088 |
+
min-height: 40px !important; /* Slightly smaller but still touch-friendly */
|
| 1089 |
+
}
|
| 1090 |
+
/* Stack rows vertically on mobile */
|
| 1091 |
+
.gr-row {
|
| 1092 |
+
flex-direction: column !important;
|
| 1093 |
+
gap: 8px !important;
|
| 1094 |
+
}
|
| 1095 |
+
.gr-column {
|
| 1096 |
+
width: 100% !important; /* Full width for inputs like topic */
|
| 1097 |
+
}
|
| 1098 |
+
}
|
| 1099 |
+
|
| 1100 |
+
/* Tablet adjustments */
|
| 1101 |
+
@media (min-width: 601px) and (max-width: 1024px) {
|
| 1102 |
+
* {
|
| 1103 |
+
font-size: 15px !important; /* Middle ground for tablets */
|
| 1104 |
+
}
|
| 1105 |
+
.response-area, .history-display, .analytics-display {
|
| 1106 |
+
min-height: 120px !important;
|
| 1107 |
+
}
|
| 1108 |
+
.input-area {
|
| 1109 |
+
min-height: 70px !important;
|
| 1110 |
+
}
|
| 1111 |
}
|
| 1112 |
"""
|
| 1113 |
|