Setup Astro project and start working on placeholder page
This commit is contained in:
@@ -0,0 +1,65 @@
|
||||
---
|
||||
import { Image } from "astro:assets";
|
||||
import { getRelativeLocaleUrl } from "astro:i18n";
|
||||
import logo from "../assets/ci/icon-only.svg";
|
||||
|
||||
const isEnglish = Astro.currentLocale === "en";
|
||||
---
|
||||
|
||||
<header>
|
||||
<div>
|
||||
<Image
|
||||
class="icon"
|
||||
src={logo}
|
||||
loading="eager"
|
||||
alt="Tideshift Digital logo mark"
|
||||
/>
|
||||
</div>
|
||||
|
||||
<nav>
|
||||
<ul>
|
||||
<li>
|
||||
<a
|
||||
class:list={[{ active: isEnglish }]}
|
||||
href={getRelativeLocaleUrl("en", "")}>EN</a
|
||||
>
|
||||
</li>
|
||||
<li>
|
||||
<a
|
||||
class:list={[{ active: !isEnglish }]}
|
||||
href={getRelativeLocaleUrl("de", "")}>DE</a
|
||||
>
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
</header>
|
||||
|
||||
<style>
|
||||
header {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
border: 1px solid var(--clr-ts-warm-red);
|
||||
}
|
||||
|
||||
.icon {
|
||||
width: 60px;
|
||||
height: auto;
|
||||
}
|
||||
|
||||
ul {
|
||||
display: flex;
|
||||
list-style: none;
|
||||
gap: 1em;
|
||||
}
|
||||
|
||||
ul {
|
||||
a {
|
||||
color: var(--clr-ts-light);
|
||||
text-decoration: none;
|
||||
|
||||
&.active {
|
||||
text-decoration: underline;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user