big card, elements list & page, navigation
This commit is contained in:
@@ -1,28 +1,13 @@
|
||||
---
|
||||
// Import necessary components and utilities
|
||||
import Layout from "../layouts/Layout.astro";
|
||||
import { getCollection } from "astro:content";
|
||||
import PoleElementsList from "../components/PoleElementsList.astro";
|
||||
import { getStrapiBaseUrl } from "../config/strapi";
|
||||
|
||||
// Fetch all posts from Strapi using Astro's content collection
|
||||
const strapiPoleElements = await getCollection("strapiPoleElementsLoader");
|
||||
// Get Strapi URL from global config
|
||||
const BASE_URL = getStrapiBaseUrl();
|
||||
import ElementsCard from "../components/ElementsCard.astro";
|
||||
---
|
||||
|
||||
<Layout>
|
||||
<Layout title="Pole Elements" description="Pole Elements">
|
||||
<div class="container mx-auto p-4">
|
||||
<!-- Main heading -->
|
||||
<h1 class="text-3xl font-bold mb-8">
|
||||
Hello Strapi 5 and Astro 5 World
|
||||
</h1>
|
||||
<!-- Pole Elements List -->
|
||||
<PoleElementsList
|
||||
elements={strapiPoleElements}
|
||||
class="max-w-4xl mx-auto space-y-4"
|
||||
id="pole-elements-list"
|
||||
data-testid="pole-elements"
|
||||
/>
|
||||
<div class="py-12">
|
||||
<ElementsCard url="/elements" />
|
||||
</div>
|
||||
</div>
|
||||
</Layout>
|
||||
|
||||
Reference in New Issue
Block a user