From e605fab16170250721d61be669d078a1307a5072 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cyril=20=C5=A0ebek?= Date: Sun, 7 Jul 2024 13:55:39 +0200 Subject: [PATCH] Added short and ultrashort optimisations - Added short (max-height: 880px) and ultrashort (max-height: 670px) tailwind screens - Optimised hero and about sections for shorter screens --- src/components/About.astro | 4 ++-- src/components/AboutModule.astro | 8 ++++---- src/components/Hero.astro | 12 ++++++------ tailwind.config.mjs | 4 +++- 4 files changed, 15 insertions(+), 13 deletions(-) diff --git a/src/components/About.astro b/src/components/About.astro index 689aad7..2959b86 100644 --- a/src/components/About.astro +++ b/src/components/About.astro @@ -17,10 +17,10 @@ const t = useTranslations(getLangFromUrl(Astro.url)); image={t("about")[i].image} flipped={i % 2} > -

+

{t("about")[i].title}

-

+

{t("about")[i].content}

diff --git a/src/components/AboutModule.astro b/src/components/AboutModule.astro index 759a975..e01f5bb 100644 --- a/src/components/AboutModule.astro +++ b/src/components/AboutModule.astro @@ -7,15 +7,15 @@ const { row, flipped, image, alt } = Astro.props; { flipped ? ( <> -
+
-
+
) : ( <> -
-
+
+
diff --git a/src/components/Hero.astro b/src/components/Hero.astro index e8e1de0..0be65ee 100644 --- a/src/components/Hero.astro +++ b/src/components/Hero.astro @@ -7,12 +7,12 @@ const t = useTranslations(getLangFromUrl(Astro.url)) -
+
-
-

+
+

{t("hero")["title"]}

@@ -20,18 +20,18 @@ const t = useTranslations(getLangFromUrl(Astro.url))

-
+
diff --git a/tailwind.config.mjs b/tailwind.config.mjs index 1ba9619..d813b89 100644 --- a/tailwind.config.mjs +++ b/tailwind.config.mjs @@ -28,7 +28,9 @@ module.exports = { }, extend: { screens: { - "3xl": "1900px" + "3xl": "1900px", + "short": { "raw": "(max-height: 880px)" }, + "ultrashort": { "raw": "(max-height: 670px)" } }, colors: { bkg: withOpacity('--color-bkg'),