From 5d365bc744e3f23bc892ad861c1f81f9a645b481 Mon Sep 17 00:00:00 2001 From: Chaoscaot Date: Sat, 28 Mar 2026 15:56:56 +0100 Subject: [PATCH] Refactor components and pages for improved readability and consistency - Updated BackgroundImage.astro to format props for better readability. - Adjusted FightTable.svelte to remove unnecessary trailing commas. - Modified GroupTable.svelte to fix sorting syntax. - Cleaned up LanguageWarning.astro by standardizing import statements. - Enhanced Login.svelte for better formatting and readability. - Simplified Navbar.svelte by merging multi-line attributes into single lines. - Streamlined PostComponent.astro by condensing Image component props. - Improved SearchComponent.svelte for consistent spacing and formatting. - Refined TagComponent.astro for better readability and structure. - Updated PageLayout.astro to simplify div structure. - Enhanced downloads.astro for improved readability and consistency. - Cleaned up index.astro in help directory for better formatting. - Refactored index.astro in main pages for improved readability. - Standardized login.astro for better formatting. - Cleaned up not-found.astro for consistent import formatting. - Enhanced [...schem].astro for better readability. - Refactored [mode].astro for consistent import formatting. - Improved [...gamemode].astro for better readability. - Cleaned up [mode].astro in regeln directory for consistent formatting. - Refactored index.astro in regeln directory for improved readability. - Enhanced fight.astro for consistent import formatting. --- src/components/BackgroundImage.astro | 12 +++- src/components/FightTable.svelte | 2 +- src/components/GroupTable.svelte | 2 +- src/components/LanguageWarning.astro | 2 +- src/components/Login.svelte | 9 ++- src/components/Navbar.svelte | 11 ++-- src/components/PostComponent.astro | 7 +- src/components/SearchComponent.svelte | 28 ++++---- src/components/TagComponent.astro | 31 +++++---- src/layouts/PageLayout.astro | 5 +- src/pages/downloads.astro | 57 ++++++++++------- src/pages/help/index.astro | 22 ++++--- src/pages/index.astro | 38 ++++------- src/pages/login.astro | 3 +- src/pages/not-found.astro | 4 +- src/pages/publics/[...schem].astro | 8 +-- src/pages/publics/[mode].astro | 42 ++++++------ src/pages/rangliste/[...gamemode].astro | 18 +++--- src/pages/regeln/[mode].astro | 85 +++++++++++++------------ src/pages/regeln/index.astro | 71 ++++++++++++--------- src/pages/statistiken/fight.astro | 6 +- 21 files changed, 247 insertions(+), 216 deletions(-) diff --git a/src/components/BackgroundImage.astro b/src/components/BackgroundImage.astro index 458f78f..67f12f0 100644 --- a/src/components/BackgroundImage.astro +++ b/src/components/BackgroundImage.astro @@ -3,7 +3,13 @@ import { Image } from "astro:assets"; import localBau from "@images/90.png"; --- -Bau + class="w-full h-full object-cover" + quality={100} + draggable="false" + loading="eager" +/> diff --git a/src/components/FightTable.svelte b/src/components/FightTable.svelte index a706088..7637710 100644 --- a/src/components/FightTable.svelte +++ b/src/components/FightTable.svelte @@ -57,7 +57,7 @@ - {#each window( event.fights.filter((f) => (group === undefined ? true : f.group?.id === group)), rows ) as fights} + {#each window( event.fights.filter((f) => (group === undefined ? true : f.group?.id === group)), rows, ) as fights} {#each fights as fight (fight.id)} t.id === Number(teamId))!!, points: points, })) - .sort((a, b) => b.points - a.points) + .sort((a, b) => b.points - a.points), ); diff --git a/src/components/LanguageWarning.astro b/src/components/LanguageWarning.astro index e6936f1..7ee560e 100644 --- a/src/components/LanguageWarning.astro +++ b/src/components/LanguageWarning.astro @@ -1,5 +1,5 @@ --- -import {t} from "astro-i18n"; +import { t } from "astro-i18n"; ---