Files
pantosite/src/components/Header.astro

99 lines
1.6 KiB
Plaintext
Raw Normal View History

2024-12-08 21:35:59 +01:00
---
2024-12-27 22:05:12 +01:00
import { ClientRouter } from "astro:transitions";
import HeaderLink from "./HeaderLink.astro";
2026-02-23 01:58:27 +01:00
import Socials from "./Socials.astro";
2024-12-08 21:35:59 +01:00
---
<header>
2026-04-11 00:41:28 +02:00
<nav class="head">
2025-02-16 17:25:40 +01:00
<a class="logo" href="/">
<img src="/logo.svg" alt="ಠ_ಠ" />
</a>
2026-04-11 00:41:28 +02:00
<Socials/>
2024-12-08 21:35:59 +01:00
</nav>
2026-04-11 00:41:28 +02:00
<nav class="internal-links">
<HeaderLink href="/projects">Projects</HeaderLink>
<HeaderLink href="/photography">Photography</HeaderLink>
<HeaderLink href="/blog">Blog</HeaderLink>
</nav>
2024-12-08 21:35:59 +01:00
</header>
2024-12-27 22:05:12 +01:00
<ClientRouter />
2024-12-08 21:35:59 +01:00
<style>
header {
margin: 0;
2026-04-11 00:41:28 +02:00
padding: .5em 1em;
2024-12-27 22:05:12 +01:00
width: 100%;
2026-04-11 00:41:28 +02:00
background-color: var(--background-soft);
display: flex;
flex-direction: row;
align-items: center;
}
nav {
width: 100%;
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-between;
}
2024-12-27 22:05:12 +01:00
header .logo {
display: flex;
align-items: center;
}
header .logo a {
2024-12-08 21:35:59 +01:00
margin: 0;
}
2024-12-27 22:05:12 +01:00
header .logo img {
2025-02-16 17:25:40 +01:00
height: 24pt;
2024-12-08 21:35:59 +01:00
}
2024-12-27 22:05:12 +01:00
2026-04-11 00:41:28 +02:00
.internal-links {
position: absolute;
display: flex;
flex-direction: row;
justify-content: center;
width: 100%;
left: 0;
right: 0;
}
2024-12-27 22:05:12 +01:00
2026-04-11 00:41:28 +02:00
.internal-links a {
2025-02-16 17:25:40 +01:00
padding: .4em 0.5em;
2024-12-27 22:05:12 +01:00
color: var(--text);
2024-12-08 21:35:59 +01:00
border-bottom: 4px solid transparent;
text-decoration: none;
2026-04-11 00:41:28 +02:00
}
2024-12-27 22:05:12 +01:00
2026-04-11 00:41:28 +02:00
.internal-links a.active {
2024-12-08 21:35:59 +01:00
text-decoration: none;
2024-12-27 22:05:12 +01:00
border-bottom-color: var(--primary);
2024-12-08 21:35:59 +01:00
}
2024-12-27 22:05:12 +01:00
2026-04-11 00:41:28 +02:00
@media (max-width: 720px) {
header {
flex-direction: column;
padding: 0;
}
2025-02-16 17:25:40 +01:00
header .logo img {
height: 18pt;
2026-04-11 00:41:28 +02:00
}
nav.head {
padding: .5em 1em;
}
2024-12-27 22:05:12 +01:00
2026-04-11 00:41:28 +02:00
.internal-links {
border-top: var(--background) 1px solid;
position: relative;
}
2024-12-08 21:35:59 +01:00
}
</style>