Skip to content

Commit

Permalink
feat: move over changes
Browse files Browse the repository at this point in the history
  • Loading branch information
styrix560 committed Oct 28, 2024
2 parents 07b78a2 + 6fd864a commit d703018
Show file tree
Hide file tree
Showing 16 changed files with 72 additions and 36 deletions.
Binary file added public/imgs/team/Benjamin Frost.webp
Binary file not shown.
Binary file added public/imgs/team/Doreen Kappler.webp
Binary file not shown.
Binary file added public/imgs/team/Dr. Olaf Kappler.webp
Binary file not shown.
Binary file added public/imgs/team/Elisa Boose.webp
Binary file not shown.
Binary file added public/imgs/team/Glenn Skrzypczak.webp
Binary file not shown.
Binary file added public/imgs/team/Joachim Schiller.webp
Binary file not shown.
Binary file added public/imgs/team/Jonas Wanke.webp
Binary file not shown.
Binary file added public/imgs/team/Justin Konratt.webp
Binary file not shown.
Binary file added public/imgs/team/Kai Redmann.webp
Binary file not shown.
Binary file added public/imgs/team/Lukas Fischer.webp
Binary file not shown.
Binary file added public/imgs/team/Michael Boose.webp
Binary file not shown.
Binary file added public/imgs/team/Thomas Steinfeld.webp
Binary file not shown.
37 changes: 19 additions & 18 deletions src/components/team/Person.astro
Original file line number Diff line number Diff line change
@@ -1,27 +1,28 @@
---
import type { ComponentProps } from "astro/types";
import SocialMediaList from "./SocialMediaList.astro";
import { TeamMember } from "../../utils/async_helper";
import type { PropsOf } from "../../utils/types";
import SocialMediaList from "../social_media/SocialMediaList.astro";
import { PersonImage } from "./PersonImage";
type Props = ComponentProps<typeof SocialMediaList> & {
name: string;
img: string;
info?: string;
};
type Props = TeamMember;
const { name, img, info, links = [] } = Astro.props;
const { name, img, lastRole, skill, hasMultipleRoles } = Astro.props;
---

<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 img={img} />
<div class="text-center text-md font-light">
<h3 class="text-lg font-medium mb-1">{name}</h3>
<div>
<p class="inline-block">
{lastRole}
</p>
<p class="inline-block">
{hasMultipleRoles && t("team.more")}
</p>
</div>
<SocialMediaList links={links} />
<p>
{skill || <br />}
</p>
</div>
</div>
14 changes: 14 additions & 0 deletions src/components/team/PersonImage.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
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 shadow-lg xl:h-56 xl:w-56 object-cover ${padding}`}
src={img ?? "/imgs/wsg/wsg_hands.svg"}
alt=""
/>
);
};
39 changes: 21 additions & 18 deletions src/components/team/Team.astro
Original file line number Diff line number Diff line change
@@ -1,23 +1,26 @@
---
import type { ComponentProps } from "astro/types";
import { load_team } from "../../utils/async_helper";
import Person from "./Person.astro";
interface Props {
members: ComponentProps<typeof Person>[];
}
const { members } = Astro.props;
const team = await load_team();
---

<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="grid grid-cols-2 md:grid-cols-3 lg:grid-cols-4 gap-y-16 mx-8 md:mx-24 mx-32"
>
{
team
.sort((first, second) => first["name"].localeCompare(second["name"]))
.map((member) => (
<Person
name={member["name"]}
img={member["img"]}
lastRole={member["lastRole"]}
skill={member["skill"]}
hasMultipleRoles={member["hasMultipleRoles"]}
/>
))
}
</div>
</div>
18 changes: 18 additions & 0 deletions src/pages/[lang]/our-team.astro
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
---
import Hero from "../../components/Hero.astro";
import TeamPage from "../../components/team/Team.astro";
import Layout from "../../layouts/Layout.astro";
import { getStaticLangPaths, updateLang } from "../../routing/lang";
import { t } from "i18next";
export const getStaticPaths = getStaticLangPaths;
updateLang(Astro.url.pathname);
---

<Layout title={t("team.title")}>
<Hero
title={t("team.title")}
img="https:////live.staticflickr.com/65535/52434467221_676ae1bf70_h.jpg"
/>
<TeamPage />
</Layout>

0 comments on commit d703018

Please sign in to comment.