Implement "Take me shopping" button

This commit is contained in:
Matt-Yorkley
2020-05-23 12:48:38 +02:00
parent 10b8470e29
commit 387a5ec950
6 changed files with 21 additions and 7 deletions

View File

@@ -1,2 +1,3 @@
Darkswarm.controller "CartCtrl", ($scope, Cart, $timeout) ->
Darkswarm.controller "CartCtrl", ($scope, Cart, CurrentHub) ->
$scope.Cart = Cart
$scope.CurrentHub = CurrentHub

View File

@@ -43,12 +43,21 @@
padding-top: 10em;
width: 100%;
span {
p {
font-size: 1.5em;
}
}
}
.go-shopping {
display: none;
padding: 0 1.5em;
@include breakpoint(mobile) {
display: inline-block;
}
}
table {
width: 100%;
border: none;

View File

@@ -57,10 +57,6 @@
button, a.button {
width: 48%;
}
a.button {
line-height: 2.75em;
}
}
@include breakpoint(tablet) {

View File

@@ -124,6 +124,10 @@ button.success, .button.success {
}
}
a.button.large {
line-height: 2.75em;
}
button.large, a.button.large {
height: 3em;
font-size: 1em;

View File

@@ -23,9 +23,12 @@
%span.total-price.right {{ line_item.total_price | localizeCurrency }}
.cart-empty{"ng-show" => "Cart.line_items.length == 0"}
%span
%p
= t('.cart_empty')
%a.go-shopping.button.large.bright{ng: {href: "{{ CurrentHub.hub.id ? '#{main_app.shop_path}' : '#{main_app.shops_path}' }}"}}
= t('.take_me_shopping')
.sidebar-footer{"ng-show" => "Cart.line_items.length > 0"}
%p.cart-total
%strong

View File

@@ -1222,6 +1222,7 @@ en:
items_in_cart: "%{num} items in your cart"
close: "Close"
cart_empty: "Your cart is empty"
take_me_shopping: "Take me shopping!"
signed_in:
profile: "Profile"
mobile_menu: