From a95920db70a6afa914384bf8af87b9cdfee36e0d Mon Sep 17 00:00:00 2001 From: grassblock Date: Sun, 18 May 2025 19:43:14 +0800 Subject: [PATCH 1/3] feat: cooler path display style --- src/styles/global.css | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/styles/global.css b/src/styles/global.css index b20c67a..3b38fae 100644 --- a/src/styles/global.css +++ b/src/styles/global.css @@ -80,11 +80,11 @@ main { } .terminal-path { - color: var(--terminal-green); - padding: 1rem; - font-size: 1.2rem; + background-color: var(--accent-color); + color: var(--bg-color); + padding: 5px 10px; + font-size: 1rem; font-weight: 500; - border-radius: 4px; margin-bottom: 1rem; display: inline-block; } From c56db7d692088e51b6a3ae716f2f861e549c3f50 Mon Sep 17 00:00:00 2001 From: grassblock Date: Sun, 18 May 2025 19:52:35 +0800 Subject: [PATCH 2/3] feat: back to top scrolls back more gracefully --- src/components/BackToTop.astro | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/components/BackToTop.astro b/src/components/BackToTop.astro index 80dc6c2..59c0c27 100644 --- a/src/components/BackToTop.astro +++ b/src/components/BackToTop.astro @@ -21,7 +21,14 @@ // When the user clicks on the button, scroll to the top of the document toTopButton.addEventListener("click", toTop); function toTop() { - document.body.scrollTop = 0; - document.documentElement.scrollTop = 0; + try { + // scrollback gracefully + window.scrollTo({top: 0, behavior: 'smooth'}); + } catch (e) { + // if there is a error,return to top directly + console.error(e); + document.body.scrollTop = 0; + document.documentElement.scrollTop = 0; + } } \ No newline at end of file From 342ebde2d4677d0684d93910d35244a597a018f4 Mon Sep 17 00:00:00 2001 From: grassblock Date: Sun, 18 May 2025 20:48:58 +0800 Subject: [PATCH 3/3] fix: fediverse statuses caused overflow --- src/components/shortcodes/FediStatuses.astro | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/components/shortcodes/FediStatuses.astro b/src/components/shortcodes/FediStatuses.astro index 2bb4105..fa3d4d3 100644 --- a/src/components/shortcodes/FediStatuses.astro +++ b/src/components/shortcodes/FediStatuses.astro @@ -193,8 +193,16 @@ const { instanceDomain, userId, extraParams = '' } = Astro.props; .account-name { color: #666; font-size: 0.9em; + /* fix overflow caused by long names */ + word-break: break-word; + } + /* post content */ + .post .content pre code { + /*this should fix code overflows*/ + white-space: pre-wrap; + overflow-wrap: break-word; + word-break: normal; } - /* post actions */ .post-actions { margin-top: 10px;