Some a11y and Lighthouse testing

Dieser Commit ist enthalten in:
Chaoscaot 2023-12-10 21:52:07 +01:00
Ursprung 6c9c496f05
Commit 2286c6a3eb
6 geänderte Dateien mit 29 neuen und 8 gelöschten Zeilen

Datei anzeigen

@ -12,6 +12,9 @@ export default defineConfig({
image: { image: {
service: sharpImageService() service: sharpImageService()
}, },
experimental: {
optimizeHoistedScript: true,
},
compressHTML: true, compressHTML: true,
site: "https://steamwar.de", site: "https://steamwar.de",
integrations: [svelte(), tailwind(), configureI18n(), sitemap({ integrations: [svelte(), tailwind(), configureI18n(), sitemap({

Datei anzeigen

@ -4,6 +4,7 @@
font-style: normal; font-style: normal;
font-weight: 100; font-weight: 100;
src: local("Barlow Condensed Thin"), local("BarlowCondensed-Thin"), url(barlow-condensed-thin.woff2) format("woff2"); src: local("Barlow Condensed Thin"), local("BarlowCondensed-Thin"), url(barlow-condensed-thin.woff2) format("woff2");
font-display: swap;
} }
/* barlow-condensed-thin-italic */ /* barlow-condensed-thin-italic */
@font-face { @font-face {
@ -11,6 +12,7 @@
font-style: italic; font-style: italic;
font-weight: 100; font-weight: 100;
src: local("Barlow Condensed Thin Italic"), local("BarlowCondensed-ThinItalic"), url(barlow-condensed-thin-italic.woff2) format("woff2"); src: local("Barlow Condensed Thin Italic"), local("BarlowCondensed-ThinItalic"), url(barlow-condensed-thin-italic.woff2) format("woff2");
font-display: swap;
} }
/* barlow-condensed-extralight */ /* barlow-condensed-extralight */
@font-face { @font-face {
@ -18,6 +20,7 @@
font-style: normal; font-style: normal;
font-weight: 400; font-weight: 400;
src: local("Barlow Condensed ExtraLight"), local("BarlowCondensed-ExtraLight"), url(barlow-condensed-extralight.woff2) format("woff2"); src: local("Barlow Condensed ExtraLight"), local("BarlowCondensed-ExtraLight"), url(barlow-condensed-extralight.woff2) format("woff2");
font-display: swap;
} }
/* barlow-condensed-extralight-italic */ /* barlow-condensed-extralight-italic */
@font-face { @font-face {
@ -25,6 +28,7 @@
font-style: italic; font-style: italic;
font-weight: 400; font-weight: 400;
src: local("Barlow Condensed ExtraLight Italic"), local("BarlowCondensed-ExtraLightItalic"), url(barlow-condensed-extralight-italic.woff2) format("woff2"); src: local("Barlow Condensed ExtraLight Italic"), local("BarlowCondensed-ExtraLightItalic"), url(barlow-condensed-extralight-italic.woff2) format("woff2");
font-display: swap;
} }
/* barlow-condensed-light */ /* barlow-condensed-light */
@font-face { @font-face {
@ -32,6 +36,7 @@
font-style: normal; font-style: normal;
font-weight: 300; font-weight: 300;
src: local("Barlow Condensed Light"), local("BarlowCondensed-Light"), url(barlow-condensed-light.woff2) format("woff2"); src: local("Barlow Condensed Light"), local("BarlowCondensed-Light"), url(barlow-condensed-light.woff2) format("woff2");
font-display: swap;
} }
/* barlow-condensed-light-italic */ /* barlow-condensed-light-italic */
@font-face { @font-face {
@ -39,6 +44,7 @@
font-style: italic; font-style: italic;
font-weight: 300; font-weight: 300;
src: local("Barlow Condensed Light Italic"), local("BarlowCondensed-LightItalic"), url(barlow-condensed-light-italic.woff2) format("woff2"); src: local("Barlow Condensed Light Italic"), local("BarlowCondensed-LightItalic"), url(barlow-condensed-light-italic.woff2) format("woff2");
font-display: swap;
} }
/* barlow-condensed-regular */ /* barlow-condensed-regular */
@font-face { @font-face {
@ -46,6 +52,7 @@
font-style: normal; font-style: normal;
font-weight: 400; font-weight: 400;
src: local("Barlow Condensed Regular"), local("BarlowCondensed-Regular"), url(barlow-condensed-regular.woff2) format("woff2"); src: local("Barlow Condensed Regular"), local("BarlowCondensed-Regular"), url(barlow-condensed-regular.woff2) format("woff2");
font-display: swap;
} }
/* barlow-condensed-italic */ /* barlow-condensed-italic */
@font-face { @font-face {
@ -53,6 +60,7 @@
font-style: italic; font-style: italic;
font-weight: 400; font-weight: 400;
src: local("Barlow Condensed Italic"), local("BarlowCondensed-Italic"), url(barlow-condensed-italic.woff2) format("woff2"); src: local("Barlow Condensed Italic"), local("BarlowCondensed-Italic"), url(barlow-condensed-italic.woff2) format("woff2");
font-display: swap;
} }
/* barlow-condensed-medium */ /* barlow-condensed-medium */
@font-face { @font-face {
@ -60,6 +68,7 @@
font-style: normal; font-style: normal;
font-weight: 500; font-weight: 500;
src: local("Barlow Condensed Medium"), local("BarlowCondensed-Medium"), url(barlow-condensed-medium.woff2) format("woff2"); src: local("Barlow Condensed Medium"), local("BarlowCondensed-Medium"), url(barlow-condensed-medium.woff2) format("woff2");
font-display: swap;
} }
/* barlow-condensed-medium-italic */ /* barlow-condensed-medium-italic */
@font-face { @font-face {
@ -67,6 +76,7 @@
font-style: italic; font-style: italic;
font-weight: 500; font-weight: 500;
src: local("Barlow Condensed Medium Italic"), local("BarlowCondensed-MediumItalic"), url(barlow-condensed-medium-italic.woff2) format("woff2"); src: local("Barlow Condensed Medium Italic"), local("BarlowCondensed-MediumItalic"), url(barlow-condensed-medium-italic.woff2) format("woff2");
font-display: swap;
} }
/* barlow-condensed-semibold */ /* barlow-condensed-semibold */
@font-face { @font-face {
@ -74,6 +84,7 @@
font-style: normal; font-style: normal;
font-weight: 400; font-weight: 400;
src: local("Barlow Condensed SemiBold"), local("BarlowCondensed-SemiBold"), url(barlow-condensed-semibold.woff2) format("woff2"); src: local("Barlow Condensed SemiBold"), local("BarlowCondensed-SemiBold"), url(barlow-condensed-semibold.woff2) format("woff2");
font-display: swap;
} }
/* barlow-condensed-semibold-italic */ /* barlow-condensed-semibold-italic */
@font-face { @font-face {
@ -81,6 +92,7 @@
font-style: italic; font-style: italic;
font-weight: 400; font-weight: 400;
src: local("Barlow Condensed SemiBold Italic"), local("BarlowCondensed-SemiBoldItalic"), url(barlow-condensed-semibold-italic.woff2) format("woff2"); src: local("Barlow Condensed SemiBold Italic"), local("BarlowCondensed-SemiBoldItalic"), url(barlow-condensed-semibold-italic.woff2) format("woff2");
font-display: swap;
} }
/* barlow-condensed-bold */ /* barlow-condensed-bold */
@font-face { @font-face {
@ -88,6 +100,7 @@
font-style: normal; font-style: normal;
font-weight: 700; font-weight: 700;
src: local("Barlow Condensed Bold"), local("BarlowCondensed-Bold"), url(barlow-condensed-bold.woff2) format("woff2"); src: local("Barlow Condensed Bold"), local("BarlowCondensed-Bold"), url(barlow-condensed-bold.woff2) format("woff2");
font-display: swap;
} }
/* barlow-condensed-bold-italic */ /* barlow-condensed-bold-italic */
@font-face { @font-face {
@ -95,6 +108,7 @@
font-style: italic; font-style: italic;
font-weight: 700; font-weight: 700;
src: local("Barlow Condensed Bold Italic"), local("BarlowCondensed-BoldItalic"), url(barlow-condensed-bold-italic.woff2) format("woff2"); src: local("Barlow Condensed Bold Italic"), local("BarlowCondensed-BoldItalic"), url(barlow-condensed-bold-italic.woff2) format("woff2");
font-display: swap;
} }
/* barlow-condensed-extrabold */ /* barlow-condensed-extrabold */
@font-face { @font-face {
@ -102,6 +116,7 @@
font-style: normal; font-style: normal;
font-weight: 400; font-weight: 400;
src: local("Barlow Condensed ExtraBold"), local("BarlowCondensed-ExtraBold"), url(barlow-condensed-extrabold.woff2) format("woff2"); src: local("Barlow Condensed ExtraBold"), local("BarlowCondensed-ExtraBold"), url(barlow-condensed-extrabold.woff2) format("woff2");
font-display: swap;
} }
/* barlow-condensed-extrabold-italic */ /* barlow-condensed-extrabold-italic */
@font-face { @font-face {
@ -109,6 +124,7 @@
font-style: italic; font-style: italic;
font-weight: 400; font-weight: 400;
src: local("Barlow Condensed ExtraBold Italic"), local("BarlowCondensed-ExtraBoldItalic"), url(barlow-condensed-extrabold-italic.woff2) format("woff2"); src: local("Barlow Condensed ExtraBold Italic"), local("BarlowCondensed-ExtraBoldItalic"), url(barlow-condensed-extrabold-italic.woff2) format("woff2");
font-display: swap;
} }
/* barlow-condensed-black */ /* barlow-condensed-black */
@font-face { @font-face {
@ -116,6 +132,7 @@
font-style: normal; font-style: normal;
font-weight: 900; font-weight: 900;
src: local("Barlow Condensed Black"), local("BarlowCondensed-Black"), url(barlow-condensed-black.woff2) format("woff2"); src: local("Barlow Condensed Black"), local("BarlowCondensed-Black"), url(barlow-condensed-black.woff2) format("woff2");
font-display: swap;
} }
/* barlow-condensed-black-italic */ /* barlow-condensed-black-italic */
@font-face { @font-face {
@ -123,5 +140,6 @@
font-style: italic; font-style: italic;
font-weight: 900; font-weight: 900;
src: local("Barlow Condensed Black Italic"), local("BarlowCondensed-BlackItalic"), url(barlow-condensed-black-italic.woff2) format("woff2"); src: local("Barlow Condensed Black Italic"), local("BarlowCondensed-BlackItalic"), url(barlow-condensed-black-italic.woff2) format("woff2");
font-display: swap;
} }

Datei anzeigen

@ -13,11 +13,10 @@ const iconImage = await getImage({src: icon, height: 32, width: 32, format: 'png
<head> <head>
<meta charset="UTF-8"> <meta charset="UTF-8">
<meta name="viewport" <meta name="viewport"
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0"> content="width=device-width, user-scalable=5, initial-scale=1.0, maximum-scale=5.0, minimum-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge"> <meta http-equiv="X-UA-Compatible" content="ie=edge">
<meta name="icbm" content="52.370216;4.895168"/> <meta name="icbm" content="52.370216;4.895168"/>
<link rel="icon" type="imgage/png" href={iconImage.src} /> <link rel="icon" type="imgage/png" href={iconImage.src} />
<link rel="stylesheet" href="/fonts/barlow-condensed/barlow-condensed.css" />
<SEO <SEO
title={title} title={title}

Datei anzeigen

@ -107,7 +107,7 @@ const { title } = Astro.props;
<main class="flex-1"> <main class="flex-1">
<slot /> <slot />
</main> </main>
<footer class="bg-gray-900 w-screen min-h-80 mt-4 pb-2 rounded-t-2xl flex flex-col dark:bg-neutral-900"> <footer class="bg-gray-900 w-full min-h-80 mt-4 pb-2 rounded-t-2xl flex flex-col dark:bg-neutral-900">
<div class="flex-1 flex justify-evenly items-center md:items-start mt-4 md:flex-row flex-col"> <div class="flex-1 flex justify-evenly items-center md:items-start mt-4 md:flex-row flex-col">
<div class="footer-card"> <div class="footer-card">
<h1>Serverstatus</h1> <h1>Serverstatus</h1>

Datei anzeigen

@ -7,7 +7,7 @@ const { title } = Astro.props;
--- ---
<NavbarLayout title={title}> <NavbarLayout title={title}>
<Image src={localBau} alt="Bau" width="1920" height="1080" class="w-screen h-screen dark:brightness-75 fixed -z-10 object-cover" draggable="false" /> <Image src={localBau} alt="Bau" width="1920" height="1080" densities={[1.5, 2, 3, 4]} class="w-full h-screen dark:brightness-75 fixed -z-10 object-cover" draggable="false" />
<div class="mx-auto bg-gray-100 p-8 rounded-b-md shadow-md pt-40 sm:pt-28 md:pt-14 <div class="mx-auto bg-gray-100 p-8 rounded-b-md shadow-md pt-40 sm:pt-28 md:pt-14
dark:text-white dark:bg-neutral-900" style="width: min(100vw, 75em);"> dark:text-white dark:bg-neutral-900" style="width: min(100vw, 75em);">
<slot /> <slot />

Datei anzeigen

@ -37,8 +37,9 @@ function mapMap<T, K, J>(i: Map<T, K>, fn: (key: T, value: K) => J): J[] {
--- ---
<NavbarLayout title={t("home.page")} description="SteamWar.de Homepage"> <NavbarLayout title={t("home.page")} description="SteamWar.de Homepage">
<div class="w-screen h-screen relative mb-4"> <link rel="stylesheet" href="/fonts/barlow-condensed/barlow-condensed.css" slot="head" />
<Image src={localBau} alt="Bau" width="1920" height="1080" class="w-screen object-cover rounded-b-2xl shadow-2xl dark:brightness-75" style="height: calc(100vh + 1rem)" draggable="false" /> <div class="w-full h-screen relative mb-4">
<Image src={localBau} alt="Bau" width="1920" height="1080" densities={[1.5, 2, 3, 4]} class="w-full object-cover rounded-b-2xl shadow-2xl dark:brightness-75" style="height: calc(100vh + 1rem)" draggable="false" />
<drop-in class="absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 flex flex-col items-center"> <drop-in class="absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 flex flex-col items-center">
<h1 class="text-4xl sm:text-6xl md:text-8xl font-extrabold text-white -translate-y-16 opacity-0 barlow" style="transition: transform .7s ease-out, opacity .7s linear; text-shadow: 2px 2px 5px black;"> <h1 class="text-4xl sm:text-6xl md:text-8xl font-extrabold text-white -translate-y-16 opacity-0 barlow" style="transition: transform .7s ease-out, opacity .7s linear; text-shadow: 2px 2px 5px black;">
<span class="text-yellow-400">{t("home.title.first")}</span><span class="text-neutral-600">{t("home.title.second")}</span> <span class="text-yellow-400">{t("home.title.first")}</span><span class="text-neutral-600">{t("home.title.second")}</span>
@ -101,7 +102,7 @@ function mapMap<T, K, J>(i: Map<T, K>, fn: (key: T, value: K) => J): J[] {
</script> </script>
</drop-in> </drop-in>
</div> </div>
<section class="w-screen flex flex-col items-center justify-center shadow-2xl rounded-b-2xl pb-8"> <section class="w-full flex flex-col items-center justify-center shadow-2xl rounded-b-2xl pb-8">
<div class="py-10 flex flex-col lg:flex-row"> <div class="py-10 flex flex-col lg:flex-row">
<div class="card"> <div class="card">
<Archive heigth="64" width="64" /> <Archive heigth="64" width="64" />
@ -123,7 +124,7 @@ function mapMap<T, K, J>(i: Map<T, K>, fn: (key: T, value: K) => J): J[] {
</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")}>Read More <CaretRight width="24" heigth="24" /></a>
</section> </section>
<section class="w-screen py-12"> <section class="w-full py-12">
{mapMap(groupedTeamMember, (key, value) => ( {mapMap(groupedTeamMember, (key, value) => (
<div class="flex items-center flex-col"> <div class="flex items-center flex-col">
<h2 class="dark:text-white text-4xl font-bold">{t("home.prefix." + key)}</h2> <h2 class="dark:text-white text-4xl font-bold">{t("home.prefix." + key)}</h2>