detail view, linked list, layout tweaks

This commit is contained in:
2025-06-22 01:12:03 +02:00
parent 6c48ed2925
commit 3eddcc5f6a
7 changed files with 115 additions and 136 deletions

View File

@@ -18,21 +18,23 @@ const BASE_URL = getStrapiBaseUrl();
<div {...otherProps}>
{
elements.map((poleElement) => (
<article class="flex items-center bg-white rounded-lg shadow-lg overflow-hidden">
<img
src={getStrapiMedia(
poleElement.data.mainImage.url,
BASE_URL,
)}
alt={poleElement.data.mainImage.alternativeText}
class="w-24 h-24 object-cover flex-shrink-0"
/>
<div class="p-4">
<h2 class="text-xl font-bold">
{poleElement.data.name}
</h2>
</div>
</article>
<a href={`/elements/${poleElement.id}`} class="block">
<article class="flex items-center bg-white rounded-lg shadow-lg overflow-hidden hover:shadow-xl transition-shadow duration-200">
<img
src={getStrapiMedia(
poleElement.data.mainImage.url,
BASE_URL,
)}
alt={poleElement.data.mainImage.alternativeText}
class="w-24 h-24 object-cover flex-shrink-0"
/>
<div class="p-4">
<h2 class="text-xl font-bold">
{poleElement.data.name}
</h2>
</div>
</article>
</a>
))
}
</div>