Skip to content

Commit a814dea

Browse files
committed
refactor: wiki contributor "levels"
1 parent 46fa202 commit a814dea

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

src/pages/wiki/index.astro

+9-4
Original file line numberDiff line numberDiff line change
@@ -36,11 +36,13 @@ type Contributor = {
3636
};
3737
3838
const getContributorLevel = (contributions: number) => {
39-
if (contributions > 100) {
39+
if (contributions >= 100) {
40+
return "champion";
41+
} else if (contributions >= 50) {
4042
return "diamond";
41-
} else if (contributions > 50) {
43+
} else if (contributions >= 25) {
4244
return "gold";
43-
} else if (contributions > 25) {
45+
} else if (contributions >= 10) {
4446
return "silver";
4547
}
4648
@@ -292,12 +294,15 @@ if (!contributors) {
292294
img {
293295
border-style: solid;
294296
box-sizing: border-box;
295-
box-shadow: var(--tier-color) 0px 0px 10px 2px;
297+
box-shadow: var(--tier-color) 0px 0px 10px 3px;
296298
border-width: 0.2em;
297299
border-color: var(--tier-color);
298300
position: relative;
299301
}
300302

303+
&.champion {
304+
--tier-color: #ff2626;
305+
}
301306
&.diamond {
302307
--tier-color: #00f7ff;
303308
}

0 commit comments

Comments
 (0)