fix: improve back-to-top button to adapt layout changes properly (#527)

Update back-to-top button to accommodate properly,
even if the max-width of the blog post is updated.
Uses `fixed` position on mobile and `sticky` position
on large screens.
This commit is contained in:
Sat Naing
2025-06-10 08:04:45 +07:00
committed by GitHub
parent 316bdd8203
commit 0cc647c3d3
4 changed files with 20 additions and 31 deletions
+5 -9
View File
@@ -110,17 +110,13 @@ const nextPost =
<EditPost class="sm:hidden" {hideEditPost} {post} />
<ul class="mt-4 mb-8 sm:my-8">
{tags.map(tag => <Tag tag={slugifyStr(tag)} tagName={tag} />)}
</ul>
<BackToTopButton />
<div
class="flex flex-col items-center justify-between gap-6 sm:flex-row sm:items-start sm:gap-8"
>
<ul class="self-start">
{tags.map(tag => <Tag tag={slugifyStr(tag)} tagName={tag} />)}
</ul>
<ShareLinks />
</div>
<ShareLinks />
<hr class="my-6 border-dashed" />