homepage/src/components/Card.astro

58 lines
846 B
Text
Raw Normal View History

2024-01-30 15:48:19 +01:00
---
2024-01-31 14:57:40 +01:00
const { id, name, link } = Astro.props;
2024-01-30 15:48:19 +01:00
---
2024-01-31 14:57:40 +01:00
<a href={link}>
<div class="card">
<div class="image-wrapper">
<img src={`/img/logo/${id}.svg`} alt={`${name} logo`}" />
</div>
<div class="text">
<h1>{name}</h1>
<p><slot /></p>
</div>
2024-01-30 15:48:19 +01:00
</div>
2024-01-31 14:57:40 +01:00
</a>
2024-01-30 15:48:19 +01:00
<style>
.card {
display: flex;
align-items: center;
padding: 10px;
margin: 10px 0;
2024-01-30 22:35:24 +01:00
border: 2px #ff66ff solid;
color: white;
2024-01-30 18:02:02 +01:00
border-radius: 25px;
transition: 0.1s ease-out;
position: relative;
top: 0;
2024-01-30 22:35:24 +01:00
background-color: #00000000;
2024-01-30 18:02:02 +01:00
}
.card:hover {
top: -4px;
2024-01-30 22:35:24 +01:00
background-color: #ff80ff;
border: none;
color: black;
}
.card:hover img {
filter: invert(100%) brightness(0%);
2024-01-30 15:48:19 +01:00
}
.text {
margin-left: 20px;
}
.image-wrapper {
height: 100px;
width: 100px;
text-align: center;
}
img {
height: 100%;
width: auto;
}
</style>