forked from HKUDS/DeepCode
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstyles.py
More file actions
356 lines (319 loc) · 11.3 KB
/
styles.py
File metadata and controls
356 lines (319 loc) · 11.3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
"""
DeepCode UI Styles - Cyber/AI Tech Theme
Modernized with Glassmorphism, Neon Accents, and Fluid Typography.
"""
def get_main_styles() -> str:
return """
<style>
/* ------------------- IMPORT FONTS ------------------- */
@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;500;700;900&family=JetBrains+Mono:wght@300;400;600&family=Inter:wght@300;400;600;800&display=swap');
/* ------------------- VARS (CYBER THEME) ------------------- */
:root {
/* Colors */
--bg-dark: #050505;
--bg-card: rgba(20, 20, 25, 0.6);
--bg-card-hover: rgba(30, 30, 40, 0.8);
--primary: #00f2ff; /* Cyan Neon */
--secondary: #7000ff; /* Electric Purple */
--accent: #ff0055; /* Cyber Pink */
--success: #00ff9d;
--warning: #ffb800;
--error: #ff2a6d;
--text-main: #ffffff;
--text-muted: rgba(255, 255, 255, 0.6);
/* Glassmorphism */
--glass-border: 1px solid rgba(255, 255, 255, 0.08);
--glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
--neon-shadow: 0 0 10px rgba(0, 242, 255, 0.3), 0 0 20px rgba(0, 242, 255, 0.2);
/* Typography */
--font-display: 'Orbitron', sans-serif;
--font-body: 'Inter', sans-serif;
--font-code: 'JetBrains Mono', monospace;
}
/* ------------------- GLOBAL RESET & ANIMATIONS ------------------- */
.stApp {
background-color: var(--bg-dark);
background-image:
radial-gradient(circle at 15% 50%, rgba(112, 0, 255, 0.08) 0%, transparent 25%),
radial-gradient(circle at 85% 30%, rgba(0, 242, 255, 0.08) 0%, transparent 25%);
font-family: var(--font-body);
color: var(--text-main);
}
h1, h2, h3, h4, h5, h6 {
font-family: var(--font-display) !important;
letter-spacing: 1px;
}
@keyframes pulse-glow {
0% { box-shadow: 0 0 0 0 rgba(0, 242, 255, 0.4); }
70% { box-shadow: 0 0 0 10px rgba(0, 242, 255, 0); }
100% { box-shadow: 0 0 0 0 rgba(0, 242, 255, 0); }
}
/* ------------------- CUSTOM COMPONENTS ------------------- */
/* Header Design */
.cyber-header {
display: flex;
align-items: center;
justify-content: space-between;
padding: 2rem 0;
border-bottom: 1px solid rgba(255,255,255,0.1);
margin-bottom: 2rem;
background: linear-gradient(90deg, rgba(0,0,0,0) 0%, rgba(0, 242, 255, 0.05) 50%, rgba(0,0,0,0) 100%);
}
.brand-container {
display: flex;
flex-direction: column;
}
.brand-title {
font-family: var(--font-display);
font-size: 3.5rem;
font-weight: 900;
background: linear-gradient(90deg, #fff, var(--primary));
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
letter-spacing: -2px;
text-shadow: 0 0 30px rgba(0, 242, 255, 0.2);
}
.brand-subtitle {
font-family: var(--font-code);
color: var(--text-muted);
font-size: 0.9rem;
letter-spacing: 3px;
text-transform: uppercase;
margin-top: 5px;
}
.status-indicator {
display: flex;
align-items: center;
gap: 0.8rem;
padding: 0.6rem 1.2rem;
background: rgba(0, 255, 157, 0.05);
border: 1px solid rgba(0, 255, 157, 0.2);
border-radius: 4px;
color: var(--success);
font-family: var(--font-code);
font-size: 0.8rem;
text-transform: uppercase;
letter-spacing: 1px;
}
.status-dot {
width: 8px;
height: 8px;
background: var(--success);
border-radius: 50%;
box-shadow: 0 0 10px var(--success);
animation: pulse-glow 2s infinite;
}
/* Feature Cards */
.feature-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
gap: 1.5rem;
margin-bottom: 3rem;
}
.cyber-card {
background: var(--bg-card);
backdrop-filter: blur(12px);
border: var(--glass-border);
padding: 2rem;
border-radius: 2px; /* More angular for tech feel */
transition: all 0.3s ease;
position: relative;
overflow: hidden;
height: 100%;
}
.cyber-card::before {
content: '';
position: absolute;
top: 0;
left: 0;
width: 3px;
height: 0%;
background: var(--primary);
transition: height 0.3s ease;
}
.cyber-card:hover::before {
height: 100%;
}
.cyber-card:hover {
transform: translateY(-5px);
background: var(--bg-card-hover);
box-shadow: var(--neon-shadow);
border-color: rgba(0, 242, 255, 0.4);
}
.card-icon {
font-size: 2rem;
margin-bottom: 1.5rem;
color: var(--primary);
filter: drop-shadow(0 0 10px rgba(0, 242, 255, 0.5));
}
.card-title {
font-family: var(--font-display);
font-weight: 700;
font-size: 1.2rem;
margin-bottom: 0.8rem;
color: white;
}
.card-desc {
font-family: var(--font-body);
font-size: 0.95rem;
color: var(--text-muted);
line-height: 1.6;
}
/* ------------------- STREAMLIT OVERRIDES ------------------- */
/* Sidebar */
[data-testid="stSidebar"] {
background-color: #020203;
border-right: 1px solid rgba(255,255,255,0.05);
}
[data-testid="stSidebar"] h1, [data-testid="stSidebar"] h2, [data-testid="stSidebar"] h3 {
color: var(--primary) !important;
}
/* Inputs (Text, Select, Area) */
.stTextInput > div > div > input,
.stSelectbox > div > div > div,
.stTextArea > div > div > textarea {
background-color: rgba(255,255,255,0.03);
border: 1px solid rgba(255,255,255,0.1);
color: white;
border-radius: 4px;
font-family: var(--font-code);
}
.stTextInput > div > div > input:focus,
.stTextArea > div > div > textarea:focus {
border-color: var(--primary);
box-shadow: 0 0 15px rgba(0, 242, 255, 0.1);
background-color: rgba(0,0,0,0.3);
}
/* Tabs */
.stTabs [data-baseweb="tab-list"] {
gap: 20px;
border-bottom: 1px solid rgba(255,255,255,0.1);
}
.stTabs [data-baseweb="tab"] {
background-color: transparent;
border-radius: 4px 4px 0 0;
color: var(--text-muted);
font-family: var(--font-display);
padding: 10px 20px;
}
.stTabs [aria-selected="true"] {
background-color: rgba(0, 242, 255, 0.1);
color: var(--primary);
border-bottom: 2px solid var(--primary);
}
/* Buttons */
.stButton > button {
background: transparent;
border: 1px solid var(--primary);
border-radius: 4px;
color: var(--primary);
font-family: var(--font-display);
font-weight: 600;
letter-spacing: 2px;
transition: all 0.3s;
text-transform: uppercase;
padding: 0.5rem 2rem;
box-shadow: 0 0 10px rgba(0, 242, 255, 0.1);
}
.stButton > button:hover {
background: var(--primary);
color: #000;
box-shadow: 0 0 25px rgba(0, 242, 255, 0.6);
transform: translateY(-2px);
}
/* Primary Action Button Override */
button[kind="primary"] {
background: linear-gradient(90deg, var(--secondary) 0%, var(--primary) 100%);
border: none;
color: white !important;
}
/* Expanders */
.streamlit-expanderHeader {
background-color: rgba(255,255,255,0.02);
border-radius: 4px;
border: 1px solid rgba(255,255,255,0.05);
}
/* Code Blocks */
code {
font-family: var(--font-code) !important;
color: var(--primary) !important;
background-color: rgba(0,0,0,0.3) !important;
}
/* Sidebar feed */
.sidebar-feed-card {
border: 1px solid rgba(255,255,255,0.08);
border-left: 3px solid var(--primary);
padding: 0.75rem;
border-radius: 4px;
margin-bottom: 0.75rem;
background: rgba(255,255,255,0.02);
box-shadow: 0 4px 12px rgba(0,0,0,0.25);
}
.sidebar-feed-card .stage-line {
display: flex;
justify-content: space-between;
font-family: var(--font-display);
font-size: 0.8rem;
letter-spacing: 1px;
margin-bottom: 0.35rem;
}
.sidebar-feed-card .stage {
color: var(--primary);
}
.sidebar-feed-card .time {
color: rgba(255,255,255,0.4);
font-family: var(--font-code);
}
.sidebar-feed-card .message {
font-size: 0.9rem;
color: rgba(255,255,255,0.85);
line-height: 1.4;
}
.sidebar-feed-card.level-success {
border-left-color: var(--success);
}
.sidebar-feed-card.level-error {
border-left-color: var(--error);
}
.sidebar-feed-card.level-warning {
border-left-color: var(--warning);
}
.system-monitor-card {
border: 1px solid rgba(255,255,255,0.08);
border-radius: 6px;
padding: 1rem;
background: rgba(0,0,0,0.25);
margin-bottom: 1.5rem;
box-shadow: 0 6px 18px rgba(0,0,0,0.35);
}
.system-monitor-card .status-grid {
display: grid;
grid-template-columns: repeat(2, minmax(0, 1fr));
gap: 0.75rem;
}
.system-monitor-card .status-chip {
border: 1px solid rgba(255,255,255,0.08);
border-radius: 4px;
padding: 0.5rem 0.75rem;
font-size: 0.8rem;
letter-spacing: 1px;
text-transform: uppercase;
display: flex;
justify-content: space-between;
}
.system-monitor-card .status-chip span:last-child {
color: var(--primary);
font-family: var(--font-display);
}
.system-monitor-card .latest-stage {
margin-top: 1rem;
font-size: 0.85rem;
color: rgba(255,255,255,0.7);
}
.system-monitor-card .latest-stage strong {
color: var(--text-primary);
}
/* Footer area override */
footer {visibility: hidden;}
</style>
"""