Files
astroplate/src/layouts/components/AuthorCard.astro
T
Al Murad Uzzaman 63b1df19b8 Updated to Astro v5
2025-01-05 15:55:16 +06:00

33 lines
699 B
Plaintext

---
import { plainify } from "@/lib/utils/textConverter";
import ImageMod from "./ImageMod.astro";
import Social from "./Social.astro";
const { data } = Astro.props;
const { title, image, social } = data.data;
---
<div
class="rounded bg-theme-light p-8 text-center dark:bg-darkmode-theme-light"
>
{
image && (
<ImageMod
class="mx-auto mb-6 rounded"
src={image}
alt={title}
width={120}
height={120}
format="webp"
/>
)
}
<h4 class="mb-3">
<a href={`/authors/${data.id}`}>{title}</a>
</h4>
<p class="mb-4">
{plainify(data.body?.slice(0, 100))}
</p>
<Social source={social} className="social-icons" />
</div>