feat: some shit
This commit is contained in:
47
src/components/Nav.astro
Normal file
47
src/components/Nav.astro
Normal file
@ -0,0 +1,47 @@
|
||||
---
|
||||
import { getLocale } from "astro-i18n-aut";
|
||||
import { useTranslations, useTranslatedPath } from "../i18n/utils";
|
||||
import Logo from "./Logo.astro";
|
||||
|
||||
const lang = getLocale(Astro.url);
|
||||
const t = useTranslations(lang);
|
||||
const translatePath = useTranslatedPath(lang);
|
||||
---
|
||||
|
||||
<style>
|
||||
ul {
|
||||
display: flex;
|
||||
gap: 1rem;
|
||||
list-style: none;
|
||||
padding: 0;
|
||||
}
|
||||
li {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
a {
|
||||
color: var(--text-color);
|
||||
text-decoration: none;
|
||||
}
|
||||
</style>
|
||||
|
||||
<ul>
|
||||
<li>
|
||||
<a
|
||||
href={translatePath("/")}
|
||||
style="--fill: red; --background-fill: transparent;"
|
||||
>
|
||||
<Logo />
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href={translatePath("/blog")}>
|
||||
{t("nav.blog")}
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href={translatePath("/about")}>
|
||||
{t("nav.about")}
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
Reference in New Issue
Block a user