forked from auxolotl/website
chore: prettier sweep
apply prettier across entire codebase
This commit is contained in:
parent
5ec494391c
commit
610fa12723
51
.github/workflows/check.yml
vendored
51
.github/workflows/check.yml
vendored
|
@ -1,38 +1,37 @@
|
||||||
name: Check
|
name: Check
|
||||||
|
|
||||||
on:
|
on:
|
||||||
pull_request:
|
pull_request:
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- main
|
- main
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
prettier:
|
prettier:
|
||||||
name: Check Code Format
|
name: Check Code Format
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Install NPM dependencies
|
- name: Install NPM dependencies
|
||||||
run: npm ci
|
run: npm ci
|
||||||
|
|
||||||
- name: Check Prettier
|
- name: Check Prettier
|
||||||
run: npm run prettier:check:ci
|
run: npm run prettier:check:ci
|
||||||
nix:
|
nix:
|
||||||
name: Nix Build
|
name: Nix Build
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- uses: cachix/install-nix-action@v25
|
- uses: cachix/install-nix-action@v25
|
||||||
|
|
||||||
- name: Check Nix Build
|
- name: Check Nix Build
|
||||||
run: nix build
|
run: nix build
|
||||||
|
|
||||||
- name: Check Nix Flake
|
|
||||||
run: nix flake check
|
|
||||||
|
|
||||||
|
- name: Check Nix Flake
|
||||||
|
run: nix flake check
|
||||||
|
|
4
.vscode/extensions.json
vendored
4
.vscode/extensions.json
vendored
|
@ -1,4 +1,4 @@
|
||||||
{
|
{
|
||||||
"recommendations": ["astro-build.astro-vscode"],
|
"recommendations": ["astro-build.astro-vscode"],
|
||||||
"unwantedRecommendations": []
|
"unwantedRecommendations": []
|
||||||
}
|
}
|
||||||
|
|
18
.vscode/launch.json
vendored
18
.vscode/launch.json
vendored
|
@ -1,11 +1,11 @@
|
||||||
{
|
{
|
||||||
"version": "0.2.0",
|
"version": "0.2.0",
|
||||||
"configurations": [
|
"configurations": [
|
||||||
{
|
{
|
||||||
"command": "./node_modules/.bin/astro dev",
|
"command": "./node_modules/.bin/astro dev",
|
||||||
"name": "Development server",
|
"name": "Development server",
|
||||||
"request": "launch",
|
"request": "launch",
|
||||||
"type": "node-terminal"
|
"type": "node-terminal"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
|
@ -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()],
|
||||||
});
|
});
|
||||||
|
|
228
flake.lock
228
flake.lock
|
@ -1,117 +1,115 @@
|
||||||
{
|
{
|
||||||
"nodes": {
|
"nodes": {
|
||||||
"flake-compat": {
|
"flake-compat": {
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1650374568,
|
"lastModified": 1650374568,
|
||||||
"narHash": "sha256-Z+s0J8/r907g149rllvwhb4pKi8Wam5ij0st8PwAh+E=",
|
"narHash": "sha256-Z+s0J8/r907g149rllvwhb4pKi8Wam5ij0st8PwAh+E=",
|
||||||
"owner": "edolstra",
|
"owner": "edolstra",
|
||||||
"repo": "flake-compat",
|
"repo": "flake-compat",
|
||||||
"rev": "b4a34015c698c7793d592d66adbab377907a2be8",
|
"rev": "b4a34015c698c7793d592d66adbab377907a2be8",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"owner": "edolstra",
|
"owner": "edolstra",
|
||||||
"repo": "flake-compat",
|
"repo": "flake-compat",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"flake-utils": {
|
"flake-utils": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"systems": "systems"
|
"systems": "systems"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1694529238,
|
"lastModified": 1694529238,
|
||||||
"narHash": "sha256-zsNZZGTGnMOf9YpHKJqMSsa0dXbfmxeoJ7xHlrt+xmY=",
|
"narHash": "sha256-zsNZZGTGnMOf9YpHKJqMSsa0dXbfmxeoJ7xHlrt+xmY=",
|
||||||
"owner": "numtide",
|
"owner": "numtide",
|
||||||
"repo": "flake-utils",
|
"repo": "flake-utils",
|
||||||
"rev": "ff7b65b44d01cf9ba6a71320833626af21126384",
|
"rev": "ff7b65b44d01cf9ba6a71320833626af21126384",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"owner": "numtide",
|
"owner": "numtide",
|
||||||
"repo": "flake-utils",
|
"repo": "flake-utils",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"flake-utils-plus": {
|
"flake-utils-plus": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"flake-utils": "flake-utils"
|
"flake-utils": "flake-utils"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1696331477,
|
"lastModified": 1696331477,
|
||||||
"narHash": "sha256-YkbRa/1wQWdWkVJ01JvV+75KIdM37UErqKgTf0L54Fk=",
|
"narHash": "sha256-YkbRa/1wQWdWkVJ01JvV+75KIdM37UErqKgTf0L54Fk=",
|
||||||
"owner": "gytis-ivaskevicius",
|
"owner": "gytis-ivaskevicius",
|
||||||
"repo": "flake-utils-plus",
|
"repo": "flake-utils-plus",
|
||||||
"rev": "bfc53579db89de750b25b0c5e7af299e0c06d7d3",
|
"rev": "bfc53579db89de750b25b0c5e7af299e0c06d7d3",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"owner": "gytis-ivaskevicius",
|
"owner": "gytis-ivaskevicius",
|
||||||
"repo": "flake-utils-plus",
|
"repo": "flake-utils-plus",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1715023704,
|
"lastModified": 1715023704,
|
||||||
"narHash": "sha256-nf72zOUuXkqN4arcQsngR19KkaQa3cDPtaSJLT8XUWY=",
|
"narHash": "sha256-nf72zOUuXkqN4arcQsngR19KkaQa3cDPtaSJLT8XUWY=",
|
||||||
"owner": "auxolotl",
|
"owner": "auxolotl",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "b0fec4b7a197c6d553d353fbe4a1b6105689187c",
|
"rev": "b0fec4b7a197c6d553d353fbe4a1b6105689187c",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"owner": "auxolotl",
|
"owner": "auxolotl",
|
||||||
"ref": "nixos-unstable",
|
"ref": "nixos-unstable",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"root": {
|
"root": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"nixpkgs": "nixpkgs",
|
"nixpkgs": "nixpkgs",
|
||||||
"snowfall-lib": "snowfall-lib"
|
"snowfall-lib": "snowfall-lib"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"snowfall-lib": {
|
"snowfall-lib": {
|
||||||
"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": {
|
||||||
},
|
"lastModified": 1696432959,
|
||||||
"locked": {
|
"narHash": "sha256-oJQZv2MYyJaVyVJY5IeevzqpGvMGKu5pZcCCJvb+xjc=",
|
||||||
"lastModified": 1696432959,
|
"owner": "snowfallorg",
|
||||||
"narHash": "sha256-oJQZv2MYyJaVyVJY5IeevzqpGvMGKu5pZcCCJvb+xjc=",
|
"repo": "lib",
|
||||||
"owner": "snowfallorg",
|
"rev": "92803a029b5314d4436a8d9311d8707b71d9f0b6",
|
||||||
"repo": "lib",
|
"type": "github"
|
||||||
"rev": "92803a029b5314d4436a8d9311d8707b71d9f0b6",
|
},
|
||||||
"type": "github"
|
"original": {
|
||||||
},
|
"owner": "snowfallorg",
|
||||||
"original": {
|
"repo": "lib",
|
||||||
"owner": "snowfallorg",
|
"type": "github"
|
||||||
"repo": "lib",
|
}
|
||||||
"type": "github"
|
},
|
||||||
}
|
"systems": {
|
||||||
},
|
"locked": {
|
||||||
"systems": {
|
"lastModified": 1681028828,
|
||||||
"locked": {
|
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
|
||||||
"lastModified": 1681028828,
|
"owner": "nix-systems",
|
||||||
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
|
"repo": "default",
|
||||||
"owner": "nix-systems",
|
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
|
||||||
"repo": "default",
|
"type": "github"
|
||||||
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
|
},
|
||||||
"type": "github"
|
"original": {
|
||||||
},
|
"owner": "nix-systems",
|
||||||
"original": {
|
"repo": "default",
|
||||||
"owner": "nix-systems",
|
"type": "github"
|
||||||
"repo": "default",
|
}
|
||||||
"type": "github"
|
}
|
||||||
}
|
},
|
||||||
}
|
"root": "root",
|
||||||
},
|
"version": 7
|
||||||
"root": "root",
|
|
||||||
"version": 7
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -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"];
|
||||||
|
|
||||||
|
|
14780
package-lock.json
generated
14780
package-lock.json
generated
File diff suppressed because it is too large
Load diff
60
package.json
60
package.json
|
@ -1,32 +1,32 @@
|
||||||
{
|
{
|
||||||
"name": "website",
|
"name": "website",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"version": "0.0.1",
|
"version": "0.0.1",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "astro dev",
|
"dev": "astro dev",
|
||||||
"start": "astro dev",
|
"start": "astro dev",
|
||||||
"build": "astro check && astro build",
|
"build": "astro check && astro build",
|
||||||
"preview": "astro preview",
|
"preview": "astro preview",
|
||||||
"astro": "astro",
|
"astro": "astro",
|
||||||
"prettier:check:ci": "prettier . --check",
|
"prettier:check:ci": "prettier . --check",
|
||||||
"prettier:format": "prettier . --write"
|
"prettier:format": "prettier . --write"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@astrojs/check": "^0.5.10",
|
"@astrojs/check": "^0.5.10",
|
||||||
"@astrojs/react": "^3.3.1",
|
"@astrojs/react": "^3.3.1",
|
||||||
"@astrojs/tailwind": "^5.1.0",
|
"@astrojs/tailwind": "^5.1.0",
|
||||||
"@types/react": "^18.3.1",
|
"@types/react": "^18.3.1",
|
||||||
"@types/react-dom": "^18.3.0",
|
"@types/react-dom": "^18.3.0",
|
||||||
"astro": "^4.7.0",
|
"astro": "^4.7.0",
|
||||||
"react": "^18.3.1",
|
"react": "^18.3.1",
|
||||||
"react-dom": "^18.3.1",
|
"react-dom": "^18.3.1",
|
||||||
"tailwindcss": "^3.4.3",
|
"tailwindcss": "^3.4.3",
|
||||||
"typescript": "^5.4.5"
|
"typescript": "^5.4.5"
|
||||||
},
|
},
|
||||||
"license": "GPL-3.0-or-later",
|
"license": "GPL-3.0-or-later",
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@tailwindcss/typography": "^0.5.13",
|
"@tailwindcss/typography": "^0.5.13",
|
||||||
"prettier": "^3.2.5",
|
"prettier": "^3.2.5",
|
||||||
"prettier-plugin-astro": "^0.13.0"
|
"prettier-plugin-astro": "^0.13.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -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" />
|
||||||
|
@ -19,12 +21,16 @@ const translation = useTranslations(lang);
|
||||||
|
|
||||||
<nav>
|
<nav>
|
||||||
<ul class="flex gap-4 items-center h-full">
|
<ul class="flex gap-4 items-center h-full">
|
||||||
<!--
|
<!--
|
||||||
<li><a href="https://auxolotl.org/contribute">Contribute</a></li>
|
<li><a href="https://auxolotl.org/contribute">Contribute</a></li>
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<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>
|
||||||
|
|
|
@ -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>
|
|
||||||
|
|
|
@ -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);
|
||||||
|
|
|
@ -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);
|
||||||
|
@ -13,57 +13,57 @@ const translation = useTranslations(lang);
|
||||||
<h3>{translation("roadmap.soft_fork.title")}</h3>
|
<h3>{translation("roadmap.soft_fork.title")}</h3>
|
||||||
<p>
|
<p>
|
||||||
{translation("roadmap.soft_fork.1")}
|
{translation("roadmap.soft_fork.1")}
|
||||||
<p>
|
<p>
|
||||||
{translation("roadmap.soft_fork.2")}
|
{translation("roadmap.soft_fork.2")}
|
||||||
</p>
|
</p>
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<h3>{translation("roadmap.hard_fork.title")}</h3>
|
|
||||||
<p>
|
|
||||||
{translation("roadmap.hard_fork.1")}
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
{translation("roadmap.hard_fork.2")}
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
{translation("roadmap.hard_fork.3")}
|
|
||||||
</p>
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<h3>{translation("roadmap.organization.title")}</h3>
|
|
||||||
<p>
|
|
||||||
{translation("roadmap.organization.1")}
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
{translation("roadmap.organization.2")}
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
{translation("roadmap.organization.3")}
|
|
||||||
</p>
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<h3>{translation("roadmap.infra.title")}</h3>
|
|
||||||
<p>
|
|
||||||
{translation("roadmap.infra.1")}
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
{translation("roadmap.infra.2")}
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
{translation("roadmap.infra.3")}
|
|
||||||
</p>
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<h3>{translation("roadmap.alignment.title")}</h3>
|
|
||||||
<p>
|
|
||||||
{translation("roadmap.alignment.1")}
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
{translation("roadmap.alignment.2")}
|
|
||||||
</p>
|
</p>
|
||||||
|
<li>
|
||||||
|
<h3>{translation("roadmap.hard_fork.title")}</h3>
|
||||||
|
<p>
|
||||||
|
{translation("roadmap.hard_fork.1")}
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
{translation("roadmap.hard_fork.2")}
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
{translation("roadmap.hard_fork.3")}
|
||||||
|
</p>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<h3>{translation("roadmap.organization.title")}</h3>
|
||||||
|
<p>
|
||||||
|
{translation("roadmap.organization.1")}
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
{translation("roadmap.organization.2")}
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
{translation("roadmap.organization.3")}
|
||||||
|
</p>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<h3>{translation("roadmap.infra.title")}</h3>
|
||||||
|
<p>
|
||||||
|
{translation("roadmap.infra.1")}
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
{translation("roadmap.infra.2")}
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
{translation("roadmap.infra.3")}
|
||||||
|
</p>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<h3>{translation("roadmap.alignment.title")}</h3>
|
||||||
|
<p>
|
||||||
|
{translation("roadmap.alignment.1")}
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
{translation("roadmap.alignment.2")}
|
||||||
|
</p>
|
||||||
|
</li>
|
||||||
</li>
|
</li>
|
||||||
</ol>
|
</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 { 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>
|
|
||||||
|
|
|
@ -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,
|
||||||
|
|
|
@ -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];
|
||||||
}
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -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} />
|
||||||
|
|
|
@ -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 } }
|
|
||||||
))
|
|
||||||
}
|
}
|
||||||
---
|
---
|
||||||
|
|
||||||
|
|
|
@ -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}/` />
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
/** @type {import('tailwindcss').Config} */
|
/** @type {import('tailwindcss').Config} */
|
||||||
export default {
|
export default {
|
||||||
content: ["./src/**/*.{astro,html,js,jsx,md,mdx,svelte,ts,tsx,vue}"],
|
content: ["./src/**/*.{astro,html,js,jsx,md,mdx,svelte,ts,tsx,vue}"],
|
||||||
theme: {
|
theme: {
|
||||||
extend: {},
|
extend: {},
|
||||||
},
|
},
|
||||||
plugins: [require("@tailwindcss/typography")],
|
plugins: [require("@tailwindcss/typography")],
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
"extends": "astro/tsconfigs/strict",
|
"extends": "astro/tsconfigs/strict",
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"jsx": "react-jsx",
|
"jsx": "react-jsx",
|
||||||
"jsxImportSource": "react"
|
"jsxImportSource": "react"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue