Skip to content

Commit

Permalink
Merge branch 'main' into rename-skill-09
Browse files Browse the repository at this point in the history
  • Loading branch information
JonasWanke committed Oct 29, 2024
2 parents a8955ac + d4df941 commit 8354507
Show file tree
Hide file tree
Showing 27 changed files with 182 additions and 49 deletions.
79 changes: 79 additions & 0 deletions src/assets/data/team.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
[
{
"img": "/src/assets/img/team/benjamin-frost.webp",
"name": "Benjamin Frost",
"lastRole": { "de": "Jury", "en": "Jury" },
"hasMultipleRoles": true
},
{
"img": "/src/assets/img/team/jonas-wanke.webp",
"name": "Jonas Wanke",
"lastRole": { "en": "Expert", "de": "Bundestrainer" },
"skill": {
"de": "App-Entwicklung",
"en": "Mobile Applications Development"
},
"hasMultipleRoles": true
},
{
"img": "/src/assets/img/team/olaf-kappler.webp",
"name": "Dr. Olaf Kappler",
"lastRole": { "en": "Expert", "de": "Bundestrainer" },
"skill": {
"de": "Software-Entwicklung",
"en": "Software Applications Development"
}
},
{
"img": "/src/assets/img/team/doreen-kappler.webp",
"name": "Doreen Kappler",
"lastRole": { "de": "Good Fairy", "en": "Good Fairy" }
},
{
"img": "/src/assets/img/team/glenn-skrzypczak.webp",
"name": "Glenn Skrzypczak",
"lastRole": { "en": "Expert", "de": "Bundestrainer" },
"skill": {
"de": "Web-Entwicklung",
"en": "Web Technologies"
},
"hasMultipleRoles": true
},
{
"img": "/src/assets/img/team/elisa-boose.webp",
"name": "Elisa Boose",
"lastRole": { "en": "Trainer", "de": "Trainer" }
},
{
"img": "/src/assets/img/team/michael-boose.webp",
"name": "Michael Boose",
"lastRole": { "en": "Trainer", "de": "Trainer" }
},
{
"img": "/src/assets/img/team/joachim-schiller.webp",
"name": "Joachim Schiller",
"lastRole": { "de": "Jury", "en": "Jury" },
"hasMultipleRoles": true
},
{
"img": "/src/assets/img/team/justin-konratt.webp",
"name": "Justin Konratt",
"lastRole": { "de": "Jury", "en": "Jury" },
"hasMultipleRoles": true
},
{
"img": "/src/assets/img/team/kai-redmann.webp",
"name": "Kai Redmann",
"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" }
},
{
"img": "/src/assets/img/team/thomas-steinfeld.webp",
"name": "Thomas Steinfeld",
"lastRole": { "en": "Mr. Speed Programming", "de": "Mr. Speed Programming" }
}
]
Binary file added src/assets/img/team.webp
Binary file not shown.
Binary file added src/assets/img/team/benjamin-frost.webp
Binary file not shown.
Binary file added src/assets/img/team/doreen-kappler.webp
Binary file not shown.
Binary file added src/assets/img/team/elisa-boose.webp
Binary file not shown.
Binary file added src/assets/img/team/glenn-skrzypczak.webp
Binary file not shown.
Binary file added src/assets/img/team/joachim-schiller.webp
Binary file not shown.
Binary file added src/assets/img/team/jonas-wanke.webp
Binary file not shown.
Binary file added src/assets/img/team/justin-konratt.webp
Binary file not shown.
Binary file added src/assets/img/team/kai-redmann.webp
Binary file not shown.
Binary file added src/assets/img/team/lukas-fischer.webp
Binary file not shown.
Binary file added src/assets/img/team/michael-boose.webp
Binary file not shown.
Binary file added src/assets/img/team/olaf-kappler.webp
Binary file not shown.
Binary file added src/assets/img/team/thomas-steinfeld.webp
Binary file not shown.
11 changes: 9 additions & 2 deletions src/components/Header.astro
Original file line number Diff line number Diff line change
Expand Up @@ -46,20 +46,27 @@ const skills = [
</a>
<div class="ml-10 hidden space-x-8 lg:block">
<a
href={getRelativeLocaleUrl(lang)}
href={getRelativeLocaleUrl(lang, "/")}
class="text-base font-medium text-white hover:text-gray-100"
>
{t({ de: "Startseite", en: "Home" })}
</a>
</div>

<div class="ml-10 hidden lg:block">
<SkillsDropdown
client:load
title={t({ de: "Unsere Disziplinen", en: "Our Skills" })}
skills={skills}
/>
</div>
<div class="ml-10 hidden space-x-8 lg:block">
<a
href={getRelativeLocaleUrl(lang, "/our-team")}
class="text-base font-medium text-white hover:text-gray-100"
>
{t({ de: "Unser Team", en: "Our Team" })}
</a>
</div>
</div>
<LanguageDropdown
client:load
Expand Down
4 changes: 2 additions & 2 deletions src/components/Hero.astro
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import HeroBgImage from "~/assets/img/hero-bg.jpg";
interface Props {
title: string;
subtitle: string;
subtitle?: string;
img?: ImageMetadata;
size?: "md" | "lg";
}
Expand All @@ -27,7 +27,7 @@ const { title, subtitle, img = HeroBgImage, size = "lg" } = Astro.props;
class={clsx(
"relative mx-auto max-w-7xl px-4 text-center sm:px-6 lg:px-8",
{ "py-8 sm:py-16 md:py-32": size === "md" },
{ "py-16 sm:py-32 md:py-64": size === "lg" },
{ "py-16 sm:py-32 md:py-64": size === "lg" }
)}
>
<h1
Expand Down
49 changes: 32 additions & 17 deletions src/components/team/Person.astro
Original file line number Diff line number Diff line change
@@ -1,27 +1,42 @@
---
import type { ComponentProps } from "astro/types";
import SocialMediaList from "./SocialMediaList.astro";
import type { Language } from "~/i18n";
import { getLangFromUrl, useTranslations } from "~/i18n/utils";
import PersonImage from "./PersonImage.astro";
type Props = ComponentProps<typeof SocialMediaList> & {
interface Props {
name: string;
img: string;
info?: string;
};
lastRole: Record<Language, string>;
imagePath?: string;
skill?: Record<Language, string>;
hasMultipleRoles?: boolean;
}
const { name, img, info, links = [] } = Astro.props;
const {
name,
imagePath,
lastRole,
skill,
hasMultipleRoles = false,
} = Astro.props;
const lang = getLangFromUrl(Astro.url);
const t = useTranslations(lang);
---

<div class="space-y-6">
<img
class="mx-auto h-40 w-40 rounded-full object-cover shadow-lg xl:h-56 xl:w-56"
src={img}
alt=""
/>
<div class="space-y-2">
<div class="space-y-1 text-lg font-medium leading-6">
<h3>{name}</h3>
{info && <p class="text-wsg-orange-500">{info}</p>}
<PersonImage imagePath={imagePath} />
<div class="text-md text-center font-light">
<h3 class="mb-1 text-lg font-medium">{name}</h3>
<div>
<p class="inline-block">
{t(lastRole)}
</p>
<p class="inline-block">
{hasMultipleRoles && t({ de: "und mehr", en: "and more" })}
</p>
</div>
<SocialMediaList links={links} />
<p>
{skill || <br />}
</p>
</div>
</div>
23 changes: 23 additions & 0 deletions src/components/team/PersonImage.astro
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
---
import { Image } from "astro:assets";
import { clsx } from "clsx";
import WsgHandsImage from "~/assets/img/wsg-hands.svg";
interface Props {
imagePath?: string;
}
const { imagePath } = Astro.props;
const images = import.meta.glob<{ default: ImageMetadata }>(
"/src/assets/**/*.{jpeg,jpg,png,gif,webp}",
);
---

<Image
class={clsx(
"mx-auto h-40 w-40 rounded-full object-cover shadow-lg xl:h-56 xl:w-56",
imagePath && "p-5",
)}
src={imagePath ? images[imagePath]() : WsgHandsImage}
alt=""
/>
39 changes: 20 additions & 19 deletions src/components/team/Team.astro
Original file line number Diff line number Diff line change
@@ -1,23 +1,24 @@
---
import type { ComponentProps } from "astro/types";
import team from "~/assets/data/team.json";
import Person from "./Person.astro";
interface Props {
members: ComponentProps<typeof Person>[];
}
const { members } = Astro.props;
---

<ul
role="list"
class="mx-auto space-y-16 sm:grid sm:grid-cols-2 sm:gap-16 sm:space-y-0 lg:max-w-5xl lg:grid-cols-3"
>
{
members.map((member) => (
<li>
<Person {...member} />
</li>
))
}
</ul>
<div class="bg-white py-16">
<div
class="mx-8 grid grid-cols-2 gap-y-16 md:mx-24 md:grid-cols-3 lg:grid-cols-4"
>
{
team
.sort((first, second) => first["name"].localeCompare(second["name"]))
.map((member) => (
<Person
name={member["name"]}
imagePath={member["img"]}
lastRole={member["lastRole"]}
skill={member["skill"]}
hasMultipleRoles={member["hasMultipleRoles"]}
/>
))
}
</div>
</div>
3 changes: 0 additions & 3 deletions src/layouts/SkillPage.astro
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import HeadedSection from "~/components/sections/HeadedSection.astro";
import WavedSection from "~/components/sections/WavedSection.astro";
import SkillInformation from "~/components/skill/SkillInformation.astro";
import SkillRoadmap from "~/components/skill/SkillRoadmap.astro";
import type Person from "~/components/team/Person.astro";
import TimeLine from "~/components/timeline/TimeLine.astro";
import { getLangFromUrl, useTranslations } from "~/i18n";
import Layout from "./Layout.astro";
Expand All @@ -18,7 +17,6 @@ interface Props {
skillInformation: ComponentProps<typeof SkillInformation>;
img: ImageMetadata;
contact: string;
nationalTeam: ComponentProps<typeof Person>[];
timelineEntries: ComponentProps<typeof TimeLine>["entries"];
additionalLinks: ComponentProps<typeof LinkCard>[];
}
Expand All @@ -28,7 +26,6 @@ const {
skillDescription,
skillInformation,
img,
nationalTeam,
timelineEntries,
additionalLinks,
contact,
Expand Down
17 changes: 17 additions & 0 deletions src/pages/[lang]/our-team.astro
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
import TeamImage from "~/assets/img/team.webp";
import { getLangFromUrl, localeParams, useTranslations } from "~/i18n/utils";
import Hero from "../../components/Hero.astro";
import TeamList from "../../components/team/Team.astro";
import Layout from "../../layouts/Layout.astro";
export const getStaticPaths = localeParams;
const lang = getLangFromUrl(Astro.url);
const t = useTranslations(lang);
---

<Layout title={t({ de: "Unser Team", en: "Our Team" })}>
<Hero title={t({ de: "Unser Team", en: "Our Team" })} img={TeamImage} />
<TeamList />
</Layout>
1 change: 0 additions & 1 deletion src/pages/en/mobile-applications-development.astro
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ const historyData = historyJson[lang]["skill08"];
}}
img={Skill08Image}
contact="mailto:[email protected]"
nationalTeam={[]}
timelineEntries={Object.values(historyData)}
additionalLinks={[
{
Expand Down
1 change: 0 additions & 1 deletion src/pages/en/software-applications-development.astro
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ const historyData = historyJson[lang]["skill09"];
}}
img={Skill09Image}
contact="mailto:[email protected]"
nationalTeam={[]}
timelineEntries={Object.values(historyData)}
additionalLinks={[
{
Expand Down
1 change: 0 additions & 1 deletion src/pages/en/web-technologies.astro
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ const historyData = historyJson[lang]["skill17"];
}}
img={Skill09Image}
contact="mailto:[email protected]"
nationalTeam={[]}
timelineEntries={Object.values(historyData)}
additionalLinks={[
{
Expand Down
1 change: 0 additions & 1 deletion src/pages/mobile-applications-development.astro
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ const historyData = historyJson[lang]["skill08"];
}}
img={Skill08Image}
contact="mailto:[email protected]"
nationalTeam={[]}
timelineEntries={Object.values(historyData)}
additionalLinks={[
{
Expand Down
1 change: 0 additions & 1 deletion src/pages/software-applications-development.astro
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ const historyData = historyJson[lang]["skill09"];
}}
img={Skill09Image}
contact="mailto:[email protected]"
nationalTeam={[]}
timelineEntries={Object.values(historyData)}
additionalLinks={[
{
Expand Down
1 change: 0 additions & 1 deletion src/pages/web-technologies.astro
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ const historyData = historyJson[lang]["skill17"];
}}
img={Skill09Image}
contact="mailto:[email protected]"
nationalTeam={[]}
timelineEntries={Object.values(historyData)}
additionalLinks={[
{
Expand Down

0 comments on commit 8354507

Please sign in to comment.