--- import { getCollection, render } from "astro:content"; import Layout from "../../../layouts/main.astro"; const locale = "ar"; const experiences = (await getCollection("experiences")) .filter((e) => e.data.lang === locale && !e.data.draft) .sort((a, b) => (b.data.startDate > a.data.startDate ? 1 : -1)); const typeIcons: Record = { employment: '๐Ÿข', freelance: '๐Ÿ’ผ', teaching: '๐ŸŽ“', community: '๐Ÿค', entrepreneurship: '๐Ÿš€', }; function formatMonth(dateStr: string) { const [year, month] = dateStr.split('-'); return new Date(parseInt(year), parseInt(month) - 1) .toLocaleDateString('ar-SA', { year: 'numeric', month: 'short' }); } ---
ุจุฑู…ุฌุฉ

ุงู„ู…ุณุงุฑ

ุฃูƒุซุฑ ู…ู† 20 ุณู†ุฉ ู…ู† ุงู„ุฎุจุฑุฉ ููŠ ุชุทูˆูŠุฑ ุงู„ุจุฑู…ุฌูŠุงุช.

{experiences.map(async (exp) => { const { Content } = await render(exp); const isOngoing = !exp.data.endDate; const start = formatMonth(exp.data.startDate); const end = exp.data.endDate ? formatMonth(exp.data.endDate) : 'ุงู„ุญุงุถุฑ'; return (
{isOngoing &&
}
{typeIcons[exp.data.type] || '๐Ÿ’ผ'} {start} โ€” {end} {exp.data.location && ยท {exp.data.location}}

{exp.data.role}

{exp.data.companyUrl ? ( {exp.data.company} ) : exp.data.company}

{exp.data.technologies && exp.data.technologies.length > 0 && (
{exp.data.technologies.map((tech: string) => ( {tech} ))}
)}
); })}