restore/update eslint/prettier config

This commit is contained in:
2025-11-24 10:17:38 -05:00
parent 66dc731396
commit e181c735b8
6 changed files with 226 additions and 99 deletions
+42 -40
View File
@@ -1,56 +1,58 @@
---
import type { ImageMetadata } from 'astro';
interface Props {
title?: string;
image?: ImageMetadata;
links?: {
label: string;
href: string;
newWindow?: boolean;
}[];
title?: string;
image?: ImageMetadata;
links?: {
label: string;
href: string;
newWindow?: boolean;
}[];
}
const { title, image, links } = Astro.props;
---
<div class="card">
{image && <img src={image.src} alt="" />}
<div>
{title && <h2>{title}</h2>}
<slot />
{
links &&
links.map((link) => (
<a
href={link.href}
target={link.newWindow ? "_blank" : "_self"}
rel="noopener noreferrer"
>
{link.label}
</a>
))
}
</div>
{image && <img src={image.src} alt="" />}
<div>
{title && <h2>{title}</h2>}
<slot />
{
links &&
links.map((link) => (
<a
href={link.href}
target={link.newWindow ? '_blank' : '_self'}
rel="noopener noreferrer"
>
{link.label}
</a>
))
}
</div>
</div>
<style lang="scss">
@use "../styles/variables.scss" as *;
@use '../styles/variables.scss' as *;
.card {
border: var(--border);
border-radius: $radius;
overflow: hidden;
.card {
border: var(--border);
border-radius: $radius;
overflow: hidden;
& div {
padding: 1rem;
}
& div {
padding: 1rem;
}
& h2 {
margin: 0;
}
}
& h2 {
margin: 0;
}
}
img {
object-fit: cover;
max-width: 100%;
}
img {
object-fit: cover;
max-width: 100%;
}
</style>