Skip to content

Commit

Permalink
refactor: replace Twitter handles with direct links in team member pr…
Browse files Browse the repository at this point in the history
…ofiles
  • Loading branch information
kaizendae authored and yjose committed Dec 11, 2024
1 parent b2a831a commit ea0d902
Show file tree
Hide file tree
Showing 10 changed files with 88 additions and 72 deletions.
Binary file added public/about/images/team/amine.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified public/about/images/team/britel.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/about/images/team/ismail.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified public/about/images/team/isoubei.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/about/images/team/oumaima.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/about/images/team/redouane.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
38 changes: 17 additions & 21 deletions src/components/about/member.astro
Original file line number Diff line number Diff line change
@@ -1,29 +1,25 @@
---
import { Image } from "astro:assets";
import { Icon } from "astro-icon/components";
const { name, x_handle, profile_image } = Astro.props;
const { name, link, profile_image } = Astro.props;
---

<div class="md:mb mb-2">
<Image
class="mx-auto w-full overflow-hidden rounded-t-[4px]"
src={profile_image}
alt={name}
width={297}
height={330}
loading="lazy"
/>
<div class="mx-auto rounded-b-[4px] bg-neutral-dark-0 p-4">
<h3 class="mb-2 truncate text-label-sm text-neutral-light-50">{name}</h3>
<div class="flex items-center space-x-2">
<Icon name="x" class="h-5 w-5 text-neutral-light-30" />
<a
href={`https://x.com/${x_handle}`}
class="text-neutral-light-50 hover:text-neutral-light-0"
<a href={link} class="block">
<div class="md:mb mb-2">
<Image
class="mx-auto w-full overflow-hidden rounded-t-[4px]"
src={profile_image}
alt={name}
width={297}
height={330}
loading="lazy"
/>
<div class="mx-auto rounded-b-[4px] bg-neutral-dark-0 p-4">
<h3
class="mb-2 truncate text-label-sm text-neutral-light-50 underline underline-offset-4"
>
<p>{x_handle}</p>
</a>
{name}
</h3>
</div>
</div>
</div>
</a>
113 changes: 67 additions & 46 deletions src/components/about/team-members.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,155 +2,176 @@
{
"id": 1,
"name": "Youssef El Azizi",
"x_handle": "@ElaziziYoussouf",
"link": "https://x.com/ElaziziYoussouf",
"profile_image": "/about/images/team/yosef.jpg",
"status": "active"
},
{
"id": 2,
"name": "Mohammed Aboullaite",
"x_handle": "@laytoun",
"link": "https://x.com/laytoun",
"profile_image": "/about/images/team/laytoun.jpg",
"status": "active"
},
{
"id": 3,
"name": "Mriem Zaid",
"x_handle": "@_iMeriem",
"link": "https://x.com/_iMeriem",
"profile_image": "/about/images/team/imeriem.jpg",
"status": "active"
},
{
"id": 4,
"name": "Abderrahim SOUBAI-ELIDRISI",
"x_handle": "@soub4i",
"link": "https://x.com/soub4i",
"profile_image": "/about/images/team/isoubei.jpg",
"status": "active"
},
{
"id": 5,
"name": "Otmane Fettal",
"x_handle": "@OFettal",
"link": "https://x.com/OFettal",
"profile_image": "/about/images/team/ofettal.jpg",
"status": "active"
},
{
"id": 6,
"name": "Adnan M'RAKCHI",
"x_handle": "@_admerra",
"link": "https://x.com/_admerra",
"profile_image": "/about/images/team/adnan.jpg",
"status": "active"
},
{
"id": 7,
"name": "Chaimaa BRITEL",
"x_handle": "@ChaimaaBritel",
"profile_image": "/about/images/team/britel.jpg",
"name": "Redouane Soukaoui",
"link": "https://x.com/mouradxmt",
"profile_image": "/about/images/team/redouane.jpg",
"status": "active"
},
{
"id": 8,
"name": "Abdelati EL ASRI",
"x_handle": "@kaizendae",
"profile_image": "/about/images/team/kaizendae.jpg",
"name": "Oumaima Makhlouk",
"link": "https://x.com/mouradxmt",
"profile_image": "/about/images/team/oumaima.jpg",
"status": "active"
},
{
"id": 9,
"name": "Soufyan El Foukahi",
"x_handle": "@soufyanAI",
"profile_image": "/about/images/team/soufyan.jpg",
"status": "past"
},
{
"id": 7,
"name": "Chaimaa BRITEL",
"x_handle": "@ChaimaaBritel",
"link": "https://x.com/ChaimaaBritel",
"profile_image": "/about/images/team/britel.jpg",
"status": "active"
},
{
"id": 8,
"id": 10,
"name": "Abdelati EL ASRI",
"x_handle": "@kaizendae",
"link": "https://x.com/kaizendae",
"profile_image": "/about/images/team/kaizendae.jpg",
"status": "active"
},
{
"id": 9,
"id": 13,
"name": "Soufyan El Foukahi",
"x_handle": "@soufyanAI",
"link": "https://x.com/soufyanAI",
"profile_image": "/about/images/team/soufyan.jpg",
"status": "past"
},
{
"id": 10,
"id": 14,
"name": "Amine Hakkou",
"x_handle": "@amine_hakkou",
"profile_image": "/about/images/team/default.jpg",
"link": "https://x.com/amine_hakkou",
"profile_image": "/about/images/team/amine.jpg",
"status": "past"
},
{
"id": 11,
"id": 15,
"name": "Aicha Aferiat",
"x_handle": "@kaizendae",
"link": "https://x.com/kaizendae",
"profile_image": "/about/images/team/default.jpg",
"status": "past"
},
{
"id": 12,
"id": 16,
"name": "Amine Maarouf",
"x_handle": "@a_maaarouf",
"link": "https://x.com/a_maaarouf",
"profile_image": "/about/images/team/default.jpg",
"status": "past"
},
{
"id": 13,
"id": 17,
"name": "Oussama Hyad",
"x_handle": "@kaizendae",
"link": "https://x.com/kaizendae",
"profile_image": "/about/images/team/default.jpg",
"status": "past"
},
{
"id": 14,
"id": 18,
"name": "Mohammed Ez-zarghili",
"x_handle": "@ezzarghili",
"link": "https://x.com/ezzarghili",
"profile_image": "/about/images/team/default.jpg",
"status": "past"
},
{
"id": 15,
"id": 19,
"name": "Afaf Ridaoui",
"x_handle": "@__iamaf",
"link": "https://x.com/__iamaf",
"profile_image": "/about/images/team/Afaf.jpg",
"status": "active"
},
{
"id": 16,
"id": 20,
"name": "Hamza Makraz",
"x_handle": "@hamza_makraz",
"link": "https://x.com/hamza_makraz",
"profile_image": "/about/images/team/hamza.jpg",
"status": "active"
},
{
"id": 17,
"id": 21,
"name": "Mohamed Daoudi",
"x_handle": "@MIduoad",
"link": "https://x.com/MIduoad",
"profile_image": "/about/images/team/daoudi.jpg",
"status": "active"
},
{
"id": 18,
"id": 22,
"name": "Mourad Mtouaa",
"x_handle": "@mouradxmt",
"link": "https://x.com/mouradxmt",
"profile_image": "/about/images/team/mourad.jpg",
"status": "active"
},
{
"id": 19,
"id": 23,
"name": "Oumaima Khalil",
"link": "https://x.com/mouradxmt",
"profile_image": "/about/images/team/default.jpg",
"status": "active"
},
{
"id": 24,
"name": "Ismail El Azizi",
"link": "https://x.com/MIduoad",
"profile_image": "/about/images/team/ismail.jpg",
"status": "active"
},
{
"id": 25,
"name": "Nouamane Tazi",
"link": "https://x.com/mouradxmt",
"profile_image": "/about/images/team/default.jpg",
"status": "active"
},
{
"id": 26,
"name": "Oumaima Khalil",
"link": "https://x.com/mouradxmt",
"profile_image": "/about/images/team/default.jpg",
"status": "active"
},
{
"id": 28,
"name": "You",
"x_handle": "@YourHandleHere",
"link": "https://x.com/YourHandleHere",
"profile_image": "/about/images/team/wewantu.jpg",
"status": "active"
}
]
]
6 changes: 3 additions & 3 deletions src/components/about/team.astro
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { getCollection } from "astro:content";
const teamCollection = await getCollection("team");
const teamMembers = teamCollection.map(member => ({
name: member.data.name,
x_handle: member.data.x_handle,
link: member.data.link,
profile_image: member.data.profile_image,
status: member.data.status,
}));
Expand All @@ -30,7 +30,7 @@ const pastMembers = teamMembers.filter(member => member.status === "past");
<Member
key={member.name}
name={member.name}
x_handle={member.x_handle}
link={member.link}
profile_image={member.profile_image}
/>
))
Expand All @@ -57,7 +57,7 @@ const pastMembers = teamMembers.filter(member => member.status === "past");
<Member
key={member.name}
name={member.name}
x_handle={member.x_handle}
link={member.link}
profile_image={member.profile_image}
/>
))
Expand Down
3 changes: 1 addition & 2 deletions src/content/schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,8 @@ export const authorSchema = z.object({
export type ArticleFrontmatter = z.infer<typeof blogSchema>;

export const teamSchema = z.object({
id: z.number(),
name: z.string().min(1, "Name cannot be empty"),
x_handle: z.string().regex(/^@\w+$/, "Invalid Twitter handle format"),
link: z.string().url("Invalid URL format"),
profile_image: z
.string()
.regex(/\.(jpg|jpeg|png|gif)$/, "Invalid image file format"),
Expand Down

0 comments on commit ea0d902

Please sign in to comment.