diff --git a/src/pages/ar/برمجة/index.astro b/src/pages/ar/برمجة/index.astro
index 8c0d27f..087eb3e 100644
--- a/src/pages/ar/برمجة/index.astro
+++ b/src/pages/ar/برمجة/index.astro
@@ -18,6 +18,14 @@ import logoTiqa from "../../../assets/images/logo-tiqa-blanc.png";
const locale = "ar";
const projectsBasePath = getProjectsBasePath(locale);
+const logos = import.meta.glob<{ default: ImageMetadata }>('../../../assets/images/companies/*.png', { eager: true });
+
+function getLogo(filename?: string) {
+ if (!filename) return null;
+ const key = `../../../assets/images/companies/${filename}`;
+ return logos[key]?.default ?? null;
+}
+
const experiences = (await getLocalizedCollection("experiences", locale))
.filter((e) => !e.data.draft)
.sort((a, b) => {
@@ -29,6 +37,7 @@ const experiences = (await getLocalizedCollection("experiences", locale))
const recentExperiences = experiences.filter((e) => e.data.featured).slice(0, 4);
+
const projects = (await getLocalizedCollection("projects", locale))
.filter((p) => !p.data.draft && p.data.category === "dev" && p.data.featured)
.sort((a, b) => b.data.date!.getTime() - a.data.date!.getTime());
@@ -83,6 +92,7 @@ function formatMonth(dateStr: string) {
const isOngoing = !exp.data.endDate;
const start = formatMonth(exp.data.startDate);
const end = exp.data.endDate ? formatMonth(exp.data.endDate) : 'الحالي';
+ const logo = getLogo(exp.data.logo);
return (
)}
-
- {start} — {end}
-
-
{exp.data.role}
-
- {exp.data.companyUrl ? (
- {exp.data.company}
- ) : exp.data.company}
- {exp.data.location && ` · ${exp.data.location}`}
-
+
+
+
+ {start} — {end}
+
+
{exp.data.role}
+
+ {exp.data.companyUrl ? (
+ {exp.data.company}
+ ) : exp.data.company}
+ {exp.data.location && ` · ${exp.data.location}`}
+
+
+ {logo && (
+
+
+
+ )}
+
);
})}
diff --git a/src/pages/code/index.astro b/src/pages/code/index.astro
index 56aa752..927d916 100644
--- a/src/pages/code/index.astro
+++ b/src/pages/code/index.astro
@@ -18,6 +18,14 @@ import logoTiqa from "../../assets/images/logo-tiqa-blanc.png";
const locale = "fr";
const projectsBasePath = getProjectsBasePath(locale);
+const logos = import.meta.glob<{ default: ImageMetadata }>('../../assets/images/companies/*.png', { eager: true });
+
+function getLogo(filename?: string) {
+ if (!filename) return null;
+ const key = `../../assets/images/companies/${filename}`;
+ return logos[key]?.default ?? null;
+}
+
const experiences = (await getLocalizedCollection("experiences", locale))
.filter((e) => !e.data.draft)
.sort((a, b) => {
@@ -29,6 +37,7 @@ const experiences = (await getLocalizedCollection("experiences", locale))
const recentExperiences = experiences.filter((e) => e.data.featured).slice(0, 4);
+
const projects = (await getLocalizedCollection("projects", locale))
.filter((p) => !p.data.draft && p.data.category === "dev" && p.data.featured)
.sort((a, b) => b.data.date!.getTime() - a.data.date!.getTime());
@@ -83,6 +92,7 @@ function formatMonth(dateStr: string) {
const isOngoing = !exp.data.endDate;
const start = formatMonth(exp.data.startDate);
const end = exp.data.endDate ? formatMonth(exp.data.endDate) : 'Présent';
+ const logo = getLogo(exp.data.logo);
return (
)}
-
- {start} — {end}
-
-
{exp.data.role}
-
- {exp.data.companyUrl ? (
- {exp.data.company}
- ) : exp.data.company}
- {exp.data.location && ` · ${exp.data.location}`}
-
+
+
+
+ {start} — {end}
+
+
{exp.data.role}
+
+ {exp.data.companyUrl ? (
+ {exp.data.company}
+ ) : exp.data.company}
+ {exp.data.location && ` · ${exp.data.location}`}
+
+
+ {logo && (
+
+
+
+ )}
+
);
})}
diff --git a/src/pages/en/code/index.astro b/src/pages/en/code/index.astro
index 4142827..081f7d8 100644
--- a/src/pages/en/code/index.astro
+++ b/src/pages/en/code/index.astro
@@ -18,6 +18,14 @@ import logoTiqa from "../../../assets/images/logo-tiqa-blanc.png";
const locale = "en";
const projectsBasePath = getProjectsBasePath(locale);
+const logos = import.meta.glob<{ default: ImageMetadata }>('../../../assets/images/companies/*.png', { eager: true });
+
+function getLogo(filename?: string) {
+ if (!filename) return null;
+ const key = `../../../assets/images/companies/${filename}`;
+ return logos[key]?.default ?? null;
+}
+
const experiences = (await getLocalizedCollection("experiences", locale))
.filter((e) => !e.data.draft)
.sort((a, b) => {
@@ -29,6 +37,7 @@ const experiences = (await getLocalizedCollection("experiences", locale))
const recentExperiences = experiences.filter((e) => e.data.featured).slice(0, 4);
+
const projects = (await getLocalizedCollection("projects", locale))
.filter((p) => !p.data.draft && p.data.category === "dev" && p.data.featured)
.sort((a, b) => b.data.date!.getTime() - a.data.date!.getTime());
@@ -83,6 +92,7 @@ function formatMonth(dateStr: string) {
const isOngoing = !exp.data.endDate;
const start = formatMonth(exp.data.startDate);
const end = exp.data.endDate ? formatMonth(exp.data.endDate) : 'Present';
+ const logo = getLogo(exp.data.logo);
return (
)}
-
- {start} — {end}
-
-
{exp.data.role}
-
- {exp.data.companyUrl ? (
- {exp.data.company}
- ) : exp.data.company}
- {exp.data.location && ` · ${exp.data.location}`}
-
+
+
+
+ {start} — {end}
+
+
{exp.data.role}
+
+ {exp.data.companyUrl ? (
+ {exp.data.company}
+ ) : exp.data.company}
+ {exp.data.location && ` · ${exp.data.location}`}
+
+
+ {logo && (
+
+
+
+ )}
+
);
})}