website-astro/src/components/Header.astro

67 lines
1.2 KiB
Plaintext
Raw Normal View History

2022-12-02 11:21:18 +01:00
---
2022-12-02 17:29:11 +01:00
import { t, l } from "astro-i18n";
import Navigation from "../components/Navigation.astro";
2022-12-02 11:21:18 +01:00
---
2022-12-05 20:50:35 +01:00
<header class="" role="banner">
2022-12-02 17:29:11 +01:00
<a href="#skip-content" class="skip-link"> {t("header.skipLink")}</a>
2022-12-05 20:50:35 +01:00
<p class="logo">
<a href={l("/")} aria-label={t("header.homeLink")}>nardu.in</a>
</p>
2022-12-02 11:21:18 +01:00
<Navigation />
2022-12-02 17:29:11 +01:00
</header>
<style>
header {
padding: var(--space-xs-s) 0;
margin: 0 auto var(--space-xs-s) 0;
display: flex;
flex-flow: row wrap;
gap: var(--space-xs-s);
2022-12-05 20:50:35 +01:00
justify-content: space-between;
inline-size: 100%;
2022-12-02 17:29:11 +01:00
}
header > .logo {
2022-12-05 20:50:35 +01:00
/* margin-inline-end: auto; */
flex-grow: 1;
/* flex-basis: 100%; */
text-align: center;
}
header > .logo a {
text-align: center;
}
header > :global(:last-child) {
flex-grow: 999;
margin-inline-start: auto;
2022-12-02 17:29:11 +01:00
}
a {
text-decoration: none;
}
.skip-link {
position: absolute;
top: 20px;
left: 20px;
height: 1px;
width: 1px;
-webkit-clip: rect(0 0 0 0);
clip: rect(0 0 0 0);
overflow: hidden;
z-index: 99999;
background-color: #fff;
}
.skip-link:focus {
padding: 6px;
-webkit-clip: auto;
clip: auto;
overflow: visible;
width: auto;
height: auto;
}
.logo {
font-size: var(--size-1);
font-weight: bold;
2022-12-05 20:50:35 +01:00
color: var(--color-dark-blue);
2022-12-02 17:29:11 +01:00
}
</style>