forked from auxolotl/website
chore: prettier sweep
apply prettier across entire codebase
This commit is contained in:
parent
5ec494391c
commit
610fa12723
1
.github/workflows/check.yml
vendored
1
.github/workflows/check.yml
vendored
|
@ -35,4 +35,3 @@ jobs:
|
|||
|
||||
- name: Check Nix Flake
|
||||
run: nix flake check
|
||||
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
import { defineConfig } from 'astro/config';
|
||||
import { defineConfig } from "astro/config";
|
||||
|
||||
import tailwind from "@astrojs/tailwind";
|
||||
import react from "@astrojs/react";
|
||||
|
||||
// https://astro.build/config
|
||||
export default defineConfig({
|
||||
integrations: [tailwind(), react()]
|
||||
integrations: [tailwind(), react()],
|
||||
});
|
|
@ -78,9 +78,7 @@
|
|||
"inputs": {
|
||||
"flake-compat": "flake-compat",
|
||||
"flake-utils-plus": "flake-utils-plus",
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
]
|
||||
"nixpkgs": ["nixpkgs"]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1696432959,
|
||||
|
|
|
@ -12,7 +12,7 @@ in
|
|||
|
||||
src = lib.snowfall.fs.get-file "/";
|
||||
|
||||
npmDepsHash = "sha256-nNeFo6MF1Bn7Lypgtr/hgpm1lEbdmLR+6/krWH+8zCU=";
|
||||
npmDepsHash = "sha256-aFyw9ySIGQqcJZFuVrFrn7Ntm8nzjTZYnZ5X9d/TiiA=";
|
||||
|
||||
npmFlags = ["--ignore-scripts"];
|
||||
|
||||
|
|
|
@ -1,15 +1,17 @@
|
|||
---
|
||||
interface Props {}
|
||||
|
||||
import { useTranslations } from '../i18n/utils';
|
||||
import { Image } from 'astro:assets';
|
||||
import aux from '../../public/aux.svg';
|
||||
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">
|
||||
<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" />
|
||||
|
@ -24,7 +26,11 @@ const translation = useTranslations(lang);
|
|||
-->
|
||||
|
||||
<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://forum.aux.computer"
|
||||
>{translation("header.community")}</a
|
||||
>
|
||||
</li>
|
||||
<li><a href="https://github.com/auxolotl">GitHub</a></li>
|
||||
</ul>
|
||||
</nav>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
---
|
||||
import { useTranslations } from '../../i18n/utils';
|
||||
import { useTranslations } from "../../i18n/utils";
|
||||
|
||||
const { lang } = Astro.params;
|
||||
const translation = useTranslations(lang);
|
||||
|
@ -43,5 +43,4 @@ const translation = useTranslations(lang);
|
|||
</div>
|
||||
</section>
|
||||
|
||||
<style>
|
||||
</style>
|
||||
<style></style>
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
---
|
||||
import { useTranslations } from '../../i18n/utils';
|
||||
import { Image } from 'astro:assets';
|
||||
import aux from '../../../public/aux.svg';
|
||||
import { useTranslations } from "../../i18n/utils";
|
||||
import { Image } from "astro:assets";
|
||||
import aux from "../../../public/aux.svg";
|
||||
|
||||
const { lang } = Astro.params;
|
||||
const translation = useTranslations(lang);
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
---
|
||||
import { useTranslations } from '../../i18n/utils';
|
||||
import { useTranslations } from "../../i18n/utils";
|
||||
|
||||
const { lang } = Astro.params;
|
||||
const translation = useTranslations(lang);
|
||||
|
@ -16,7 +16,7 @@ const translation = useTranslations(lang);
|
|||
<p>
|
||||
{translation("roadmap.soft_fork.2")}
|
||||
</p>
|
||||
</li>
|
||||
</p>
|
||||
<li>
|
||||
<h3>{translation("roadmap.hard_fork.title")}</h3>
|
||||
<p>
|
||||
|
@ -62,8 +62,8 @@ const translation = useTranslations(lang);
|
|||
{translation("roadmap.alignment.2")}
|
||||
</p>
|
||||
</li>
|
||||
</li>
|
||||
</ol>
|
||||
</section>
|
||||
|
||||
<style>
|
||||
</style>
|
||||
<style></style>
|
||||
</section>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
---
|
||||
import { useTranslations } from '../../i18n/utils';
|
||||
import { useTranslations } from "../../i18n/utils";
|
||||
|
||||
const { lang } = Astro.params;
|
||||
const translation = useTranslations(lang);
|
||||
|
@ -29,5 +29,4 @@ const translation = useTranslations(lang);
|
|||
</p>
|
||||
</section>
|
||||
|
||||
<style>
|
||||
</style>
|
||||
<style></style>
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
import en from "../../public/locales/en/translations.json"
|
||||
import en from "../../public/locales/en/translations.json";
|
||||
|
||||
export const languages = {
|
||||
en: 'English'
|
||||
en: "English",
|
||||
};
|
||||
|
||||
export const defaultLang = 'en';
|
||||
export const defaultLang = "en";
|
||||
|
||||
export const ui = {
|
||||
en,
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import { ui, defaultLang } from './ui';
|
||||
import { ui, defaultLang } from "./ui";
|
||||
|
||||
export function useTranslations(lang: keyof typeof ui) {
|
||||
return function t(key: keyof typeof ui[typeof defaultLang]) {
|
||||
return function t(key: keyof (typeof ui)[typeof defaultLang]) {
|
||||
return ui[lang][key] || ui[defaultLang][key];
|
||||
}
|
||||
};
|
||||
}
|
||||
|
|
|
@ -13,7 +13,10 @@ const { lang } = Astro.params;
|
|||
<html lang={lang}>
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<meta name="description" content="An alternative to the Nix ecosystem." />
|
||||
<meta
|
||||
name="description"
|
||||
content="An alternative to the Nix ecosystem."
|
||||
/>
|
||||
<meta name="viewport" content="width=device-width" />
|
||||
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
|
||||
<meta name="generator" content={Astro.generator} />
|
||||
|
|
|
@ -4,9 +4,7 @@ import Layout from "../../layouts/Layout.astro";
|
|||
import Home from "../../components/home/Home.astro";
|
||||
|
||||
export async function getStaticPaths() {
|
||||
return Object.keys(languages).map((name) => (
|
||||
{ params: { lang: name } }
|
||||
))
|
||||
return Object.keys(languages).map((name) => ({ params: { lang: name } }));
|
||||
}
|
||||
---
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
---
|
||||
import { defaultLang } from '../i18n/ui';
|
||||
import { defaultLang } from "../i18n/ui";
|
||||
---
|
||||
|
||||
<meta http-equiv="refresh" content=`0;url=/${defaultLang}/` />
|
||||
|
|
Loading…
Reference in a new issue