From 6e374fde622988b5f7927f94cc00703786d24da1 Mon Sep 17 00:00:00 2001 From: wukko Date: Wed, 17 Jul 2024 14:04:53 +0600 Subject: [PATCH] web/updates: make changelogs look nicer - fixes horizontal scrolling on mobile - removes text backdrop - improves readability --- web/src/components/misc/ChangelogEntry.svelte | 80 ++++++++++--------- .../misc/ChangelogEntryWrapper.svelte | 6 +- web/src/routes/updates/+page.svelte | 79 +++++++++--------- 3 files changed, 86 insertions(+), 79 deletions(-) diff --git a/web/src/components/misc/ChangelogEntry.svelte b/web/src/components/misc/ChangelogEntry.svelte index 902aa7ef..e4474aef 100644 --- a/web/src/components/misc/ChangelogEntry.svelte +++ b/web/src/components/misc/ChangelogEntry.svelte @@ -2,15 +2,17 @@ export let version: string; export let title: string; export let date: string; - export let banner: { file: string, alt: string } | undefined; + export let banner: { file: string; alt: string } | undefined;
-

-
{ version }
-
{ title }
-

- { date } +
+
+
{version}
+
{date}
+
+

{title}

+
{#if banner} main { - padding: 1em; + overflow-x: hidden; } - img { - max-width: 100%; - } - - h1 { - padding-top: 1em; - } - - .contents :global(.text-backdrop) { - border-radius: 4px; - background-color: var(--button); - color: var(--background); - padding: 0.3rem; - } - - .contents :global(.text-backdrop.link) { - text-decoration: underline; - } - - h1 { + #changelog-header { display: flex; flex-direction: column; align-items: start; + gap: calc(var(--padding) / 2); + padding: 1em 0; /* match default

padding */ } - h1 .changelog-version { - padding: .15rem .5rem; - border-radius: 4px; - background-color: var(--button-hover); + .changelog-info { + display: flex; + flex-direction: row; + align-items: center; + gap: 14px; } - h1 .changelog-title { - padding: .15rem 0; - text-align: left; + .changelog-version { + padding: 3px 8px; + border-radius: 6px; + background-color: var(--secondary); + color: var(--primary); + font-size: 21px; + font-weight: 500; + } + + .changelog-date { + font-size: 13px; + font-weight: 500; + color: var(--gray); + } + + .changelog-title { + padding: 0; + line-height: 1.2; } .changelog-banner { - padding: 2em; - width: 100%; - max-height: 300pt; - min-height: 210pt; display: block; object-fit: cover; + max-height: 320pt; + min-height: 210pt; + width: 100%; + max-width: 100; aspect-ratio: 16/9; + border-radius: var(--padding); } .changelog-content { @@ -84,5 +86,7 @@ .contents { max-width: 100%; + line-height: 1.5; + font-size: 15px; } diff --git a/web/src/components/misc/ChangelogEntryWrapper.svelte b/web/src/components/misc/ChangelogEntryWrapper.svelte index 6dc6e56a..d01b93f9 100644 --- a/web/src/components/misc/ChangelogEntryWrapper.svelte +++ b/web/src/components/misc/ChangelogEntryWrapper.svelte @@ -1,9 +1,9 @@ diff --git a/web/src/routes/updates/+page.svelte b/web/src/routes/updates/+page.svelte index 3691e055..d8532ec2 100644 --- a/web/src/routes/updates/+page.svelte +++ b/web/src/routes/updates/+page.svelte @@ -1,17 +1,17 @@