From 76b5c38eb623714603ea5239c8abeb6de019e90f Mon Sep 17 00:00:00 2001 From: Mathias Schopmans Date: Thu, 14 Mar 2024 10:08:43 +0100 Subject: [PATCH] feat: add social icon GitLab closes #437 --- README.md | 8 ++++---- src/components/SocialLinks/SocialLinks.module.css | 1 + src/components/SocialLinks/SocialLinks.tsx | 14 +++++++++++--- src/icons/social-gitlab.svg | 7 +++++++ 4 files changed, 23 insertions(+), 7 deletions(-) create mode 100644 src/icons/social-gitlab.svg diff --git a/README.md b/README.md index d46c024..a5d44d3 100644 --- a/README.md +++ b/README.md @@ -122,10 +122,10 @@ Open the `config.json` file and configure the radar to your needs. #### `config.social.[]` -| Attribute | Description | -| --------- | ---------------------------------------------------------------------------- | -| href | URL to the website | -| icon | One of `facebook`, `github`, `instagram`, `linkedin`, `x`, `xing`, `youtube` | +| Attribute | Description | +| --------- | -------------------------------------------------------------------------------------- | +| href | URL to the website | +| icon | One of `facebook`, `github`, `gitlab`, `instagram`, `linkedin`, `x`, `xing`, `youtube` | ### Step 4: Add a help page with explanations diff --git a/src/components/SocialLinks/SocialLinks.module.css b/src/components/SocialLinks/SocialLinks.module.css index 2e8f6f0..4609d19 100644 --- a/src/components/SocialLinks/SocialLinks.module.css +++ b/src/components/SocialLinks/SocialLinks.module.css @@ -14,6 +14,7 @@ } .link { + display: block; border: 1px solid var(--border); background: var(--foreground); padding: 6px; diff --git a/src/components/SocialLinks/SocialLinks.tsx b/src/components/SocialLinks/SocialLinks.tsx index 8d7ec1f..11a2c40 100644 --- a/src/components/SocialLinks/SocialLinks.tsx +++ b/src/components/SocialLinks/SocialLinks.tsx @@ -3,6 +3,7 @@ import styles from "./SocialLinks.module.css"; import { SocialFacebook, SocialGithub, + SocialGitlab, SocialInstagram, SocialLinkedin, SocialX, @@ -22,6 +23,8 @@ function getIcon(name: string) { return SocialFacebook; case "github": return SocialGithub; + case "gitlab": + return SocialGitlab; case "instagram": return SocialInstagram; case "linkedin": @@ -45,9 +48,14 @@ export function SocialLinks({ className }: SocialLinksProps) { const Icon = getIcon(link.icon); return ( Icon && ( -
  • - - {Icon && } +
  • + +
  • ) diff --git a/src/icons/social-gitlab.svg b/src/icons/social-gitlab.svg new file mode 100644 index 0000000..cc26e9d --- /dev/null +++ b/src/icons/social-gitlab.svg @@ -0,0 +1,7 @@ + + + + + + \ No newline at end of file