mirror of
https://github.com/nunocoracao/blowfish.git
synced 2026-01-30 16:31:52 +01:00
fix: scroll to top height offset on rtl sites
This commit is contained in:
@@ -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" }}
|
||||
|
||||
|
||||
<div
|
||||
id="scroll-to-top"
|
||||
class="fixed {{ $toTopYOffset }} end-6 z-50 transform translate-y-4 opacity-0 duration-200">
|
||||
|
||||
Reference in New Issue
Block a user