Merge pull request #15 from gractwo/lyle

lyle branch merge
This commit is contained in:
2022-12-27 20:57:12 +01:00
committed by GitHub
5 changed files with 171 additions and 31 deletions

View File

@@ -4,6 +4,7 @@ type iconselection =
| "Link2" | "Link2"
| "ExternalLink" | "ExternalLink"
| "Code" | "Code"
| "Info"
| "Twitter" | "Twitter"
| "GitHub" | "GitHub"
| "YouTube" | "YouTube"
@@ -120,6 +121,26 @@ const Icon = ({ icon, width, height, ...props }: iconprops) => {
<polyline points="8 6 2 12 8 18" /> <polyline points="8 6 2 12 8 18" />
</svg> </svg>
); );
case "Info":
return (
<svg
xmlns="http://www.w3.org/2000/svg"
width={width || 24}
height={height || 24}
viewBox="0 0 24 24"
fill="none"
stroke="currentColor"
strokeWidth="2"
strokeLinecap="round"
strokeLinejoin="round"
className="feather feather-info"
{...props}
>
<circle cx="12" cy="12" r="10" />
<line x1="12" y1="16" x2="12" y2="12" />
<line x1="12" y1="8" x2="12.01" y2="8" />
</svg>
);
case "Twitter": case "Twitter":
// twitter icon courtesy of simpleicons.org // twitter icon courtesy of simpleicons.org
return ( return (

View File

@@ -31,6 +31,10 @@
"href": "/o-gractwie#sklad-administracji", "href": "/o-gractwie#sklad-administracji",
"hrefalias": ["/profil"] "hrefalias": ["/profil"]
}, },
{
"href": "https://youtu.be/NNv2RHR62Rs",
"hrefalias": ["/pgtf-theme"]
},
{ {
"name": "Kod Źródłowy", "name": "Kod Źródłowy",
"href": "https://github.com/gractwo/gractwo-web", "href": "https://github.com/gractwo/gractwo-web",

View File

@@ -8,26 +8,32 @@ import links from "../data/links.json";
import { useEffect, useState } from "react"; import { useEffect, useState } from "react";
const PageInfo = () => { const PageInfo = () => {
const [adminList, setAdminList] = useState([]); const [personsList, setPersonsList] = useState([]);
const [funFact, setFunFact] = useState("");
type apiResType = { type apiResType = {
Id: string; Id: string;
Name: string; Name: string;
Desc: string; Desc?: string;
Img: string; Img?: string;
DevBadge: string; IsAdmin?: boolean;
AssignedUser: string; DevBadge?: boolean;
AssignedUser?: string;
}; };
function getFunFact(): void {
setFunFact("Genezą nazwy Gractwa jest złączenie słów „Gracz” i „Bractwo”.");
}
useEffect(() => { useEffect(() => {
fetch("https://gractwo.pl/api/v1/admincards") fetch("https://gractwo.pl/api/v1/admincards")
.then((res) => { .then((res) => {
return res.json(); return res.json();
}) })
.then((data) => { .then((data) => {
setAdminList(data); setPersonsList(data);
}) })
.catch((err) => { .catch((err) => {
console.log(err); console.log(err);
}); });
getFunFact();
}, []); }, []);
return ( return (
<> <>
@@ -64,12 +70,34 @@ const PageInfo = () => {
linki i przekierowania linki i przekierowania
<Icon icon="Link2" /> <Icon icon="Link2" />
</Link> </Link>
{/* <Link href="#ciekawostka" className="chip">
ciekawostki
<Icon icon="Info" />
</Link> */}
</div> </div>
</main> </main>
<main id="geneza-gractwa">
<h2>geneza gractwa</h2>
<p style={{ textAlign: "justify" }}>
Gractwo zostało założone w 2020 roku w odpowiedzi na{" "}
<Link href="/pgtf-theme">rozłam / przewrót władzy w PGTF</Link>
{". "}Serwer discordowy PGTF, pozostający nadal pod kontrolą naszej
administracji został przeniesiony w stan przejściowy do czasu podjęcia
decyzji o powstaniu Gractwa. W pierwszych dniach została utworzona
grupa facebookowa i strona internetowa. Aktywność na grupie
facebookowej nigdy nie rozwinęła się wystarczająco by przekształcić
się w pełnoprawną społeczność, ale serwer discord cały czas
funkcjonuje jako nasze małe, ciasne ale własne miejsce spotkań.
</p>
</main>
<main id="sklad-administracji"> <main id="sklad-administracji">
<h2>skład administracji</h2> <h2>skład administracji</h2>
<div className={styles.persons}> <div className={styles.persons}>
{adminList.map((el: apiResType) => { {personsList
.filter((el: apiResType) => {
return !el.IsAdmin;
})
.map((el: apiResType) => {
return ( return (
<Link <Link
key={el.Id} key={el.Id}
@@ -95,6 +123,39 @@ const PageInfo = () => {
})} })}
</div> </div>
</main> </main>
{/* <main id="osoby-godne-uwagi">
<h2>osoby godne uwagi</h2>
<div className={styles.persons}>
{personsList
.filter((el: apiResType) => {
return !el.IsAdmin;
})
.map((el: apiResType) => {
return (
<Link
key={el.Id}
href={`/profil/${el.Name.replaceAll(
" ",
"-"
).toLocaleLowerCase()}`}
>
<article>
<img src={el.Img} alt={`zdjęcia profilowe ${el.Name}`} />
<div>
<h3>{el.Name}</h3>
<p>{el.Desc || "brak opisu."}</p>
{el.DevBadge ? (
<span className={styles.devBadge}>DEV</span>
) : (
""
)}
</div>
</article>
</Link>
);
})}
</div>
</main> */}
<main id="linki"> <main id="linki">
<h2>linki i przekierowania</h2> <h2>linki i przekierowania</h2>
<div className="chips"> <div className="chips">
@@ -110,6 +171,17 @@ const PageInfo = () => {
})} })}
</div> </div>
</main> </main>
{/* <main id="ciekawostka">
<h2>ciekawostka</h2>
<div className={styles.funfact}>
<p>
<span>{"„"}</span>
{funFact}
<span>{"”"}</span>
</p>
<button onClick={getFunFact}>Odśwież ciekawostkę.</button>
</div>
</main> */}
</> </>
); );
}; };

View File

@@ -39,6 +39,28 @@ main {
margin: 0 auto; margin: 0 auto;
padding: 1rem; padding: 1rem;
} }
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 { .chips {
display: flex; display: flex;

View File

@@ -44,7 +44,9 @@
display: flex; display: flex;
flex-direction: row; flex-direction: row;
flex-wrap: wrap; flex-wrap: wrap;
@media screen and (max-width: 800px) {
justify-content: center; justify-content: center;
}
margin-top: 1rem; margin-top: 1rem;
gap: 1.5rem; gap: 1.5rem;
a { a {
@@ -105,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;
}
}
}