added basic project page

This commit is contained in:
2024-07-12 21:01:31 +02:00
parent d256bb6321
commit 4cd335e153
5 changed files with 75 additions and 23 deletions

View File

@@ -0,0 +1,49 @@
---
interface Props {
name: string;
href?: string;
}
const { name, href } = Astro.props;
---
<style lang="scss">
@import "../styles/_var.scss";
a {
color: white;
&.project-external {
text-decoration: none;
&::after {
background-color: white;
width: 20px;
position: absolute;
right: 20px;
top: 20px;
}
}
}
.content {
padding: 20px;
margin: 20px;
max-width: 40vw;
transition: border-color 0.3s;
h2 {
font-size: 20px;
}
&:hover {
border-color: $link;
}
}
.no-hover {
&:hover {
border: 1px solid lighten($highlight, 12%);
}
}
</style>
<div class={href ? "content" : "content no-hover"}>
<a class="project-external" target={href ? "_blank" : ""} href={href}>
<h2>{name}</h2><slot />
</a>
</div>