From 40083dd24ba36c67615a8f0d59030aa174ba2622 Mon Sep 17 00:00:00 2001 From: DrMint <29893320+DrMint@users.noreply.github.com> Date: Sat, 25 May 2024 17:15:52 +0200 Subject: [PATCH] Small improvements on mobile --- TODO.md | 2 +- src/components/AppLayout/components/Footer.astro | 2 +- src/components/InlineMetadata.astro | 8 +++++++- src/components/Previews/GenericPreview.astro | 2 +- src/pages/[locale]/folders/[slug].astro | 9 +++++++++ src/pages/[locale]/folders/_components/FolderCard.astro | 3 ++- .../[locale]/folders/_components/FoldersSection.astro | 6 +++++- 7 files changed, 26 insertions(+), 6 deletions(-) diff --git a/TODO.md b/TODO.md index 3519ca0..d3623f5 100644 --- a/TODO.md +++ b/TODO.md @@ -7,7 +7,7 @@ ## Short term - Display if a content has a source language -- [JSLess] Display if a content is available in more than one language +- [JSLess] Display if a content is available in more than one language - Number of audio players seems limited (on Chrome and Firefox) - [RichTextContent] Handle relationship - [RichTextContent] Add autolink block support diff --git a/src/components/AppLayout/components/Footer.astro b/src/components/AppLayout/components/Footer.astro index 491d836..4cc5e5f 100644 --- a/src/components/AppLayout/components/Footer.astro +++ b/src/components/AppLayout/components/Footer.astro @@ -123,7 +123,7 @@ const contactLabel = `${t("footer.socials.contact.title")} - ${t( diff --git a/src/pages/[locale]/folders/_components/FolderCard.astro b/src/pages/[locale]/folders/_components/FolderCard.astro index 9328d69..97d3754 100644 --- a/src/pages/[locale]/folders/_components/FolderCard.astro +++ b/src/pages/[locale]/folders/_components/FolderCard.astro @@ -29,6 +29,7 @@ const { icon = "material-symbols:folder-outline", title, href } = Astro.props; padding: 12px 24px; border-radius: 12px; text-decoration: none; + font-size: clamp(0.8em, 0.35em + 0.75vw, 1em); & > svg { width: 24px; @@ -42,7 +43,7 @@ const { icon = "material-symbols:folder-outline", title, href } = Astro.props; gap: 2px; & > h3 { - font-size: 1.25em; + font-size: 125%; } } } diff --git a/src/pages/[locale]/folders/_components/FoldersSection.astro b/src/pages/[locale]/folders/_components/FoldersSection.astro index 568bedb..aed739c 100644 --- a/src/pages/[locale]/folders/_components/FoldersSection.astro +++ b/src/pages/[locale]/folders/_components/FoldersSection.astro @@ -39,6 +39,10 @@ const { getLocalizedUrl, getLocalizedMatch } = await getI18n(Astro.locals.curren section { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); - gap: 0.7rem 1rem; + gap: clamp(6px, 2vmax, 16px); + + @media (max-width: 40rem) { + row-gap: 12px; + } }