chore: prettier sweep

apply prettier across entire codebase
This commit is contained in:
marshmallow 2024-05-07 11:06:11 +10:00
parent 5ec494391c
commit 610fa12723
20 changed files with 7666 additions and 7664 deletions

View file

@ -35,4 +35,3 @@ jobs:
- name: Check Nix Flake - name: Check Nix Flake
run: nix flake check run: nix flake check

View file

@ -1,9 +1,9 @@
import { defineConfig } from 'astro/config'; import { defineConfig } from "astro/config";
import tailwind from "@astrojs/tailwind"; import tailwind from "@astrojs/tailwind";
import react from "@astrojs/react"; import react from "@astrojs/react";
// https://astro.build/config // https://astro.build/config
export default defineConfig({ export default defineConfig({
integrations: [tailwind(), react()] integrations: [tailwind(), react()],
}); });

View file

@ -78,9 +78,7 @@
"inputs": { "inputs": {
"flake-compat": "flake-compat", "flake-compat": "flake-compat",
"flake-utils-plus": "flake-utils-plus", "flake-utils-plus": "flake-utils-plus",
"nixpkgs": [ "nixpkgs": ["nixpkgs"]
"nixpkgs"
]
}, },
"locked": { "locked": {
"lastModified": 1696432959, "lastModified": 1696432959,

View file

@ -12,7 +12,7 @@ in
src = lib.snowfall.fs.get-file "/"; src = lib.snowfall.fs.get-file "/";
npmDepsHash = "sha256-nNeFo6MF1Bn7Lypgtr/hgpm1lEbdmLR+6/krWH+8zCU="; npmDepsHash = "sha256-aFyw9ySIGQqcJZFuVrFrn7Ntm8nzjTZYnZ5X9d/TiiA=";
npmFlags = ["--ignore-scripts"]; npmFlags = ["--ignore-scripts"];

View file

@ -1,15 +1,17 @@
--- ---
interface Props {} interface Props {}
import { useTranslations } from '../i18n/utils'; import { useTranslations } from "../i18n/utils";
import { Image } from 'astro:assets'; import { Image } from "astro:assets";
import aux from '../../public/aux.svg'; import aux from "../../public/aux.svg";
const { lang } = Astro.params; const { lang } = Astro.params;
const translation = useTranslations(lang); 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"> <div class="flex items-center">
<a href="https://auxolotl.org" class="flex items-center text-lg gap-4"> <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" /> <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://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> <li><a href="https://github.com/auxolotl">GitHub</a></li>
</ul> </ul>
</nav> </nav>

View file

@ -1,5 +1,5 @@
--- ---
import { useTranslations } from '../../i18n/utils'; import { useTranslations } from "../../i18n/utils";
const { lang } = Astro.params; const { lang } = Astro.params;
const translation = useTranslations(lang); const translation = useTranslations(lang);
@ -43,5 +43,4 @@ const translation = useTranslations(lang);
</div> </div>
</section> </section>
<style> <style></style>
</style>

View file

@ -1,7 +1,7 @@
--- ---
import { useTranslations } from '../../i18n/utils'; import { useTranslations } from "../../i18n/utils";
import { Image } from 'astro:assets'; import { Image } from "astro:assets";
import aux from '../../../public/aux.svg'; import aux from "../../../public/aux.svg";
const { lang } = Astro.params; const { lang } = Astro.params;
const translation = useTranslations(lang); const translation = useTranslations(lang);

View file

@ -1,5 +1,5 @@
--- ---
import { useTranslations } from '../../i18n/utils'; import { useTranslations } from "../../i18n/utils";
const { lang } = Astro.params; const { lang } = Astro.params;
const translation = useTranslations(lang); const translation = useTranslations(lang);
@ -16,7 +16,7 @@ const translation = useTranslations(lang);
<p> <p>
{translation("roadmap.soft_fork.2")} {translation("roadmap.soft_fork.2")}
</p> </p>
</li> </p>
<li> <li>
<h3>{translation("roadmap.hard_fork.title")}</h3> <h3>{translation("roadmap.hard_fork.title")}</h3>
<p> <p>
@ -62,8 +62,8 @@ const translation = useTranslations(lang);
{translation("roadmap.alignment.2")} {translation("roadmap.alignment.2")}
</p> </p>
</li> </li>
</li>
</ol> </ol>
</section>
<style> <style></style>
</style> </section>

View file

@ -1,5 +1,5 @@
--- ---
import { useTranslations } from '../../i18n/utils'; import { useTranslations } from "../../i18n/utils";
const { lang } = Astro.params; const { lang } = Astro.params;
const translation = useTranslations(lang); const translation = useTranslations(lang);
@ -29,5 +29,4 @@ const translation = useTranslations(lang);
</p> </p>
</section> </section>
<style> <style></style>
</style>

View file

@ -1,10 +1,10 @@
import en from "../../public/locales/en/translations.json" import en from "../../public/locales/en/translations.json";
export const languages = { export const languages = {
en: 'English' en: "English",
}; };
export const defaultLang = 'en'; export const defaultLang = "en";
export const ui = { export const ui = {
en, en,

View file

@ -1,7 +1,7 @@
import { ui, defaultLang } from './ui'; import { ui, defaultLang } from "./ui";
export function useTranslations(lang: keyof typeof 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]; return ui[lang][key] || ui[defaultLang][key];
} };
} }

View file

@ -13,7 +13,10 @@ const { lang } = Astro.params;
<html lang={lang}> <html lang={lang}>
<head> <head>
<meta charset="UTF-8" /> <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" /> <meta name="viewport" content="width=device-width" />
<link rel="icon" type="image/svg+xml" href="/favicon.svg" /> <link rel="icon" type="image/svg+xml" href="/favicon.svg" />
<meta name="generator" content={Astro.generator} /> <meta name="generator" content={Astro.generator} />

View file

@ -4,9 +4,7 @@ import Layout from "../../layouts/Layout.astro";
import Home from "../../components/home/Home.astro"; import Home from "../../components/home/Home.astro";
export async function getStaticPaths() { export async function getStaticPaths() {
return Object.keys(languages).map((name) => ( return Object.keys(languages).map((name) => ({ params: { lang: name } }));
{ params: { lang: name } }
))
} }
--- ---

View file

@ -1,5 +1,5 @@
--- ---
import { defaultLang } from '../i18n/ui'; import { defaultLang } from "../i18n/ui";
--- ---
<meta http-equiv="refresh" content=`0;url=/${defaultLang}/` /> <meta http-equiv="refresh" content=`0;url=/${defaultLang}/` />