Skip to content

Commit

Permalink
Add patches for site redirection
Browse files Browse the repository at this point in the history
  • Loading branch information
DamitusThyYeetus123 committed Dec 3, 2024
1 parent 0841057 commit 6089aad
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 11 deletions.
2 changes: 0 additions & 2 deletions astro.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,5 @@ import tailwind from "@astrojs/tailwind";

// https://astro.build/config
export default defineConfig({
site: "https://the-unnamed-nug.github.io",
base: "/sherpa",
integrations: [tailwind()],
});
22 changes: 14 additions & 8 deletions src/components/Navbar.astro
Original file line number Diff line number Diff line change
Expand Up @@ -6,29 +6,35 @@ import Spacer from "./Spacer.astro";
import { getLangFromUrl, useTranslations } from "../i18n/utils";
const lang = getLangFromUrl(Astro.url);
const origin = Astro.url.origin;
import { siteLink } from "@utils/links";
---

<div
class="flex flex-row flex-wrap my-1 mx-20 p-3 justify-between items-center"
>
<div class="flex justify-self-start">
<a href={siteLink(`/${lang}/`)} class="text-2xl">Sherpa</a>
<a href={origin + siteLink(`${lang}/`)} class="text-2xl">Sherpa</a>
<div></div>
</div>
<div
class="flex justify-self-end justify-end flex-row items-center space-x-4"
>
<div class="text-md justify-between space-x-2">
<a href={siteLink(`/${lang}/`)} class="hover:text-theme-accent1">Home</a>
<a href={siteLink(`/${lang}/preface/`)} class="hover:text-theme-accent1"
>Preface</a
<a href={origin + siteLink(`${lang}/`)} class="hover:text-theme-accent1"
>Home</a
>
<a href={siteLink(`/${lang}/why-nixos/`)} class="hover:text-theme-accent1"
>Why NixOS?</a
<a
href={origin + siteLink(`${lang}/preface/`)}
class="hover:text-theme-accent1">Preface</a
>
<a href={siteLink(`/${lang}/docs/`)} class="hover:text-theme-accent1"
>Get Started</a
<a
href={origin + siteLink(`${lang}/why-nixos/`)}
class="hover:text-theme-accent1">Why NixOS?</a
>
<a
href={origin + siteLink(`${lang}/docs/`)}
class="hover:text-theme-accent1">Get Started</a
>
</div>
<Spacer />
Expand Down
1 change: 0 additions & 1 deletion src/utils/links.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
const siteLink = (path: string) => `${import.meta.env.BASE_URL}${path}`;

export { siteLink };

0 comments on commit 6089aad

Please sign in to comment.