From e428b1d5a53ecdbc8322fede4bb4e052f9fbfdb8 Mon Sep 17 00:00:00 2001 From: saicaca Date: Mon, 22 Jan 2024 11:25:56 +0800 Subject: [PATCH] feat: mobile style improvements --- src/components/ArchivePanel.astro | 2 +- src/components/Footer.astro | 2 +- src/components/GlobalStyles.astro | 6 ++--- src/components/Navbar.astro | 2 +- src/components/PostMetadata.astro | 2 +- src/components/TitleCardNew.astro | 2 +- src/components/misc/Markdown.astro | 40 ++++++++++++++++++++---------- src/layouts/MainGridLayout.astro | 6 ++--- src/pages/about.astro | 2 +- src/pages/posts/[...slug].astro | 12 ++++----- 10 files changed, 45 insertions(+), 31 deletions(-) diff --git a/src/components/ArchivePanel.astro b/src/components/ArchivePanel.astro index 5b040d1..59e973e 100644 --- a/src/components/ArchivePanel.astro +++ b/src/components/ArchivePanel.astro @@ -65,7 +65,7 @@ function formatTag(tag: string[]) { { groups.map(group => (
-
+
{group.year}
diff --git a/src/components/Footer.astro b/src/components/Footer.astro index 37fb507..f048c79 100644 --- a/src/components/Footer.astro +++ b/src/components/Footer.astro @@ -4,7 +4,7 @@ import {profileConfig} from "../config"; --- -
+
© 2023 {profileConfig.name}. All Rights Reserved.
diff --git a/src/components/GlobalStyles.astro b/src/components/GlobalStyles.astro index a009b25..1da7378 100644 --- a/src/components/GlobalStyles.astro +++ b/src/components/GlobalStyles.astro @@ -47,7 +47,7 @@ rainbow-light = linear-gradient(to right, oklch(0.80 0.10 0), oklch(0.80 0.10 30 rainbow-dark = linear-gradient(to right, oklch(0.70 0.10 0), oklch(0.70 0.10 30), oklch(0.70 0.10 60), oklch(0.70 0.10 90), oklch(0.70 0.10 120), oklch(0.70 0.10 150), oklch(0.70 0.10 180), oklch(0.70 0.10 210), oklch(0.70 0.10 240), oklch(0.70 0.10 270), oklch(0.70 0.10 300), oklch(0.70 0.10 330), oklch(0.70 0.10 360)) :root - --radius-large 16px + --radius-large 1rem --banner-height-home 60vh --banner-height 40vh @@ -184,10 +184,10 @@ color_set({ @apply drop-shadow-[0_2px_4px_rgba(0,0,0,0.005)] } .link { - @apply transition hover:bg-[var(--link-hover)] active:bg-[var(--link-active)] rounded-md p-[4px] -m-[4px]; + @apply transition hover:bg-[var(--link-hover)] active:bg-[var(--link-active)] rounded-md p-1 -m-1; } .link-lg { - @apply transition hover:bg-[var(--link-hover)] active:bg-[var(--link-active)] rounded-md p-[6px] -m-[6px]; + @apply transition hover:bg-[var(--link-hover)] active:bg-[var(--link-active)] rounded-md p-1.5 -m-1.5; } .float-panel { @apply top-[5.25rem] rounded-[var(--radius-large)] overflow-hidden bg-[var(--float-panel-bg)] transition shadow-xl dark:shadow-none diff --git a/src/components/Navbar.astro b/src/components/Navbar.astro index 9d56afd..8281b45 100644 --- a/src/components/Navbar.astro +++ b/src/components/Navbar.astro @@ -44,7 +44,7 @@ function getLinkPresetInfo(p: LinkPreset): NavBarLink {
- - {entry.data.prevSlug &&