Jerrycool commited on
Commit
38d4e2a
·
verified ·
1 Parent(s): 96a6e4d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +29 -17
app.py CHANGED
@@ -65,7 +65,7 @@ def update_leaderboard(category):
65
 
66
  # --- Dark Mode Styling ---
67
  font_size_css = """
68
- body { font-size: 1em !important; }
69
  """
70
  custom_css += font_size_css
71
 
@@ -90,7 +90,7 @@ body {
90
  }
91
  .hero-section h1 {
92
  margin: 0;
93
- font-size: 2.5rem !important;
94
  font-weight: 700 !important;
95
  display: flex;
96
  align-items: center;
@@ -102,7 +102,7 @@ body {
102
  }
103
  .hero-section h2 {
104
  margin: .5rem 0 0 !important;
105
- font-size: 1.25rem !important;
106
  font-weight: 400 !important;
107
  opacity: 0.8;
108
  }
@@ -117,7 +117,7 @@ body {
117
  border: none !important;
118
  transition: all 0.3s ease !important;
119
  font-weight: 600 !important;
120
- font-size: 1.05rem !important;
121
  letter-spacing: 0.02em !important;
122
  box-shadow: 0 2px 4px rgba(0,0,0,0.2) !important;
123
  }
@@ -139,21 +139,23 @@ body {
139
  gap: 0.75rem;
140
  }
141
  #category-selector .label-wrap {
142
- font-size: 1.15rem !important;
143
  font-weight: 600 !important;
144
  color: #e0e0e0 !important;
145
  letter-spacing: 0.02em !important;
146
- margin-bottom: 0.25rem !important;
147
  }
148
  #category-selector input[type="radio"] { display: none; }
149
  #category-selector .options {
150
  display: flex;
 
151
  flex-wrap: wrap;
152
  gap: 0.75rem;
 
153
  }
154
  #category-selector label {
155
  display: inline-block;
156
- padding: 0.65rem 1.25rem;
157
  border-radius: 999px;
158
  background: #1e1e1e;
159
  cursor: pointer;
@@ -161,8 +163,11 @@ body {
161
  font-weight: 500;
162
  color: #e0e0e0;
163
  letter-spacing: 0.02em;
164
- font-size: 1.05rem;
165
  box-shadow: 0 2px 4px rgba(0,0,0,0.15);
 
 
 
166
  }
167
  #category-selector label:hover {
168
  background: #2a2a2a;
@@ -192,10 +197,10 @@ body {
192
  background: linear-gradient(to bottom, #333, #2c2c2c);
193
  color: #fff;
194
  font-weight: 600;
195
- font-size: 1.1rem;
196
  text-align: left;
197
  letter-spacing: 0.02em;
198
- padding: 1rem 1.25rem;
199
  position: sticky;
200
  top: 0;
201
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
@@ -212,9 +217,9 @@ body {
212
  transition: background-color 0.2s ease;
213
  }
214
  .dataframe-container table td {
215
- padding: 0.9rem 1.25rem;
216
  color: #e0e0e0;
217
- font-size: 1.05rem;
218
  letter-spacing: 0.01em;
219
  border-bottom: 1px solid #333;
220
  }
@@ -239,25 +244,27 @@ body {
239
  .dataframe-container table th:last-child {
240
  text-align: center;
241
  font-weight: 600;
 
 
242
  }
243
 
244
  /* Enable scrollbar */
245
  #leaderboard-table .dataframe-container {
246
- max-height: 500px !important;
247
  overflow-y: auto !important;
248
  }
249
 
250
  /* Custom Scrollbar for WebKit browsers */
251
  .dataframe-container::-webkit-scrollbar {
252
- width: 8px;
253
  }
254
  .dataframe-container::-webkit-scrollbar-track {
255
  background: #1a1a1a;
256
- border-radius: 4px;
257
  }
258
  .dataframe-container::-webkit-scrollbar-thumb {
259
  background: #444;
260
- border-radius: 4px;
261
  }
262
  .dataframe-container::-webkit-scrollbar-thumb:hover {
263
  background: #555;
@@ -266,7 +273,7 @@ body {
266
  /* Markdown text styling */
267
  .markdown-text {
268
  line-height: 1.6;
269
- font-size: 1.05rem;
270
  color: #d0d0d0;
271
  }
272
  .markdown-text h1, .markdown-text h2, .markdown-text h3 {
@@ -275,6 +282,11 @@ body {
275
  margin-top: 1.5rem;
276
  margin-bottom: 1rem;
277
  }
 
 
 
 
 
278
  .markdown-text p {
279
  margin-bottom: 1rem;
280
  }
 
65
 
66
  # --- Dark Mode Styling ---
67
  font_size_css = """
68
+ body { font-size: 1.1em !important; }
69
  """
70
  custom_css += font_size_css
71
 
 
90
  }
91
  .hero-section h1 {
92
  margin: 0;
93
+ font-size: 2.8rem !important;
94
  font-weight: 700 !important;
95
  display: flex;
96
  align-items: center;
 
102
  }
103
  .hero-section h2 {
104
  margin: .5rem 0 0 !important;
105
+ font-size: 1.4rem !important;
106
  font-weight: 400 !important;
107
  opacity: 0.8;
108
  }
 
117
  border: none !important;
118
  transition: all 0.3s ease !important;
119
  font-weight: 600 !important;
120
+ font-size: 1.2rem !important;
121
  letter-spacing: 0.02em !important;
122
  box-shadow: 0 2px 4px rgba(0,0,0,0.2) !important;
123
  }
 
139
  gap: 0.75rem;
140
  }
141
  #category-selector .label-wrap {
142
+ font-size: 1.4rem !important;
143
  font-weight: 600 !important;
144
  color: #e0e0e0 !important;
145
  letter-spacing: 0.02em !important;
146
+ margin-bottom: 0.5rem !important;
147
  }
148
  #category-selector input[type="radio"] { display: none; }
149
  #category-selector .options {
150
  display: flex;
151
+ flex-direction: row !important;
152
  flex-wrap: wrap;
153
  gap: 0.75rem;
154
+ justify-content: space-between;
155
  }
156
  #category-selector label {
157
  display: inline-block;
158
+ padding: 0.75rem 1.5rem;
159
  border-radius: 999px;
160
  background: #1e1e1e;
161
  cursor: pointer;
 
163
  font-weight: 500;
164
  color: #e0e0e0;
165
  letter-spacing: 0.02em;
166
+ font-size: 1.15rem;
167
  box-shadow: 0 2px 4px rgba(0,0,0,0.15);
168
+ text-align: center;
169
+ width: 18%;
170
+ margin: 0 !important;
171
  }
172
  #category-selector label:hover {
173
  background: #2a2a2a;
 
197
  background: linear-gradient(to bottom, #333, #2c2c2c);
198
  color: #fff;
199
  font-weight: 600;
200
+ font-size: 1.25rem;
201
  text-align: left;
202
  letter-spacing: 0.02em;
203
+ padding: 1.2rem 1.5rem;
204
  position: sticky;
205
  top: 0;
206
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
 
217
  transition: background-color 0.2s ease;
218
  }
219
  .dataframe-container table td {
220
+ padding: 1.1rem 1.5rem;
221
  color: #e0e0e0;
222
+ font-size: 1.2rem;
223
  letter-spacing: 0.01em;
224
  border-bottom: 1px solid #333;
225
  }
 
244
  .dataframe-container table th:last-child {
245
  text-align: center;
246
  font-weight: 600;
247
+ font-size: 1.3rem;
248
+ color: #ffcc00;
249
  }
250
 
251
  /* Enable scrollbar */
252
  #leaderboard-table .dataframe-container {
253
+ max-height: 550px !important;
254
  overflow-y: auto !important;
255
  }
256
 
257
  /* Custom Scrollbar for WebKit browsers */
258
  .dataframe-container::-webkit-scrollbar {
259
+ width: 10px;
260
  }
261
  .dataframe-container::-webkit-scrollbar-track {
262
  background: #1a1a1a;
263
+ border-radius: 5px;
264
  }
265
  .dataframe-container::-webkit-scrollbar-thumb {
266
  background: #444;
267
+ border-radius: 5px;
268
  }
269
  .dataframe-container::-webkit-scrollbar-thumb:hover {
270
  background: #555;
 
273
  /* Markdown text styling */
274
  .markdown-text {
275
  line-height: 1.6;
276
+ font-size: 1.2rem;
277
  color: #d0d0d0;
278
  }
279
  .markdown-text h1, .markdown-text h2, .markdown-text h3 {
 
282
  margin-top: 1.5rem;
283
  margin-bottom: 1rem;
284
  }
285
+ .markdown-text h2 {
286
+ font-size: 1.8rem !important;
287
+ border-bottom: 1px solid #333;
288
+ padding-bottom: 0.5rem;
289
+ }
290
  .markdown-text p {
291
  margin-bottom: 1rem;
292
  }