adikwok commited on
Commit
2593007
·
verified ·
1 Parent(s): 2db7684

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +31 -21
app.py CHANGED
@@ -996,6 +996,7 @@ def export_data() -> str:
996
 
997
  # Define custom CSS for full-screen, readable font, and black background
998
  custom_css = """
 
999
  /* Full-screen layout: remove padding and margins, use full width */
1000
  .gradio-container {
1001
  width: 100vw !important;
@@ -1004,39 +1005,46 @@ custom_css = """
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: #000000 !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 */
1029
  .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,8 +1052,8 @@ button {
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 {
@@ -1054,53 +1062,52 @@ button:hover {
1054
 
1055
  /* Dropdown styling */
1056
  select {
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;
@@ -1118,7 +1125,10 @@ select {
1118
  @keyframes spin {
1119
  100% { transform: rotate(360deg); }
1120
  }
 
1121
  """
 
 
1122
 
1123
  # Initialize storage and components (must be after get_topics_list)
1124
  storage = ChatStorage()
 
996
 
997
  # Define custom CSS for full-screen, readable font, and black background
998
  custom_css = """
999
+
1000
  /* Full-screen layout: remove padding and margins, use full width */
1001
  .gradio-container {
1002
  width: 100vw !important;
 
1005
  margin: 0 !important;
1006
  background-color: #000000 !important;
1007
  color: #ffffff !important;
1008
+ overflow-x: hidden !important;
1009
  }
1010
 
1011
  /* Remove padding and ensure full-width components */
1012
  .response-area, .input-area, .history-display, .analytics-display {
1013
+ padding: 8px !important;
1014
  margin: 0 !important;
1015
  width: 100% !important;
1016
  box-sizing: border-box !important;
1017
  border: 1px solid #333333 !important;
1018
+ border-radius: 4px !important;
1019
  }
1020
 
1021
  /* Textbox and output styling */
1022
  .response-area, .history-display, .analytics-display {
1023
  background-color: #000000 !important;
1024
  color: #ffffff !important;
1025
+ min-height: 150px !important;
1026
+ overflow-y: auto !important;
1027
+ box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2) !important;
1028
  }
1029
 
1030
  /* Input area */
1031
  .input-area {
1032
+ background-color: #000000 !important; /* Changed from #1a1a1a */
1033
  color: #ffffff !important;
1034
  border: 1px solid #333333 !important;
1035
+ min-height: 80px !important;
1036
+ }
1037
+
1038
+ /* Placeholder styling for readability */
1039
+ .response-area::placeholder, .input-area::placeholder, .history-display::placeholder, .analytics-display::placeholder {
1040
+ color: #aaaaaa !important; /* Brighter for contrast against #000000 */
1041
+ opacity: 1 !important;
1042
  }
1043
 
1044
  /* Font styling */
1045
  * {
1046
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
1047
+ font-size: 16px !important;
1048
  }
1049
 
1050
  /* Button styling */
 
1052
  background-color: #333333 !important;
1053
  color: #ffffff !important;
1054
  border: 1px solid #555555 !important;
1055
+ padding: 10px !important;
1056
+ min-height: 44px !important;
1057
  border-radius: 4px !important;
1058
  }
1059
  button:hover {
 
1062
 
1063
  /* Dropdown styling */
1064
  select {
1065
+ background-color: #000000 !important; /* Changed from #1a1a1a */
1066
  color: #ffffff !important;
1067
  border: 1px solid #333333 !important;
1068
  padding: 8px !important;
1069
+ min-height: 44px !important;
1070
  }
1071
 
1072
  /* Markdown text */
1073
  .markdown {
1074
  color: #ffffff !important;
1075
+ line-height: 1.5 !important;
1076
  }
1077
 
1078
  /* Mobile-specific adjustments */
1079
  @media (max-width: 600px) {
1080
  * {
1081
+ font-size: 14px !important;
1082
  }
1083
  .gradio-container {
1084
+ padding: 8px !important;
1085
  }
1086
  .response-area, .history-display, .analytics-display {
1087
+ min-height: 100px !important;
1088
  padding: 6px !important;
1089
  }
1090
  .input-area {
1091
+ min-height: 60px !important;
1092
  }
1093
  button, select {
1094
  padding: 8px !important;
1095
  font-size: 13px !important;
1096
+ min-height: 40px !important;
1097
  }
 
1098
  .gr-row {
1099
  flex-direction: column !important;
1100
  gap: 8px !important;
1101
  }
1102
  .gr-column {
1103
+ width: 100% !important;
1104
  }
1105
  }
1106
 
1107
  /* Tablet adjustments */
1108
  @media (min-width: 601px) and (max-width: 1024px) {
1109
  * {
1110
+ font-size: 15px !important;
1111
  }
1112
  .response-area, .history-display, .analytics-display {
1113
  min-height: 120px !important;
 
1125
  @keyframes spin {
1126
  100% { transform: rotate(360deg); }
1127
  }
1128
+
1129
  """
1130
+ # End of custom_css
1131
+
1132
 
1133
  # Initialize storage and components (must be after get_topics_list)
1134
  storage = ChatStorage()