mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-28 01:53:25 +00:00
Move homepage "register here" CTA to bottom of screen.
The CTA breaks the layout when the new cart sidebar is open. I can't see a nice way to keep it at the top without making a mess.
This commit is contained in:
@@ -14,8 +14,8 @@ Darkswarm.directive "ofnPageAlert", ($timeout) ->
|
||||
# Wait a moment after page load before showing the alert. Otherwise we often miss the
|
||||
# start of the animation.
|
||||
$timeout ->
|
||||
container_elems.addClass("move-down")
|
||||
container_elems.addClass("move-up")
|
||||
, 1000
|
||||
|
||||
scope.close = ->
|
||||
container_elems.removeClass("move-down")
|
||||
container_elems.removeClass("move-up")
|
||||
|
||||
@@ -10,6 +10,5 @@ Darkswarm.directive "ofnSmoothScrollTo", ($location, $document)->
|
||||
# Scrolling is confused by our position:fixed top bar and page alert bar
|
||||
# - add an offset to scroll to the correct location, plus 5px buffer
|
||||
offset = $("nav.top-bar").height()
|
||||
offset += $(".page-alert.move-down").height()
|
||||
offset += 5
|
||||
$document.scrollTo target, offset, 1000
|
||||
|
||||
@@ -55,19 +55,18 @@ $page-alert-height: 55px;
|
||||
.off-canvas-fixed nav.tab-bar,
|
||||
.off-canvas-fixed .page-alert {
|
||||
@include transition(all 1000ms ease-in-out);
|
||||
|
||||
&.move-down {
|
||||
margin-top: $page-alert-height;
|
||||
}
|
||||
}
|
||||
|
||||
.off-canvas-wrap .page-alert {
|
||||
top: -1 * $page-alert-height;
|
||||
bottom: -1 * $page-alert-height;
|
||||
top: unset;
|
||||
z-index: 100;
|
||||
}
|
||||
|
||||
.off-canvas-wrap.move-right .inner-wrap.move-down {
|
||||
.left-off-canvas-menu {
|
||||
top: -1 * $page-alert-height;
|
||||
&.move-up {
|
||||
bottom: 0;
|
||||
}
|
||||
|
||||
.alert-box {
|
||||
border-bottom: 0;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user