forked from auxolotl/website
This makes use of Astro dynamic routing to avoid having to redefine all pages for each language. Note that they still have to be defined in `i18n/ui.ts` which is not refactored in this PR. The Index will also now use the `defaultLang` from `i18n/ui.ts` rather than hardcoding `/en/`.
31 lines
925 B
Text
31 lines
925 B
Text
---
|
|
interface Props {}
|
|
|
|
import { useTranslations } from '../i18n/utils';
|
|
import { Image } from 'astro:assets';
|
|
import aux from '../../public/aux.svg';
|
|
|
|
const { lang } = Astro.params;
|
|
const translation = useTranslations(lang);
|
|
---
|
|
|
|
<header class="sticky flex justify-between top-0 bg-[rgb(var(--background))] z-10 max-w-4xl mx-auto p-4 text-lg">
|
|
<div class="flex items-center">
|
|
<a href="https://auxolotl.org" class="flex items-center text-lg gap-4">
|
|
<Image class="w-12 h-12" src={aux} alt="auxolotl.org logo" />
|
|
<span>Auxolotl</span>
|
|
</a>
|
|
</div>
|
|
|
|
<nav>
|
|
<ul class="flex gap-4 items-center h-full">
|
|
<!--
|
|
<li><a href="https://auxolotl.org/contribute">Contribute</a></li>
|
|
-->
|
|
|
|
<li><a href="https://wiki.auxolotl.org">Wiki</a></li>
|
|
<li><a href="https://forum.aux.computer">{translation("header.community")}</a></li>
|
|
<li><a href="https://github.com/auxolotl">GitHub</a></li>
|
|
</ul>
|
|
</nav>
|
|
</header>
|