mirror of
https://github.com/nunocoracao/blowfish.git
synced 2026-01-30 16:31:52 +01:00
fix(scroll-to-top): handle nil value correctly
This commit is contained in:
@@ -1,5 +1,9 @@
|
|||||||
{{ $coffeeIsRight := and .Site.Params.buymeacoffee.globalWidget (eq (lower site.Params.buymeacoffee.globalWidgetPosition) "right") }}
|
|
||||||
{{ $isRTL := .Site.Params.rtl | default false }}
|
{{ $isRTL := .Site.Params.rtl | default false }}
|
||||||
|
{{ $coffeeIsRight := and (eq (lower site.Params.buymeacoffee.globalWidgetPosition) "right") .Site.Params.buymeacoffee.globalWidget }}
|
||||||
|
{{ if not $coffeeIsRight }}
|
||||||
|
{{ $coffeeIsRight = false }}
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
{{ $needAvoidCoffee := ne $coffeeIsRight $isRTL }}
|
{{ $needAvoidCoffee := ne $coffeeIsRight $isRTL }}
|
||||||
{{ $toTopYOffset := cond $needAvoidCoffee "bottom-24" "bottom-6" }}
|
{{ $toTopYOffset := cond $needAvoidCoffee "bottom-24" "bottom-6" }}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user