Add close button to mobile product modal, this can be reused in other modals later

This commit is contained in:
Luis Ramos
2020-04-23 16:46:37 +01:00
parent 35ac5e093e
commit 0a378a897b
3 changed files with 21 additions and 1 deletions

View File

@@ -1,5 +1,4 @@
.row
.columns.small-12.large-6.product-header
%h3{"ng-bind" => "::product.name"}
%span
@@ -19,3 +18,7 @@
%img.product-img.placeholder{ src: "/assets/noimage/large.png", "ng-if" => "::!product.largeImage"}
%ng-include{src: "'partials/close.html'"}
.buttons
.button.bottom-close-button{"ng-click" => "$close()"}
= t('js.shop.products.product_modal.close')

View File

@@ -72,6 +72,19 @@ dialog .mobile-close-reveal-modal
}
}
.reveal-modal .buttons {
margin: 0 auto;
text-align: center;
.bottom-close-button {
background-color: $orange-500;
@media only screen and (min-width: 640px) {
display: none;
}
}
}
// Prevent body from scrolling when a modal is open
body.modal-open {
overflow: hidden;

View File

@@ -2736,6 +2736,10 @@ See the %{link} to find out more about %{sitename}'s features and to start using
signup_or_login: "Start By Signing Up (or logging in)"
have_an_account: "Already have an account?"
action_login: "Log in now."
shop:
products:
product_modal:
close: "Close"
# Singular and plural forms of commonly used words.
# We use these entries to pluralize unit names in every language.