From de43ea47cbd3cc4ca96a7c888fc6ab5bbaa0f389 Mon Sep 17 00:00:00 2001 From: ZhenShuo Leo <98386542+ZhenShuo2021@users.noreply.github.com> Date: Sun, 5 Oct 2025 01:09:14 +0800 Subject: [PATCH] fix: scroll to top height offset on rtl sites --- layouts/partials/scroll-to-top.html | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/layouts/partials/scroll-to-top.html b/layouts/partials/scroll-to-top.html index e67ff134..bf56a314 100644 --- a/layouts/partials/scroll-to-top.html +++ b/layouts/partials/scroll-to-top.html @@ -1,5 +1,9 @@ -{{ $coffeeIsRight := and site.Params.buymeacoffee.globalWidget (eq (lower site.Params.buymeacoffee.globalWidgetPosition) "right") }} -{{ $toTopYOffset := cond $coffeeIsRight "bottom-24" "bottom-6" }} +{{ $coffeeIsRight := and .Site.Params.buymeacoffee.globalWidget (eq (lower site.Params.buymeacoffee.globalWidgetPosition) "right") }} +{{ $isRTL := .Site.Params.rtl | default false }} +{{ $needAvoidCoffee := ne $coffeeIsRight $isRTL }} +{{ $toTopYOffset := cond $needAvoidCoffee "bottom-24" "bottom-6" }} + +