Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added team data #299

Merged
merged 16 commits into from
Oct 29, 2024
16 changes: 8 additions & 8 deletions src/assets/data/team.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@
{
"img": "/src/assets/img/team/Jonas Wanke.webp",
"name": "Jonas Wanke",
"lastRole": { "en": "Expert", "de": "Experte" },
"skill": "Skill 08",
"lastRole": { "en": "Expert", "de": "Bundestrainer" },
"skill": "Mobile Applications Development",
styrix560 marked this conversation as resolved.
Show resolved Hide resolved
"hasMultipleRoles": true
},
{
"img": "/src/assets/img/team/Dr. Olaf Kappler.webp",
"name": "Dr. Olaf Kappler",
"lastRole": { "en": "Expert", "de": "Experte" },
"skill": "Skill 09"
"lastRole": { "en": "Expert", "de": "Bundestrainer" },
"skill": "IT Software Solutions for Business"
},
{
"img": "/src/assets/img/team/Doreen Kappler.webp",
Expand All @@ -26,8 +26,8 @@
{
"img": "/src/assets/img/team/Glenn Skrzypczak.webp",
"name": "Glenn Skrzypczak",
"lastRole": { "en": "Expert", "de": "Experte" },
"skill": "Skill 17",
"lastRole": { "en": "Expert", "de": "Bundestrainer" },
"skill": "Web Technologies",
"hasMultipleRoles": true
},
{
Expand Down Expand Up @@ -55,12 +55,12 @@
{
"img": "/src/assets/img/team/Kai Redmann.webp",
"name": "Kai Redmann",
"lastRole": { "en": "Workshop Manager", "de": "Workshop Manager" }
"lastRole": { "en": "Workshop-Manager", "de": "Workshop Manager" }
},
{
"img": "/src/assets/img/team/Lukas Fischer.webp",
"name": "Lukas Fischer",
"lastRole": { "en": "Workshop Manager", "de": "Workshop Manager" }
"lastRole": { "en": "Workshop-Manager", "de": "Workshop Manager" }
},
{
"img": "/src/assets/img/team/Thomas Steinfeld.webp",
Expand Down
3 changes: 2 additions & 1 deletion src/components/team/Person.astro
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
---
import { getLangFromUrl, useTranslations } from "~/i18n/utils";
import { PersonImage } from "./PersonImage";
import type { Language } from "~/i18n";

interface Props {
name: string;
lastRole: { de: string; en: string };
lastRole: Record<Language, string>;
img?: string;
skill?: string;
hasMultipleRoles?: boolean;
Expand Down
8 changes: 6 additions & 2 deletions src/components/team/PersonImage.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,16 @@
import clsx from "clsx";

export type PersonImageProps = {
img?: string;
};

export const PersonImage = ({ img }: PersonImageProps) => {
const padding = !img ? "p-5" : "";
return (
<img
className={`mx-auto h-40 w-40 rounded-full object-cover shadow-lg xl:h-56 xl:w-56 ${padding}`}
className={clsx(
`mx-auto h-40 w-40 rounded-full object-cover shadow-lg xl:h-56 xl:w-56`,
!img && "p-5",
styrix560 marked this conversation as resolved.
Show resolved Hide resolved
)}
src={img ?? "/imgs/wsg/wsg_hands.svg"}
alt=""
/>
Expand Down