mirror of
https://github.com/10h30/astroplate.git
synced 2026-07-11 18:56:06 +09:00
33 lines
699 B
Plaintext
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>
|