From fe326c70d84b4a7d37ccfb2943904e88694e228e Mon Sep 17 00:00:00 2001 From: jakubmanczak Date: Thu, 22 Dec 2022 14:38:55 +0100 Subject: [PATCH] add code icon, add icons to link/redirect list in /o-gractwie --- components/Icon.tsx | 23 +++++++++++++++++++++++ data/links.json | 15 ++++++++++----- pages/o-gractwie.tsx | 2 ++ 3 files changed, 35 insertions(+), 5 deletions(-) diff --git a/components/Icon.tsx b/components/Icon.tsx index 10c8587..72aebfc 100644 --- a/components/Icon.tsx +++ b/components/Icon.tsx @@ -3,6 +3,7 @@ type iconselection = | "Users" | "Link2" | "ExternalLink" + | "Code" | "Twitter" | "GitHub" | "YouTube" @@ -100,6 +101,25 @@ const Icon = ({ icon, width, height, ...props }: iconprops) => { ); + case "Code": + return ( + + + + + ); case "Twitter": // twitter icon courtesy of simpleicons.org return ( @@ -164,7 +184,10 @@ const Icon = ({ icon, width, height, ...props }: iconprops) => { ); + default: + return <>; } }; export { Icon }; +export type { iconselection }; diff --git a/data/links.json b/data/links.json index 6b9b896..ccb77c2 100644 --- a/data/links.json +++ b/data/links.json @@ -3,25 +3,29 @@ "name": "Discord", "href": "https://discord.gg/NBXq95C", "hrefalias": ["/discord", "/dsc", "/dc"], - "desc": "Nasz serwer na Discordzie!" + "desc": "Nasz serwer na Discordzie!", + "icon": "Discord" }, { "name": "YouTube", "href": "https://www.youtube.com/@gractwopl", "hrefalias": ["/youtube", "/yt"], - "desc": "Nasz kanał na YouTubie!" + "desc": "Nasz kanał na YouTubie!", + "icon": "YouTube" }, { "name": "Twitter", "href": "https://twitter.com/gractwo", "hrefalias": ["/twitter", "/twt"], - "desc": "Nasz profil na Twitterze!" + "desc": "Nasz profil na Twitterze!", + "icon": "Twitter" }, { "name": "GitHub", "href": "https://github.com/gractwo", "hrefalias": ["/github", "/gh"], - "desc": "Nasz org na GitHubie!" + "desc": "Nasz org na GitHubie!", + "icon": "GitHub" }, { "href": "/o-gractwie#sklad-administracji", @@ -31,6 +35,7 @@ "name": "Kod Źródłowy", "href": "https://github.com/gractwo/gractwo-web", "hrefalias": ["/source", "/oss"], - "desc": "Kod źródłowy naszej strony internetowej." + "desc": "Kod źródłowy naszej strony internetowej.", + "icon": "Code" } ] diff --git a/pages/o-gractwie.tsx b/pages/o-gractwie.tsx index 75dd424..90e58d8 100644 --- a/pages/o-gractwie.tsx +++ b/pages/o-gractwie.tsx @@ -3,6 +3,7 @@ import { SEO } from "../components/SEO"; import styles from "../styles/oGractwie.module.scss"; import Link from "next/link"; import { Icon } from "../components/Icon"; +import { iconselection } from "../components/Icon"; import administracja from "../data/administracja.json"; import links from "../data/links.json"; @@ -75,6 +76,7 @@ const PageInfo = () => { return ( {el.name} + {el.icon ? : ""} ); }