From e3bc8146bc9f9d4b8a90bca2d3d9a455a3438278 Mon Sep 17 00:00:00 2001
From: carsakiller
Date: Thu, 28 Dec 2023 02:33:57 -0500
Subject: [PATCH] fix: wiki contributor list
- Filter out dependabot
- Clean up styles a little
- Fix name overflowing
---
src/pages/wiki/index.astro | 66 ++++++++++++++++++++++----------------
1 file changed, 39 insertions(+), 27 deletions(-)
diff --git a/src/pages/wiki/index.astro b/src/pages/wiki/index.astro
index 3e64205..d686dff 100644
--- a/src/pages/wiki/index.astro
+++ b/src/pages/wiki/index.astro
@@ -36,6 +36,10 @@ const getContributorLevel = (contributions: number) => {
return "bronze";
};
+const filteredContributors = [
+ 49699333, // Dependabot
+];
+
const headers: HeadersInit = {};
if (import.meta.env.GITHUB_TOKEN) {
headers.Authorization = import.meta.env.GITHUB_TOKEN;
@@ -99,25 +103,31 @@ if (!contributors) {
{
- contributors.map((user) => (
-
-
-
-
-
!filteredContributors.includes(user.id))
+ .map((user) => (
+
- {user.login}
-
-
- ))
+
+
+
+
+ {user.login}
+
+
+ ))
}
@@ -200,10 +210,8 @@ if (!contributors) {
}
div.contributor {
- width: 100%;
height: auto;
- position: relative;
- width: 5em;
+ width: 5.5em;
a,
img {
@@ -211,7 +219,6 @@ if (!contributors) {
aspect-ratio: 1;
width: 100%;
border-radius: 99em;
- border-width: 0.2em;
&:focus {
outline: var(--tier-color) solid 0.3em;
}
@@ -220,6 +227,7 @@ if (!contributors) {
border-style: solid;
box-sizing: border-box;
box-shadow: var(--tier-color) 0px 0px 10px 2px;
+ border-width: 0.2em;
border-color: var(--tier-color);
position: relative;
}
@@ -237,14 +245,18 @@ if (!contributors) {
--tier-color: #b46300;
}
- span.username {
+ :global(span.username.tooltip) {
+ margin-top: 0.2em;
font-size: 0.9em;
color: white;
display: block;
- text-align: center;
- width: 100%;
- text-overflow: ellipsis;
- overflow: hidden;
+
+ & > div {
+ font-weight: 300;
+ text-align: center;
+ text-overflow: ellipsis;
+ overflow: hidden;
+ }
}
}
}