63 lines
1.3 KiB
Plaintext
63 lines
1.3 KiB
Plaintext
---
|
|
export interface Props {
|
|
title: string;
|
|
body: string;
|
|
tag: string;
|
|
href: string;
|
|
}
|
|
|
|
const { href, title, body, tag } = Astro.props;
|
|
---
|
|
|
|
<li class="link-card">
|
|
<a href={href}>
|
|
<h6 class="nu-c-h6 nu-u-mt-1 nu-u-mb-1">
|
|
{title}
|
|
</h6>
|
|
<p class="nu-c-fs-small nu-u-mt-1 nu-u-mb-1">
|
|
{body}
|
|
</p>
|
|
<p class="distribution">
|
|
<span class="tag">{tag}</span>
|
|
</p>
|
|
</a>
|
|
</li>
|
|
<style>
|
|
.link-card {
|
|
list-style: none;
|
|
display: flex;
|
|
background-color: var(--background-secondary);
|
|
background-position: 100%;
|
|
border: 1px solid transparent;
|
|
border-radius: var(--spacing-01);
|
|
height: 136px;
|
|
position: relative;
|
|
}
|
|
.link-card > a {
|
|
width: 100%;
|
|
text-decoration: none;
|
|
padding: 0.8rem 1.2rem;
|
|
color: var(--support-info);
|
|
}
|
|
p {
|
|
color: var(--text-secondary);
|
|
}
|
|
.link-card:is(:hover, :focus-within) {
|
|
background-position: 0;
|
|
border: 1px solid var(--border);
|
|
}
|
|
.link-card:is(:hover, :focus-within) h6 {}
|
|
p.distribution {margin: var(--spacing-00); position: absolute; bottom: var(--spacing-06);}
|
|
span.tag {
|
|
background-color: var(--background-selected);
|
|
padding: 2px 8px;
|
|
border-radius: 24px;
|
|
display: inline-block;
|
|
color: var(--text-primary-alt);
|
|
margin-top: var(--spacing-08);
|
|
font-size: var(--desktop-caption);
|
|
line-height: var(--lh-desktop-caption);
|
|
font-family: var(--system-ui);
|
|
}
|
|
</style>
|