diff --git a/client/src/components/BigCard.astro b/client/src/components/BigCard.astro new file mode 100644 index 00000000..730d974f --- /dev/null +++ b/client/src/components/BigCard.astro @@ -0,0 +1,46 @@ +--- +// BigCard component - configurable card with link +interface Props { + url: string; +} + +const { url } = Astro.props; +--- + +
\ No newline at end of file diff --git a/client/src/components/ElementsCard.astro b/client/src/components/ElementsCard.astro new file mode 100644 index 00000000..730d974f --- /dev/null +++ b/client/src/components/ElementsCard.astro @@ -0,0 +1,46 @@ +--- +// BigCard component - configurable card with link +interface Props { + url: string; +} + +const { url } = Astro.props; +--- + + \ No newline at end of file diff --git a/client/src/components/Navigation.astro b/client/src/components/Navigation.astro new file mode 100644 index 00000000..675e5690 --- /dev/null +++ b/client/src/components/Navigation.astro @@ -0,0 +1,77 @@ +--- +// Navigation component for Pole Sport website +--- + + + + \ No newline at end of file diff --git a/client/src/content.config.mjs b/client/src/content.config.mjs index 3c2cfc26..4a79c911 100644 --- a/client/src/content.config.mjs +++ b/client/src/content.config.mjs @@ -22,10 +22,12 @@ const strapiPoleElementsLoader = defineCollection({ // Fetch articles from Strapi const poleElementsData = await fetch(url.href); const { data }= await poleElementsData.json(); + // Transform the API response into the desired data structure return data.map((item) => ({ id: item.id.toString(), name: item.name, + title: item.name, description: item.description, createdAt: item.createdAt, updatedAt: item.updatedAt, @@ -42,6 +44,7 @@ const strapiPoleElementsLoader = defineCollection({ schema: z.object({ id: z.string(), name: z.string(), + title: z.string(), description: z.string(), createdAt: z.string(), updatedAt: z.string(), diff --git a/client/src/layouts/Head.astro b/client/src/layouts/Head.astro new file mode 100644 index 00000000..91f4736b --- /dev/null +++ b/client/src/layouts/Head.astro @@ -0,0 +1,12 @@ +--- +const { title, description } = Astro.props; +--- + + + + + + + +