generated from dwd/boilarplate-astro-tailwind
add publish date
This commit is contained in:
@@ -33,12 +33,13 @@ const items = metaJSON.data[0];
|
||||
<h1 class="text-4xl font-bold border-b-4 border-[#780A0A]">Latest News</h1>
|
||||
</div>
|
||||
<div class="grid grid-cols-1 lg:grid-cols-2 gap-4">
|
||||
{data.map((items: {heading: string | undefined; img: string | undefined; title : string | undefined; content : string | undefined; slug : string | undefined;}) =>
|
||||
{data.map((items: {heading: string | undefined; img: string | undefined; title : string | undefined; content : string | undefined; slug : string | undefined; date_created : string | undefined;}) =>
|
||||
<div class="flex flex-col border-2 border-[#780a0a] gap-6 p-6 place-content-between rounded-lg">
|
||||
<div class="flex flex-col">
|
||||
<a href={`/technology${items.slug}`} class="border-b-4 border-[#780a0a] text-2xl font-bold line-clamp-1">{items.heading}</a>
|
||||
<h2 class="text-lg line-clamp-1">{items.title}</h2>
|
||||
<img class="aspect-video " src={`https://api7.siliconpin.com/assets/${items.img}?quality=50&format=jpeg`} alt={items.title} />
|
||||
<p class="text-end font-bold">Publish at: {items.date_created.split(':')[0].split('T')[0]}</p>
|
||||
<div class="h-[100px] overflow-y-hidden">
|
||||
<p id="" set:html={items.content}></p>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user