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" }} + +