Dieser Commit ist enthalten in:
Chaoscaot 2023-12-15 16:11:33 +01:00
Ursprung a72dd2124d
Commit 643db90b15
10 geänderte Dateien mit 408 neuen und 385 gelöschten Zeilen

Datei anzeigen

@ -1,5 +1,5 @@
import type { AstroIntegration } from "astro"; import type { AstroIntegration } from "astro";
import { mkdir, access, constants, copyFile } from 'node:fs/promises' import { mkdir, access, constants, copyFile, rename } from 'node:fs/promises'
const locales = ["de"]; const locales = ["de"];
@ -20,8 +20,11 @@ export default function configureI18n(): AstroIntegration {
await mkdir(cutPrefix(newPath), {recursive: true}); await mkdir(cutPrefix(newPath), {recursive: true});
} }
await copyFile(`${cutPrefix(oldPath)}index.html`, `${cutPrefix(newPath)}index.${locale}.html`) await copyFile(`${cutPrefix(oldPath)}index.html`, `${cutPrefix(newPath)}index.html.${locale}`)
logger.info(`Copied ${oldPath}index.html to ${newPath}index.${locale}.html`) logger.info(`Copied ${oldPath}index.html to ${newPath}index.html.${locale}`)
} else {
let oldPath = cutPrefix(`${dir.pathname}${page.pathname}`)
await rename(`${oldPath}index.html`, `${oldPath}index.html.en`)
} }
} }
} }

Datei anzeigen

@ -33,5 +33,4 @@ export default defineConfig({
disallow: ["/admin", "/login", "/dashboard", "/de", "/_astro"] disallow: ["/admin", "/login", "/dashboard", "/de", "/_astro"]
}] }]
})], })],
vite: {}
}); });

Datei anzeigen

@ -18,14 +18,15 @@
"ci": "pnpm run clean:dist && pnpm install && pnpm run i18n:sync && pnpm run build && pnpm run package" "ci": "pnpm run clean:dist && pnpm install && pnpm run i18n:sync && pnpm run build && pnpm run package"
}, },
"devDependencies": { "devDependencies": {
"@astrojs/svelte": "^5.0.0", "@astrojs/svelte": "^5.0.1",
"@astrojs/tailwind": "^5.0.3", "@astrojs/tailwind": "^5.0.3",
"@astropub/icons": "^0.2.0", "@astropub/icons": "^0.2.0",
"@types/color": "^3.0.6", "@types/color": "^3.0.6",
"@types/crypto-js": "^4.2.1", "@types/crypto-js": "^4.2.1",
"@types/node": "^20.10.4", "@types/node": "^20.10.4",
"cssnano": "^6.0.1", "autoprefixer": "^10.4.16",
"esbuild": "^0.19.8", "cssnano": "^6.0.2",
"esbuild": "^0.19.9",
"postcss-nesting": "^12.0.1", "postcss-nesting": "^12.0.1",
"sass": "^1.69.5", "sass": "^1.69.5",
"svelte": "^4.2.8", "svelte": "^4.2.8",
@ -37,7 +38,7 @@
"@astrojs/sitemap": "^3.0.3", "@astrojs/sitemap": "^3.0.3",
"@codemirror/lang-json": "^6.0.1", "@codemirror/lang-json": "^6.0.1",
"@ddietr/codemirror-themes": "^1.4.2", "@ddietr/codemirror-themes": "^1.4.2",
"astro": "^4.0.3", "astro": "^4.0.5",
"astro-i18n": "^2.1.18", "astro-i18n": "^2.1.18",
"astro-robots-txt": "^1.0.0", "astro-robots-txt": "^1.0.0",
"astro-seo": "^0.8.0", "astro-seo": "^0.8.0",

Datei-Diff unterdrückt, da er zu groß ist Diff laden

Datei anzeigen

@ -1,8 +1,9 @@
/** @type {import('postcss-load-config').Config} */
module.exports = { module.exports = {
plugins: { plugins: [
autoprefixer: {}, require('autoprefixer'),
cssnano: {}, require('cssnano'),
'tailwindcss/nesting': 'postcss-nesting', require("tailwindcss/nesting"),
tailwindcss: {}, ]
},
}; };

Datei anzeigen

@ -20,6 +20,7 @@
<script lang="ts"> <script lang="ts">
import {t} from "astro-i18n"; import {t} from "astro-i18n";
import { import {
ChevronDoubleLeftOutline,
ChevronDoubleRightOutline, ChevronDoubleRightOutline,
ChevronLeftOutline, ChevronRightOutline, ChevronLeftOutline, ChevronRightOutline,
FolderOutline, FolderOutline,
@ -149,7 +150,13 @@
<div class="w-full flex justify-center mt-4"> <div class="w-full flex justify-center mt-4">
<ul class="inline-flex"> <ul class="inline-flex">
<li> <li>
<button on:click={previous} class="btn btn-gray h-8 px-3 text-sm flex items-center !m-0 !rounded-r-none"> <button on:click={() => page = 0} class="btn btn-gray h-8 px-3 text-sm flex items-center !m-0 !rounded-l-none">
<span class="sr-only">Next</span>
<ChevronDoubleLeftOutline class="w-3 h-3" />
</button>
</li>
<li>
<button on:click={previous} class="btn btn-gray h-8 px-3 text-sm flex items-center !m-0 !rounded-none">
<span class="sr-only">Previous</span> <span class="sr-only">Previous</span>
<ChevronLeftOutline class="w-3 h-3" /> <ChevronLeftOutline class="w-3 h-3" />
</button> </button>
@ -162,11 +169,17 @@
</li> </li>
{/each} {/each}
<li> <li>
<button on:click={next} class="btn btn-gray h-8 px-3 text-sm flex items-center !m-0 !rounded-l-none"> <button on:click={next} class="btn btn-gray h-8 px-3 text-sm flex items-center !m-0 !rounded-none">
<span class="sr-only">Next</span> <span class="sr-only">Next</span>
<ChevronRightOutline class="w-3 h-3" /> <ChevronRightOutline class="w-3 h-3" />
</button> </button>
</li> </li>
<li>
<button on:click={() => page = maxPage - 1} class="btn btn-gray h-8 px-3 text-sm flex items-center !m-0 !rounded-l-none">
<span class="sr-only">Next</span>
<ChevronDoubleRightOutline class="w-3 h-3" />
</button>
</li>
</ul> </ul>
</div> </div>

Datei anzeigen

@ -24,7 +24,8 @@
"1": "Teste dein Können mit deinem Team bei regelmäßig stattfindenden Events.", "1": "Teste dein Können mit deinem Team bei regelmäßig stattfindenden Events.",
"2": "Unser eigenes Eventsystem ist vielseitig verwendbar und ermöglicht einzigartige Kämpfe!" "2": "Unser eigenes Eventsystem ist vielseitig verwendbar und ermöglicht einzigartige Kämpfe!"
} }
} },
"read": "Mehr Lesen"
}, },
"prefix": { "prefix": {
"Admin": "Administrator", "Admin": "Administrator",

Datei anzeigen

@ -73,7 +73,8 @@
"1": "Test your skills in regular turnaments!", "1": "Test your skills in regular turnaments!",
"2": "Our own event system is very flexible and allows us to create unique turnaments." "2": "Our own event system is very flexible and allows us to create unique turnaments."
} }
} },
"read": "Read More"
}, },
"prefix": { "prefix": {
"Admin": "Admin", "Admin": "Admin",

Datei anzeigen

@ -126,8 +126,8 @@ const { title } = Astro.props;
</div> </div>
<div class="footer-card"> <div class="footer-card">
<h1>Social Media</h1> <h1>Social Media</h1>
<a class="flex" href="/"><YoutubeSolid class="mr-2" /> YouTube</a> <a class="flex" href="/youtube"><YoutubeSolid class="mr-2" /> YouTube</a>
<a class="flex" href="/"><DiscordSolid class="mr-2" /> Discord</a> <a class="flex" href="/discord"><DiscordSolid class="mr-2" /> Discord</a>
</div> </div>
</div> </div>
<span class="text-sm text-white text-center mt-1">© SteamWar.de - Made with ❤️ by Chaoscaot</span> <span class="text-sm text-white text-center mt-1">© SteamWar.de - Made with ❤️ by Chaoscaot</span>

Datei anzeigen

@ -122,7 +122,7 @@ function mapMap<T, K, J>(i: Map<T, K>, fn: (key: T, value: K) => J): J[] {
<p>{t("home.benefits.events.description.2")}</p> <p>{t("home.benefits.events.description.2")}</p>
</div> </div>
</div> </div>
<a class="btn px-8 flex" href={l("/about")}>Read More <CaretRight width="24" heigth="24" /></a> <a class="btn px-8 flex" href={l("/about")}>{t("home.benefits.read")}<CaretRight width="24" heigth="24" /></a>
</section> </section>
<section class="w-full py-12"> <section class="w-full py-12">
{mapMap(groupedTeamMember, (key, value) => ( {mapMap(groupedTeamMember, (key, value) => (
@ -146,6 +146,10 @@ function mapMap<T, K, J>(i: Map<T, K>, fn: (key: T, value: K) => J): J[] {
</NavbarLayout> </NavbarLayout>
<style> <style>
@tailwind base;
@tailwind components;
@tailwind utilities;
text-carousel{ text-carousel{
>* { >* {
@apply absolute top-0 left-0 w-full text-xl sm:text-4xl italic text-white text-center opacity-0; @apply absolute top-0 left-0 w-full text-xl sm:text-4xl italic text-white text-center opacity-0;