Committing with a bunch of changes

This commit is contained in:
2024-11-12 01:07:20 +02:00
parent 098dce9f35
commit c839ead325
14 changed files with 582 additions and 213 deletions

50
src/components/Nav.astro Normal file
View File

@@ -0,0 +1,50 @@
---
interface Props {
path: string;
}
const { path } = Astro.props;
const directories = ["about", "works", "links"]
---
<nav>
<span id="nav-path">/home/kyren/{path}</span>
<span id="nav-links">
<a href="/">home</a>
{directories.map((dir) => (
<a href={`/${dir}`}>{dir}</a>
<span></span> /* For whitespace */
))}
</span>
</nav>
<style>
nav {
font-weight: 300;
display: flex;
flex-wrap: wrap;
justify-content: space-between;
border: 0;
border-bottom: 1px;
border-style: solid;
margin-bottom: 0.75rem;
padding-bottom: 0.75rem;
}
#nav-links a {
margin-right: 0.15rem;
margin-bottom: 0px;
margin-left: 0.15rem;
color: var(--primary);
font-size: 1rem;
}
#nav-links a:hover {
color: var(--accent);
}
#nav-path {
margin-right: 2rem;
}
</style>

View File

@@ -0,0 +1,36 @@
---
interface Props {
header: string;
margin?: string;
}
const { header, margin = "-1px" } = Astro.props;
---
<div class="section" style={`margin: ${margin};`}>
<span class="tag">{header}</span>
<slot/>
</div>
<style>
.section {
position: relative;
padding: 0.8rem;
padding-top: 0.85rem;
display: flex;
border-style: solid;
border-width: 1px;
border-color: var(--alt);
}
.tag {
position: absolute;
top: -0.6rem;
left: 0.5rem;
background-color: var(--background);
padding-right: 0.5rem;
padding-left: 0.5rem;
font-size: 0.8rem;
color: var(--alt);
}
</style>