diff --git a/components/Icon.tsx b/components/Icon.tsx index 72aebfc..b846de7 100644 --- a/components/Icon.tsx +++ b/components/Icon.tsx @@ -4,6 +4,7 @@ type iconselection = | "Link2" | "ExternalLink" | "Code" + | "Info" | "Twitter" | "GitHub" | "YouTube" @@ -120,6 +121,26 @@ const Icon = ({ icon, width, height, ...props }: iconprops) => { ); + case "Info": + return ( + + + + + + ); case "Twitter": // twitter icon courtesy of simpleicons.org return ( diff --git a/pages/o-gractwie.tsx b/pages/o-gractwie.tsx index 1d16178..8dbe62d 100644 --- a/pages/o-gractwie.tsx +++ b/pages/o-gractwie.tsx @@ -9,6 +9,7 @@ import { useEffect, useState } from "react"; const PageInfo = () => { const [personsList, setPersonsList] = useState([]); + const [funFact, setFunFact] = useState(""); type apiResType = { Id: string; Name: string; @@ -18,6 +19,9 @@ const PageInfo = () => { DevBadge?: boolean; AssignedUser?: string; }; + function getFunFact(): void { + setFunFact("Genezą nazwy Gractwa jest złączenie słów „Gracz” i „Bractwo”."); + } useEffect(() => { fetch("https://gractwo.pl/api/v1/admincards") .then((res) => { @@ -29,6 +33,7 @@ const PageInfo = () => { .catch((err) => { console.log(err); }); + getFunFact(); }, []); return ( <> @@ -65,6 +70,10 @@ const PageInfo = () => { linki i przekierowania + {/* + ciekawostki + + */} @@ -162,6 +171,17 @@ const PageInfo = () => { })} + {/* + ciekawostka + + + {"„"} + {funFact} + {"”"} + + Odśwież ciekawostkę. + + */} > ); }; diff --git a/styles/globals.scss b/styles/globals.scss index 37d1a5b..cbf0b7d 100644 --- a/styles/globals.scss +++ b/styles/globals.scss @@ -42,6 +42,25 @@ main { a { color: rgb(251, 99, 107); } +button { + display: inline-block; + font-size: 1rem; + padding: 8px; + margin: 0 8px; + background: none; + border: 1px solid var(--grey); + // background: rgba(grey, 0.45); + border-radius: 4px; + color: var(--color); + font-family: var(--fonts-bold); + cursor: pointer; + transition-duration: 100ms; + &:hover { + background: rgba(grey, 0.25); + box-shadow: var(--shadow0); + // color: black; + } +} .chips { display: flex; diff --git a/styles/oGractwie.module.scss b/styles/oGractwie.module.scss index 3930004..1b8dbbb 100644 --- a/styles/oGractwie.module.scss +++ b/styles/oGractwie.module.scss @@ -107,3 +107,22 @@ } } } +.funfact { + display: block; + text-align: right; + width: 100%; + background: var(--black1); + padding: 16px 0; + margin: 16px 0; + border-radius: 8px; + box-shadow: var(--shadow0); + p { + text-align: center; + margin-bottom: 12px; + span { + font-family: var(--fonts-bold); + font-size: 1.5em; + margin: 0 16px; + } + } +}
+ {"„"} + {funFact} + {"”"} +