From a814dea10eda070e236b84d9e8285cdda25a1a58 Mon Sep 17 00:00:00 2001 From: carsakiller Date: Fri, 28 Jun 2024 02:50:33 +0000 Subject: [PATCH] refactor: wiki contributor "levels" --- src/pages/wiki/index.astro | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/src/pages/wiki/index.astro b/src/pages/wiki/index.astro index 93c960f..88925e2 100644 --- a/src/pages/wiki/index.astro +++ b/src/pages/wiki/index.astro @@ -36,11 +36,13 @@ type Contributor = { }; const getContributorLevel = (contributions: number) => { - if (contributions > 100) { + if (contributions >= 100) { + return "champion"; + } else if (contributions >= 50) { return "diamond"; - } else if (contributions > 50) { + } else if (contributions >= 25) { return "gold"; - } else if (contributions > 25) { + } else if (contributions >= 10) { return "silver"; } @@ -292,12 +294,15 @@ if (!contributors) { img { border-style: solid; box-sizing: border-box; - box-shadow: var(--tier-color) 0px 0px 10px 2px; + box-shadow: var(--tier-color) 0px 0px 10px 3px; border-width: 0.2em; border-color: var(--tier-color); position: relative; } + &.champion { + --tier-color: #ff2626; + } &.diamond { --tier-color: #00f7ff; }