images fill box

This commit is contained in:
Oliver Bryan
2025-10-26 10:25:05 +00:00
parent acd6264dcc
commit a3273c71bb
3 changed files with 10 additions and 12 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 113 KiB

After

Width:  |  Height:  |  Size: 118 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 34 KiB

After

Width:  |  Height:  |  Size: 31 KiB

View File

@@ -8,19 +8,17 @@ interface Props {
const { image, title, type = "simple" } = Astro.props;
---
{type === "boxed" ? (
<div class="border demo-border">
<span>{title}</span>
{
type === "boxed" ? (
<div class="border demo-border">
<span>{title}</span>
<img src={image} alt={title} class="object-cover w-full" />
</div>
) : (
<img
src={image}
alt={title}
class="object-cover"
class="w-full h-full object-cover demo-border"
/>
</div>
) : (
<img
src={image}
alt={title}
class="w-full h-full object-cover demo-border"
/>
)}
)
}