Saleor Core: the high performance, composable, headless commerce API.
Python cartcheckoutcommercecomposablee-commerceecommercegraphqlheadlessheadless-commercemultichannelomsorder-managementpaymentspimpythonshopshopping-cartstore
Adjust mobile product page to design
weronka13f7fc33342b
diff --git a/saleor/static/js/demo/storefront.js b/saleor/static/js/demo/storefront.jsindex 7cce04797b..1aee7067ee 100644--- a/saleor/static/js/demo/storefront.js+++ b/saleor/static/js/demo/storefront.js@@ -19,7 +19,7 @@ $.ajaxSetup({var $toogleIcon = $('.navbar__brand__menu-toggle');var $mobileNav = $('nav');-if ($(window).width() < 768) {+if ($(window).width() < 767) {$mobileNav.append('<ul class="nav navbar-nav navbar__menu__login"></ul>');$('.navbar__login a').appendTo('.navbar__menu__login').wrap( '<li class="nav-item login-item"></li>')diff --git a/saleor/static/scss/demo/components/_header.scss b/saleor/static/scss/demo/components/_header.scssindex 663b8c0c42..2cc7ab40cc 100644--- a/saleor/static/scss/demo/components/_header.scss+++ b/saleor/static/scss/demo/components/_header.scss@@ -68,6 +68,9 @@border-bottom: 0;margin-bottom: 0;}+ @include media-breakpoint-down(sm) {+ border-bottom: 0;+ }&:after {content: "";width: 100%;diff --git a/saleor/static/scss/demo/components/_product-list.scss b/saleor/static/scss/demo/components/_product-list.scssindex 08a3a487c3..f86f676ce0 100644--- a/saleor/static/scss/demo/components/_product-list.scss+++ b/saleor/static/scss/demo/components/_product-list.scss@@ -11,5 +11,7 @@}&__name {font-weight: 700;+ margin-top: $global-margin / 2;+ display: block;}}\ No newline at end of filediff --git a/saleor/static/scss/demo/components/_product-page.scss b/saleor/static/scss/demo/components/_product-page.scssindex db6ffe6367..df4c4689e2 100644--- a/saleor/static/scss/demo/components/_product-page.scss+++ b/saleor/static/scss/demo/components/_product-page.scss@@ -2,7 +2,15 @@&__info {&__name {font-weight: 900;- margin-bottom: $global-margin * 2;+ @include media-breakpoint-up(md) {+ margin-bottom: $global-margin * 2;+ }+ }+ &__price {+ &__undiscounted {+ color: $gray;+ text-decoration: line-through;+ }}}&__gallery {diff --git a/templates/demo/product/details.html b/templates/demo/product/details.htmlindex ce6cf19d15..5f2eb802ec 100644--- a/templates/demo/product/details.html+++ b/templates/demo/product/details.html@@ -29,10 +29,30 @@{% endif %}<div itemscope itemtype="http://schema.org/Product"><div class="row product">- <div class="col-sm-7 product__gallery">+ <div class="col-xs-12 col-md-5 float-md-right text-xs-center text-md-left">+ <h1 itemprop="name" class="product__info__name">+ {{ product }}+ </h1>+ {% if product.is_in_stock %}+ <h2 itemprop="offers" class="product__info__price" itemscope itemtype="http://schema.org/Offer">+ <span>{% price_range price_range %}</span>+ {% if discount %}+ <small class="product__info__price__undiscounted">{% gross undiscounted_price_range.min_price html=True %}</small>+ {% endif %}+ {% if local_price_range %}+ <br>+ <small>+ ≈+ {% gross local_price_range.min_price html=True %}+ </small>+ {% endif %}+ </h2>+ {% endif %}+ </div>+ <div class="col-md-7 col-xs-12 product__gallery">{% with images=product.images.all %}<div id="carousel-example-generic" class="carousel slide">- <ol class="carousel-indicators hidden-xs-down">+ <ol class="carousel-indicators hidden-sm-down">{% for image in images %}<li data-target="#carousel-example-generic" data-slide-to="{{ forloop.counter0 }}"><img src="{{ image.image.crop.60x60 }}" alt="">@@ -55,25 +75,7 @@</div>{% endwith %}</div>- <div class="col-sm-5 product__info">- <h1 itemprop="name" class="product__info__name">- {{ product }}- </h1>- {% if product.is_in_stock %}- <h2 itemprop="offers" itemscope itemtype="http://schema.org/Offer">- <span class="product__info__price">{% price_range price_range %}</span>- {% if discount %}- <small class="price undiscounted text-muted">{% gross undiscounted_price_range.min_price html=True %}</small>- {% endif %}- {% if local_price_range %}- <br>- <small class="text-info">- ≈- {% gross local_price_range.min_price html=True %}- </small>- {% endif %}- </h2>- {% endif %}+ <div class="col-md-5 product__info">{% if is_visible and product.is_in_stock %}{% block orderform %}<form role="form" class="product-form form-vertical" method="post"