Skip to content

Commit 0073efc

Browse files
authored
feat: i18n integration (#7)
1 parent 811b44a commit 0073efc

File tree

4 files changed

+184
-101
lines changed

4 files changed

+184
-101
lines changed

astro.config.mjs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,11 @@ import tailwind from "@astrojs/tailwind"
55
// https://astro.build/config
66
export default defineConfig({
77
integrations: [tailwind()],
8+
i18n: {
9+
locales: ["en", "ru"],
10+
defaultLocale: "en",
11+
routing: {
12+
prefixDefaultLocale: true,
13+
},
14+
},
815
})

src/pages/en/index.astro

Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
---
2+
import Button from "../../components/Button.astro"
3+
import Logo from "../../components/Logo.astro"
4+
import Default from "../../layouts/Default.astro"
5+
---
6+
7+
<Default>
8+
<div class="flex h-full flex-col justify-center gap-2">
9+
<div class="flex w-full flex-col">
10+
<div class="flex w-full flex-col gap-2 border-b bg-gradient-to-bl from-black to-brand-purple-dark p-8">
11+
<span class="flex flex-row items-center gap-2 text-4xl font-bold">Vital<Logo type="vital" /></span>
12+
<span
13+
>Vital is a modpack designed as an alternative to Essential (and OptiFine). It includes the majority of
14+
Essential and OptiFine's features, including but not limited to: world hosting, cosmetics, many resource pack
15+
features, shaders, and a major improvement in rendering and logic performance.</span
16+
>
17+
<div class="flex flex-row flex-wrap items-center gap-2">
18+
<Button to="https://modrinth.com/modpack/vital/" external={true} showIcon={true}> Modrinth </Button>
19+
<Button to="https://github.com/intergrav/vital/" external={true} showIcon={true}> GitHub </Button>
20+
</div>
21+
</div>
22+
<div class="flex w-full flex-col gap-2 border-b bg-gradient-to-bl from-black to-brand-blue-dark p-8">
23+
<span class="flex flex-row items-center gap-2 text-4xl font-bold">NotEssential<Logo type="ne" /></span>
24+
<span>NotEssential is a website which links to mods that can substitute Essential's features.</span>
25+
26+
<div class="flex flex-row flex-wrap items-center gap-2">
27+
<Button to="https://notessential.blurry.gay/" classList="bg-brand-blue" external={true} showIcon={true}>
28+
Visit
29+
</Button>
30+
<Button
31+
to="https://usevital.github.io/notessential-gallery/"
32+
classList="bg-brand-blue"
33+
external={true}
34+
showIcon={true}>
35+
Gallery
36+
</Button>
37+
<Button
38+
to="https://github.com/usevital/notessential"
39+
classList="bg-brand-blue"
40+
external={true}
41+
showIcon={true}>
42+
GitHub
43+
</Button>
44+
</div>
45+
</div>
46+
<div class="grid w-full grid-cols-1 border-b md:grid-cols-2">
47+
<div
48+
class="flex w-full flex-col gap-2 bg-gradient-to-bl from-brand-background-secondary to-brand-green-dark p-8">
49+
<span class="flex flex-row items-center gap-2 text-4xl font-bold">Ward<Logo type="ward" /></span>
50+
<span>Ward is a simple text manipulator for the web. Made to do silly translations for NotEssential.</span>
51+
<div class="flex flex-row flex-wrap items-center gap-2">
52+
<Button to="https://ward.worldwidepixel.ca" classList="bg-brand-green" external={true} showIcon={true}>
53+
Visit
54+
</Button>
55+
<Button to="https://github.com/usevital/ward" classList="bg-brand-green" external={true} showIcon={true}>
56+
GitHub
57+
</Button>
58+
</div>
59+
</div>
60+
<div class="flex w-full flex-col gap-2 border-l bg-gradient-to-bl from-black to-cyan-900 p-8">
61+
<span class="flex flex-row items-center gap-2 text-4xl font-bold"
62+
>Translator<Logo fill={true} type="ward" /></span
63+
>
64+
<span>A Python script that can help you convert and manipulate your text in many different ways.</span>
65+
<div class="flex flex-row flex-wrap items-center gap-2">
66+
<Button
67+
to="https://github.com/usevital/translator/releases"
68+
classList="bg-cyan-700"
69+
external={true}
70+
showIcon={true}>
71+
Releases
72+
</Button>
73+
<Button to="https://github.com/usevital/translator" classList="bg-cyan-700" external={true} showIcon={true}>
74+
GitHub
75+
</Button>
76+
</div>
77+
</div>
78+
</div>
79+
<div class="flex w-full flex-col gap-2 border-b bg-gradient-to-bl from-black to-brand-rose-dark p-8">
80+
<span class="flex flex-row items-center gap-2 text-4xl font-bold">Bulb<Logo type="bulb" /></span>
81+
<span>Bulb is a work in progress. Watch this space.</span>
82+
</div>
83+
</div>
84+
</div>
85+
</Default>

src/pages/index.astro

Lines changed: 2 additions & 101 deletions
Original file line numberDiff line numberDiff line change
@@ -1,106 +1,7 @@
11
---
2-
import Button from "../components/Button.astro";
3-
import Logo from "../components/Logo.astro";
4-
import VitalLink from "../components/VitalLink.astro";
5-
import Default from "../layouts/Default.astro";
2+
import Default from "../layouts/Default.astro"
63
---
74

85
<Default>
9-
<div class="flex h-full flex-col justify-center gap-2">
10-
<div class="flex w-full flex-col">
11-
<div class="flex w-full flex-col gap-2 border-b bg-gradient-to-bl from-black to-brand-purple-dark p-8">
12-
<span class="flex flex-row items-center gap-2 text-4xl font-bold">Vital<Logo type="vital" /></span>
13-
<span
14-
>Vital is a modpack designed as an alternative to Essential (and OptiFine). It includes the majority
15-
of Essential and OptiFine's features, including but not limited to: world hosting, cosmetics, many
16-
resource pack features, shaders, and a major improvement in rendering and logic performance.</span
17-
>
18-
<div class="flex flex-row flex-wrap items-center gap-2">
19-
<Button to="https://modrinth.com/modpack/vital/" external={true} showIcon={true}> Modrinth </Button>
20-
<Button to="https://github.com/intergrav/vital/" external={true} showIcon={true}> GitHub </Button>
21-
</div>
22-
</div>
23-
<div class="flex w-full flex-col gap-2 border-b bg-gradient-to-bl from-black to-brand-blue-dark p-8">
24-
<span class="flex flex-row items-center gap-2 text-4xl font-bold">NotEssential<Logo type="ne" /></span>
25-
<span>NotEssential is a website which links to mods that can substitute Essential's features.</span>
26-
27-
<div class="flex flex-row flex-wrap items-center gap-2">
28-
<Button
29-
to="https://notessential.blurry.gay/"
30-
classList="bg-brand-blue"
31-
external={true}
32-
showIcon={true}>
33-
Visit
34-
</Button>
35-
<Button
36-
to="https://usevital.github.io/notessential-gallery/"
37-
classList="bg-brand-blue"
38-
external={true}
39-
showIcon={true}>
40-
Gallery
41-
</Button>
42-
<Button
43-
to="https://github.com/usevital/notessential"
44-
classList="bg-brand-blue"
45-
external={true}
46-
showIcon={true}>
47-
GitHub
48-
</Button>
49-
</div>
50-
</div>
51-
<div class="grid w-full grid-cols-1 border-b md:grid-cols-2">
52-
<div
53-
class="flex w-full flex-col gap-2 bg-gradient-to-bl from-brand-background-secondary to-brand-green-dark p-8">
54-
<span class="flex flex-row items-center gap-2 text-4xl font-bold">Ward<Logo type="ward" /></span>
55-
<span
56-
>Ward is a simple text manipulator for the web. Made to do silly translations for NotEssential.</span
57-
>
58-
<div class="flex flex-row flex-wrap items-center gap-2">
59-
<Button
60-
to="https://ward.worldwidepixel.ca"
61-
classList="bg-brand-green"
62-
external={true}
63-
showIcon={true}>
64-
Visit
65-
</Button>
66-
<Button
67-
to="https://github.com/usevital/ward"
68-
classList="bg-brand-green"
69-
external={true}
70-
showIcon={true}>
71-
GitHub
72-
</Button>
73-
</div>
74-
</div>
75-
<div class="flex w-full flex-col gap-2 border-l bg-gradient-to-bl from-black to-cyan-900 p-8">
76-
<span class="flex flex-row items-center gap-2 text-4xl font-bold"
77-
>Translator<Logo fill={true} type="ward" /></span
78-
>
79-
<span
80-
>A Python script that can help you convert and manipulate your text in many different ways.</span
81-
>
82-
<div class="flex flex-row flex-wrap items-center gap-2">
83-
<Button
84-
to="https://github.com/usevital/translator"
85-
classList="bg-cyan-700"
86-
external={true}
87-
showIcon={true}>
88-
GitHub
89-
</Button>
90-
<Button
91-
to="https://github.com/usevital/translator/releases"
92-
classList="bg-cyan-700"
93-
external={true}
94-
showIcon={true}>
95-
Releases
96-
</Button>
97-
</div>
98-
</div>
99-
</div>
100-
<div class="flex w-full flex-col gap-2 border-b bg-gradient-to-bl from-black to-brand-rose-dark p-8">
101-
<span class="flex flex-row items-center gap-2 text-4xl font-bold">Bulb<Logo type="bulb" /></span>
102-
<span>Bulb is a work in progress. Watch this space.</span>
103-
</div>
104-
</div>
105-
</div>
6+
<h1 style="font-size: 1.2em;">You shouldn't really see this page.</h1>
1067
</Default>

src/pages/ru/index.astro

Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
---
2+
import Button from "../../components/Button.astro"
3+
import Logo from "../../components/Logo.astro"
4+
import Default from "../../layouts/Default.astro"
5+
---
6+
7+
<Default>
8+
<div class="flex h-full flex-col justify-center gap-2">
9+
<div class="flex w-full flex-col">
10+
<div class="flex w-full flex-col gap-2 border-b bg-gradient-to-bl from-black to-brand-purple-dark p-8">
11+
<span class="flex flex-row items-center gap-2 text-4xl font-bold">Vital<Logo type="vital" /></span>
12+
<span
13+
>Vital - это модпак, который был разработан как альтернатива Essential (и OptiFine). Он содержит большинство
14+
функций Essential и OptiFine, включая, но не ограничиваясь ими: хостинг мира, косметика, множество ресурсных
15+
пакетов шейдеров и значительное улучшение рендеринга и производительности логики.</span
16+
>
17+
<div class="flex flex-row flex-wrap items-center gap-2">
18+
<Button to="https://modrinth.com/modpack/vital/" external={true} showIcon={true}> Modrinth </Button>
19+
<Button to="https://github.com/intergrav/vital/" external={true} showIcon={true}> GitHub </Button>
20+
</div>
21+
</div>
22+
<div class="flex w-full flex-col gap-2 border-b bg-gradient-to-bl from-black to-brand-blue-dark p-8">
23+
<span class="flex flex-row items-center gap-2 text-4xl font-bold">NotEssential<Logo type="ne" /></span>
24+
<span>NotEssential - это сайт, на котором размещены ссылки на моды, заменяющие функции Essential.</span>
25+
26+
<div class="flex flex-row flex-wrap items-center gap-2">
27+
<Button to="https://notessential.blurry.gay/" classList="bg-brand-blue" external={true} showIcon={true}>
28+
Посетить
29+
</Button>
30+
<Button
31+
to="https://usevital.github.io/notessential-gallery/"
32+
classList="bg-brand-blue"
33+
external={true}
34+
showIcon={true}>
35+
Галерея
36+
</Button>
37+
<Button
38+
to="https://github.com/usevital/notessential"
39+
classList="bg-brand-blue"
40+
external={true}
41+
showIcon={true}>
42+
GitHub
43+
</Button>
44+
</div>
45+
</div>
46+
<div class="grid w-full grid-cols-1 border-b md:grid-cols-2">
47+
<div
48+
class="flex w-full flex-col gap-2 bg-gradient-to-bl from-brand-background-secondary to-brand-green-dark p-8">
49+
<span class="flex flex-row items-center gap-2 text-4xl font-bold">Ward<Logo type="ward" /></span>
50+
<span
51+
>Ward - это простой текстовый манипулятор для веб. Создан для того, чтобы делать глупые переводы для
52+
NotEssential.</span
53+
>
54+
<div class="flex flex-row flex-wrap items-center gap-2">
55+
<Button to="https://ward.worldwidepixel.ca" classList="bg-brand-green" external={true} showIcon={true}>
56+
Посетить
57+
</Button>
58+
<Button to="https://github.com/usevital/ward" classList="bg-brand-green" external={true} showIcon={true}>
59+
GitHub
60+
</Button>
61+
</div>
62+
</div>
63+
<div class="flex w-full flex-col gap-2 border-l bg-gradient-to-bl from-black to-cyan-900 p-8">
64+
<span class="flex flex-row items-center gap-2 text-4xl font-bold"
65+
>Translator<Logo fill={true} type="ward" /></span
66+
>
67+
<span
68+
>Скрипт на языке Python, который поможет вам конвертировать и манипулировать текстом различными способами.</span
69+
>
70+
<div class="flex flex-row flex-wrap items-center gap-2">
71+
<Button
72+
to="https://github.com/usevital/translator/releases"
73+
classList="bg-cyan-700"
74+
external={true}
75+
showIcon={true}>
76+
Релизы
77+
</Button>
78+
<Button to="https://github.com/usevital/translator" classList="bg-cyan-700" external={true} showIcon={true}>
79+
GitHub
80+
</Button>
81+
</div>
82+
</div>
83+
</div>
84+
<div class="flex w-full flex-col gap-2 border-b bg-gradient-to-bl from-black to-brand-rose-dark p-8">
85+
<span class="flex flex-row items-center gap-2 text-4xl font-bold">Bulb<Logo type="bulb" /></span>
86+
<span>Bulb находится в стадии разработки. Следите на новостями.</span>
87+
</div>
88+
</div>
89+
</div>
90+
</Default>

0 commit comments

Comments
 (0)