-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstyles.py
More file actions
200 lines (172 loc) · 5.04 KB
/
styles.py
File metadata and controls
200 lines (172 loc) · 5.04 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
def apply_custom_styles():
"""Apply custom CSS styles to the application."""
return """
<style>
/* Base styles */
.main .block-container {
padding: 2rem;
max-width: 100%;
}
/* Interactive Cards */
.stMarkdown div[data-testid="stMarkdownContainer"] {
background: white;
border-radius: 8px;
padding: 1.5rem;
margin-bottom: 1rem;
box-shadow: 0 1px 3px rgba(0,0,0,0.1);
transition: transform 0.2s, box-shadow 0.2s;
}
.stMarkdown div[data-testid="stMarkdownContainer"]:hover {
transform: translateY(-2px);
box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}
/* Tabs styling */
.stTabs [data-baseweb="tab-list"] {
gap: 8px;
background-color: transparent;
}
.stTabs [data-baseweb="tab"] {
padding: 8px 16px;
border-radius: 4px;
border: none;
font-weight: 500;
background-color: #f8f9fa;
transition: background-color 0.2s;
}
.stTabs [data-baseweb="tab"]:hover {
background-color: #e9ecef;
}
.stTabs [data-baseweb="tab"][aria-selected="true"] {
background-color: #1f77b4;
color: white;
}
/* Metric cards */
[data-testid="metric-container"] {
background-color: white;
border-radius: 8px;
padding: 1rem;
box-shadow: 0 1px 3px rgba(0,0,0,0.1);
transition: transform 0.2s;
}
[data-testid="metric-container"]:hover {
transform: translateY(-2px);
}
/* Headers */
h1, h2, h3, h4, h5, h6 {
color: #2c3e50;
margin-bottom: 1rem;
}
/* Status indicators */
.status-indicator {
display: inline-flex;
align-items: center;
padding: 4px 12px;
border-radius: 16px;
font-size: 0.875rem;
font-weight: 500;
margin-bottom: 8px;
}
.status-available {
background-color: #d4edda;
color: #155724;
}
.status-unavailable {
background-color: #f8d7da;
color: #721c24;
}
/* Interactive buttons */
.stButton button {
border-radius: 4px;
padding: 0.5rem 1rem;
font-weight: 500;
transition: all 0.2s;
}
.stButton button:hover {
transform: translateY(-1px);
box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
/* Data table styling */
.dataframe {
border-radius: 8px;
overflow: hidden;
box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}
.dataframe th {
background-color: #f8f9fa;
padding: 12px 16px;
font-weight: 600;
}
.dataframe td {
padding: 12px 16px;
border-top: 1px solid #e9ecef;
}
/* Chart container */
.chart-container {
background: white;
border-radius: 8px;
padding: 1rem;
box-shadow: 0 1px 3px rgba(0,0,0,0.1);
margin: 1rem 0;
}
/* Model filters container */
.model-filters-box {
background-color: white;
border: 1px solid #e5e7eb;
border-radius: 8px;
padding: 1rem;
margin-top: 0.5rem;
}
/* Model filter row */
.model-filter-row {
display: flex;
align-items: center;
gap: 0.75rem;
padding: 0.5rem;
cursor: pointer;
user-select: none;
}
/* Hide default checkbox */
.model-filter-row input[type="checkbox"] {
position: absolute;
opacity: 0;
cursor: pointer;
height: 0;
width: 0;
}
/* Style model circles */
.model-circle {
width: 12px;
height: 12px;
border-radius: 50%;
opacity: 0.3;
transition: opacity 0.2s ease;
}
/* Style circle when checkbox is checked */
.model-filter-row input:checked ~ .model-circle {
opacity: 1;
}
/* Model name text */
.model-name {
font-size: 0.875rem;
font-weight: 500;
color: #4b5563;
}
/* Style the Model Types header */
h3 {
font-size: 1rem !important;
font-weight: 600 !important;
margin-bottom: 0.5rem !important;
color: #374151 !important;
}
/* Hide sidebar by default */
[data-testid="stSidebar"] {
display: none;
}
/* Responsive adjustments */
@media (max-width: 768px) {
.main .block-container {
padding: 1rem;
}
}
</style>
"""