54 lines
910 B
Plaintext
54 lines
910 B
Plaintext
---
|
|
import { Icon } from "astro-icon/components";
|
|
interface Props {
|
|
title: string;
|
|
icon: string;
|
|
subtitle: string;
|
|
href: string;
|
|
}
|
|
|
|
const { icon, subtitle, title, href } = Astro.props;
|
|
---
|
|
|
|
<a href={href} class="keycap">
|
|
<Icon name={icon} />
|
|
<div id="right">
|
|
<h3>{title}</h3>
|
|
<p>{subtitle}</p>
|
|
</div>
|
|
</a>
|
|
|
|
<style>
|
|
a {
|
|
display: flex;
|
|
place-items: center;
|
|
gap: 1em;
|
|
color: var(--color-base-1000);
|
|
padding: 1.5em;
|
|
padding-top: 0.75em;
|
|
border-radius: 0.75em;
|
|
text-decoration: none;
|
|
|
|
& > svg {
|
|
width: clamp(1.5em, 6vw + 0.8em, 3em);
|
|
height: clamp(1.5em, 6vw + 0.8em, 3em);
|
|
}
|
|
|
|
& > #right {
|
|
display: flex;
|
|
flex-direction: column;
|
|
align-items: flex-start;
|
|
gap: 0.15em;
|
|
|
|
& > h3 {
|
|
font-size: 1.5em;
|
|
}
|
|
|
|
& > p {
|
|
font-size: 0.8em;
|
|
margin-left: 2px;
|
|
}
|
|
}
|
|
}
|
|
</style>
|