Skip to content

Commit 66c13cc

Browse files
author
iitzIrFan
committed
Enhance leaderboard styling with new title filter and time filter components
1 parent 80e16f7 commit 66c13cc

File tree

1 file changed

+99
-11
lines changed

1 file changed

+99
-11
lines changed

src/components/dashboard/LeaderBoard/leaderboard.css

Lines changed: 99 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -54,10 +54,19 @@
5454
margin-bottom: 40px;
5555
}
5656

57+
.title-filter-container {
58+
display: flex;
59+
align-items: center;
60+
justify-content: center;
61+
flex-wrap: wrap;
62+
gap: 16px;
63+
margin-bottom: 24px;
64+
}
65+
5766
.top-performers-title {
5867
font-size: 24px;
5968
font-weight: 700;
60-
margin-bottom: 24px;
69+
margin: 0;
6170
}
6271

6372
.light .top-performers-title {
@@ -68,6 +77,27 @@
6877
color: #f1f1f1;
6978
}
7079

80+
.top-title-filter {
81+
display: flex;
82+
align-items: center;
83+
gap: 8px;
84+
min-width: 240px;
85+
}
86+
87+
.filter-label {
88+
font-size: 14px;
89+
font-weight: 600;
90+
white-space: nowrap;
91+
}
92+
93+
.light .filter-label {
94+
color: #4b5563;
95+
}
96+
97+
.dark .filter-label {
98+
color: #d1d5db;
99+
}
100+
71101
.top-performers-grid {
72102
display: grid;
73103
grid-template-columns: 1fr 1fr 1fr;
@@ -307,29 +337,87 @@
307337
border: 1px solid #444;
308338
}
309339

340+
.time-filter-wrapper {
341+
position: relative;
342+
min-width: 180px;
343+
}
344+
345+
@keyframes select-pulse {
346+
0% { border-color: #6366f1; box-shadow: 0 0 0 0 rgba(99, 102, 241, 0.4); }
347+
70% { border-color: #6366f1; box-shadow: 0 0 0 6px rgba(99, 102, 241, 0); }
348+
100% { border-color: inherit; }
349+
}
350+
351+
.time-filter-select.highlight-change {
352+
animation: select-pulse 1.2s ease-out;
353+
}
354+
355+
.time-filter-wrapper::after {
356+
content: '';
357+
position: absolute;
358+
right: 15px;
359+
top: 50%;
360+
transform: translateY(-50%);
361+
width: 0;
362+
height: 0;
363+
border-left: 6px solid transparent;
364+
border-right: 6px solid transparent;
365+
border-top: 6px solid #6366f1;
366+
pointer-events: none;
367+
transition: transform 0.2s ease;
368+
}
369+
370+
.time-filter-wrapper:hover::after {
371+
transform: translateY(-50%) translateY(2px);
372+
}
373+
310374
.time-filter-select {
311375
width: 100%;
312-
padding: 12px;
313-
border-radius: 8px;
314-
font-size: 16px;
376+
padding: 12px 40px 12px 18px;
377+
border-radius: 12px;
378+
font-size: 15px;
379+
font-weight: 600;
380+
letter-spacing: 0.3px;
315381
appearance: none;
316-
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
317-
background-repeat: no-repeat;
318-
background-position: right 12px center;
319-
background-size: 16px;
382+
background: linear-gradient(to bottom, rgba(255,255,255,0.05) 0%, rgba(0,0,0,0.05) 100%);
320383
cursor: pointer;
384+
transition: all 0.25s ease;
385+
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
386+
border: 2px solid transparent;
387+
}
388+
389+
.time-filter-select:hover {
390+
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
391+
transform: translateY(-2px);
392+
background-position: right 15px center;
393+
}
394+
395+
.time-filter-select:focus {
396+
outline: none;
397+
border-color: #6366f1;
398+
box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.25);
321399
}
322400

323401
.light .time-filter-select {
324402
background-color: #fff;
325-
border: 1px solid #e2e8f0;
326403
color: #333;
404+
border: 2px solid #e5e7eb;
405+
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
406+
}
407+
408+
.light .time-filter-wrapper::after {
409+
border-top-color: #6366f1;
327410
}
328411

329412
.dark .time-filter-select {
330-
background-color: #2b303b;
331-
border: 1px solid #444;
413+
background-color: #2d3748;
332414
color: #f1f1f1;
415+
border: 2px solid #4b5563;
416+
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
417+
}
418+
419+
.dark .time-filter-wrapper::after {
420+
border-top-color: #8b5cf6;
333421
}
334422

335423
/* Contributors List */

0 commit comments

Comments
 (0)