Dmitry Beresnev commited on
Commit
60a1d18
·
1 Parent(s): c119a98

fix dark theme UI

Browse files
Files changed (1) hide show
  1. app/main.py +138 -0
app/main.py CHANGED
@@ -36,6 +36,36 @@ st.markdown("""
36
  --border-color: #30363d;
37
  }
38
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
39
  .metric-card {
40
  background: linear-gradient(135deg, #1f2937 0%, #111827 100%);
41
  padding: 1.5rem;
@@ -65,6 +95,114 @@ st.markdown("""
65
  margin-top: 2rem;
66
  margin-bottom: 1.5rem;
67
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
68
  </style>
69
  """, unsafe_allow_html=True)
70
 
 
36
  --border-color: #30363d;
37
  }
38
 
39
+ /* Main background */
40
+ html, body {
41
+ background-color: var(--bg-darker) !important;
42
+ color: var(--text-primary) !important;
43
+ }
44
+
45
+ /* Streamlit containers */
46
+ .main, [data-testid="stAppViewContainer"] {
47
+ background-color: var(--bg-dark) !important;
48
+ }
49
+
50
+ [data-testid="stSidebar"] {
51
+ background-color: #0d1117 !important;
52
+ border-right: 1px solid var(--border-color);
53
+ }
54
+
55
+ /* Text colors */
56
+ p, span, div, h1, h2, h3, h4, h5, h6 {
57
+ color: var(--text-primary) !important;
58
+ }
59
+
60
+ /* Metric card styling */
61
+ [data-testid="metric-container"] {
62
+ background: linear-gradient(135deg, #1f2937 0%, #111827 100%) !important;
63
+ border: 1px solid var(--border-color) !important;
64
+ border-radius: 10px !important;
65
+ padding: 1.5rem !important;
66
+ box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3) !important;
67
+ }
68
+
69
  .metric-card {
70
  background: linear-gradient(135deg, #1f2937 0%, #111827 100%);
71
  padding: 1.5rem;
 
95
  margin-top: 2rem;
96
  margin-bottom: 1.5rem;
97
  }
98
+
99
+ /* Button styling */
100
+ [data-testid="baseButton-primary"] {
101
+ background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%) !important;
102
+ color: #fff !important;
103
+ border: none !important;
104
+ border-radius: 8px !important;
105
+ padding: 0.5rem 1.5rem !important;
106
+ font-weight: 600 !important;
107
+ transition: all 0.3s ease !important;
108
+ }
109
+
110
+ [data-testid="baseButton-primary"]:hover {
111
+ box-shadow: 0 0 20px rgba(0, 102, 255, 0.4) !important;
112
+ transform: translateY(-2px) !important;
113
+ }
114
+
115
+ /* Input fields */
116
+ [data-testid="stTextInput"] input,
117
+ [data-testid="stSlider"] input {
118
+ background-color: #161b22 !important;
119
+ border: 1px solid var(--border-color) !important;
120
+ color: var(--text-primary) !important;
121
+ border-radius: 6px !important;
122
+ }
123
+
124
+ [data-testid="stTextInput"] input::placeholder {
125
+ color: var(--text-secondary) !important;
126
+ }
127
+
128
+ /* Slider */
129
+ [data-testid="stSlider"] {
130
+ color: var(--primary-color) !important;
131
+ }
132
+
133
+ /* Tabs */
134
+ [data-testid="stTabs"] [role="tablist"] {
135
+ background-color: transparent !important;
136
+ border-bottom: 2px solid var(--border-color) !important;
137
+ }
138
+
139
+ [data-testid="stTabs"] [role="tab"] {
140
+ color: var(--text-secondary) !important;
141
+ background-color: transparent !important;
142
+ border: none !important;
143
+ padding: 1rem 1.5rem !important;
144
+ }
145
+
146
+ [data-testid="stTabs"] [role="tab"][aria-selected="true"] {
147
+ color: var(--primary-color) !important;
148
+ border-bottom: 3px solid var(--primary-color) !important;
149
+ }
150
+
151
+ /* Dataframe */
152
+ [data-testid="dataframe"] {
153
+ background-color: #0d1117 !important;
154
+ }
155
+
156
+ .dataframe {
157
+ background-color: #0d1117 !important;
158
+ color: var(--text-primary) !important;
159
+ }
160
+
161
+ /* Info/Error boxes */
162
+ [data-testid="stInfo"],
163
+ [data-testid="stSuccess"],
164
+ [data-testid="stWarning"],
165
+ [data-testid="stError"] {
166
+ background-color: rgba(0, 102, 255, 0.1) !important;
167
+ border-left: 4px solid var(--primary-color) !important;
168
+ border-radius: 6px !important;
169
+ }
170
+
171
+ [data-testid="stError"] {
172
+ background-color: rgba(255, 56, 56, 0.1) !important;
173
+ border-left-color: var(--danger-color) !important;
174
+ }
175
+
176
+ /* Markdown */
177
+ [data-testid="stMarkdown"] {
178
+ color: var(--text-primary) !important;
179
+ }
180
+
181
+ /* Expander */
182
+ [data-testid="stExpander"] {
183
+ background-color: #161b22 !important;
184
+ border: 1px solid var(--border-color) !important;
185
+ border-radius: 6px !important;
186
+ }
187
+
188
+ /* Scrollbar */
189
+ ::-webkit-scrollbar {
190
+ width: 8px;
191
+ height: 8px;
192
+ }
193
+
194
+ ::-webkit-scrollbar-track {
195
+ background: #0d1117;
196
+ }
197
+
198
+ ::-webkit-scrollbar-thumb {
199
+ background: var(--border-color);
200
+ border-radius: 4px;
201
+ }
202
+
203
+ ::-webkit-scrollbar-thumb:hover {
204
+ background: var(--primary-color);
205
+ }
206
  </style>
207
  """, unsafe_allow_html=True)
208