From 1b271692663706f819e8028fa418fd71d00b2c40 Mon Sep 17 00:00:00 2001 From: "shubhammehrotra.symfony@webkul.com" Date: Tue, 31 Dec 2019 17:26:29 +0530 Subject: [PATCH] home page updates --- .../ProductsCategoriesProxyController.php | 2 - .../publishable/assets/css/velocity.css | 110 ++++++++----- .../publishable/assets/js/velocity.js | 150 +++++++++--------- .../Seeders/VelocityMetaDataSeeder.php | 3 +- .../js/UI/components/content-header.vue | 7 +- .../assets/js/UI/components/sidebar.vue | 30 ++-- .../Resources/assets/sass/components/UI.scss | 1 + .../Resources/assets/sass/components/app.scss | 46 ++++-- .../assets/sass/components/footer.scss | 11 ++ .../assets/sass/components/home.scss | 37 +++-- .../assets/sass/components/shared.scss | 48 +++--- .../Resources/views/UI/particals.blade.php | 3 +- .../views/admin/meta-info/meta-data.blade.php | 6 +- .../admin/settings/channels/edit.blade.php | 47 +++++- .../views/checkout/cart/index.blade.php | 2 +- .../views/home/accessories.blade.php | 5 - .../views/home/customer-reviews.blade.php | 6 - .../views/home/featured-products.blade.php | 7 - .../views/home/new-products.blade.php | 7 - .../home/recently-viewed-products.blade.php | 5 - .../footer/footer-links/footer-left.blade.php | 4 +- .../views/layouts/footer/index.blade.php | 9 -- .../footer/newsletter-subscription.blade.php | 49 +++--- .../Resources/views/layouts/master.blade.php | 14 +- .../layouts/top-nav/login-section.blade.php | 2 +- .../views/products/add-to-cart.blade.php | 6 +- .../Resources/views/products/index.blade.php | 11 +- .../views/products/list/card.blade.php | 34 ++-- .../views/products/wishlist.blade.php | 19 +-- 29 files changed, 381 insertions(+), 300 deletions(-) diff --git a/packages/Webkul/Shop/src/Http/Controllers/ProductsCategoriesProxyController.php b/packages/Webkul/Shop/src/Http/Controllers/ProductsCategoriesProxyController.php index d8dfad45f..6a8a0bc7b 100644 --- a/packages/Webkul/Shop/src/Http/Controllers/ProductsCategoriesProxyController.php +++ b/packages/Webkul/Shop/src/Http/Controllers/ProductsCategoriesProxyController.php @@ -60,9 +60,7 @@ class ProductsCategoriesProxyController extends Controller */ public function index(string $slugOrPath) { - if ($category = $this->categoryRepository->findByPath($slugOrPath)) { - return view($this->_config['category_view'], compact('category')); } diff --git a/packages/Webkul/Velocity/publishable/assets/css/velocity.css b/packages/Webkul/Velocity/publishable/assets/css/velocity.css index 73b3f9c58..bd52cb699 100644 --- a/packages/Webkul/Velocity/publishable/assets/css/velocity.css +++ b/packages/Webkul/Velocity/publishable/assets/css/velocity.css @@ -730,6 +730,7 @@ .btn-add-to-cart { padding: 8px; color: #fff !important; + border-radius: 0px !important; border-color: #26A37C !important; background-color: #26A37C !important; } @@ -869,10 +870,6 @@ border: 1px solid #CCCCCC; } -.category-container { - padding: 30px 50px; -} - .filters-container { margin: 20px 0; } @@ -1019,6 +1016,16 @@ display: block; } +#product-card-new .cart-wish-wrap .wishlist-icon { + height: 32px; + display: table; +} + +#product-card-new .cart-wish-wrap .wishlist-icon > i { + display: table-cell; + vertical-align: middle; +} + .quantity { width: 100%; padding-bottom: 10px; @@ -1197,7 +1204,6 @@ z-index: 100; width: 350px; left: -230px; - display: none; position: absolute; } @@ -1512,10 +1518,6 @@ padding: .3rem 1.25rem; } -#home-right-bar-container.col-12 .category-container { - padding: 30px 0; -} - .wishlist-icon { vertical-align: middle; } @@ -1741,7 +1743,7 @@ display: none; font-size: 14px; font-weight: 600; - padding: 6px 14px; + padding: 2px 10px; position: absolute; border-radius: 12px; } @@ -1773,6 +1775,20 @@ color: white; } +#sidebar .category-content { + margin-bottom: 10px; +} + +#sidebar .category-content .category-title { + top: -1px; + font-weight: 600; + position: relative; +} + +.category-container .grid-card { + width: 22rem; +} + /* @author Shubham Mehrotra */ body { overflow-x: hidden; @@ -1790,6 +1806,14 @@ body .container-margin { position: absolute !important; } +.account-modal .theme-btn, .account-modal .cart-details .continue-shopping-btn, .cart-details .account-modal .continue-shopping-btn, .account-modal .account-content .account-layout .bottom-toolbar .pagination .page-item, .account-content .account-layout .bottom-toolbar .pagination .account-modal .page-item { + padding: .375rem .75rem; +} + +.account-modal .modal-footer .text-left { + padding-left: 5px; +} + .category-list-container { padding-left: 0px; display: inline-block; @@ -1838,7 +1862,7 @@ body .container-margin { width: 22px; height: 20px; float: right; - margin-right: 11px; + margin-right: 10px; background-image: url("../images/Icon-Arrow-Right.svg"); } @@ -2227,7 +2251,13 @@ header #search-form > *:focus { background-color: #4D7EA8; } -.content-list li a { +.content-list ul { + display: -webkit-inline-box; + display: -ms-inline-flexbox; + display: inline-flex; +} + +.content-list ul li a { display: block; cursor: pointer; font-size: 16px; @@ -2235,7 +2265,6 @@ header #search-form > *:focus { letter-spacing: 0; position: relative; text-decoration: none; - font-family: SourceSansPro-Semibold; padding: 5px 20px 5px 5px; } @@ -2403,6 +2432,7 @@ body::after { .footer .newsletter-subscription .newsletter-wrapper .social-icons { padding: 20px 0; + color: #FFFFFF; } .footer .newsletter-subscription .newsletter-wrapper .social-icons i { @@ -2500,6 +2530,10 @@ body::after { color: rgba(255, 255, 255, 0.52); } +.footer .footer-content .footer-statics .software-description p { + font-size: 14px; +} + .footer .top-brands { padding: 40px; padding-left: 10%; @@ -2628,6 +2662,14 @@ body::after { padding-top: 20px !important; } +.pl0 { + padding-left: 0px !important; +} + +.pl15 { + padding-left: 15px !important; +} + .pl10 { padding-left: 10px !important; } @@ -2705,7 +2747,7 @@ body::after { } .mb10, .product-view .left .main-product-image { - margin-bottom: 10px; + margin-bottom: 10px !important; } .mb15, .product-view .right .info, .product-detail .right .info { @@ -2770,7 +2812,7 @@ body::after { color: rgba(0, 0, 0, 0.53); } -.clr-dark { +.clr-dark, .footer .footer-content .footer-statics .software-description p { color: rgba(255, 255, 255, 0.52); } @@ -2969,8 +3011,8 @@ body::after { float: left; width: 30%; height: 270px; - max-width: 280px; - max-height: 270px; + max-width: 150px; + max-height: 150px; background: #f2f2f2; } @@ -2980,28 +3022,6 @@ body::after { padding-left: 20px; } -.lg-card-container.list-card .sticker { - border-bottom-right-radius: 15px; - position: absolute; - top: 15px; - left: 15px; - text-transform: uppercase; - padding: 4px 13px; - font-size: 14px; - color: #fff; - -webkit-box-shadow: 1px 1px 1px #ccc; - box-shadow: 1px 1px 1px #ccc; - font-weight: 500; -} - -.lg-card-container.list-card .sticker.sale { - background: #ff6472; -} - -.lg-card-container.list-card .sticker.new { - background: #ff6472; -} - .lg-card-container.list-card .product-rating .stars { display: inline-block; } @@ -3011,7 +3031,17 @@ body::after { } .lg-card-container.list-card .product-information { - padding-top: 68px; + height: 150px; + display: table; +} + +.lg-card-container.list-card .product-information > div { + display: table-cell; + vertical-align: middle; +} + +.lg-card-container.list-card .product-price .sticker { + display: block; } .lg-card-container.grid-card { diff --git a/packages/Webkul/Velocity/publishable/assets/js/velocity.js b/packages/Webkul/Velocity/publishable/assets/js/velocity.js index 1872b2d0f..758043585 100644 --- a/packages/Webkul/Velocity/publishable/assets/js/velocity.js +++ b/packages/Webkul/Velocity/publishable/assets/js/velocity.js @@ -35585,6 +35585,18 @@ Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); /* harmony default export */ __webpack_exports__["default"] = ({ props: ['categories', 'url', 'addClass', 'mainSidebar'], + data: function data() { + var slicedCategories = this.categories; + + if (slicedCategories && slicedCategories.length > 9) { + slicedCategories = this.categories.slice(0, 9); + } + + return { + slicedCategories: slicedCategories + }; + }, + mounted: function mounted() { if (window.location.href !== this.url + '/' && this.mainSidebar || this.categories && this.categories.length == 0) { this.toggleSidebar(); @@ -35633,7 +35645,7 @@ var render = function() { var _vm = this var _h = _vm.$createElement var _c = _vm._self._c || _h - return _vm.categories && _vm.categories.length > 0 + return _vm.slicedCategories && _vm.slicedCategories.length > 0 ? _c( "nav", { @@ -35643,11 +35655,15 @@ var render = function() { [ _c( "ul", - { attrs: { type: "none" } }, - _vm._l(_vm.categories, function(category, index) { + { staticClass: "pl15", attrs: { type: "none" } }, + _vm._l(_vm.slicedCategories, function(category, index) { return _c( "li", - { key: index, attrs: { id: "category-" + category.id } }, + { + key: index, + staticClass: "category-content", + attrs: { id: "category-" + category.id } + }, [ _c( "a", @@ -35655,10 +35671,7 @@ var render = function() { staticClass: "category unset", class: category.children.length > 0 ? "fw6" : "", attrs: { - href: - _vm.url + - "/categories/" + - category["translations"][0].slug + href: _vm.url + "/" + category["translations"][0].slug }, on: { mouseover: function($event) { @@ -35670,18 +35683,18 @@ var render = function() { } }, [ - _c("span", [_vm._v(_vm._s(category["name"]))]), + _c("span", { staticClass: "category-title" }, [ + _vm._v(_vm._s(category["name"])) + ]), _vm._v(" "), - category.children.length > 0 - ? _c("i", { - staticClass: "angle-right-icon text-down-3", - on: { - click: function($event) { - return _vm.toggleSubCategory(index) - } - } - }) - : _vm._e() + _c("i", { + staticClass: "angle-right-icon", + on: { + click: function($event) { + return _vm.toggleSubCategory(index) + } + } + }) ] ), _vm._v(" "), @@ -36706,7 +36719,6 @@ Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); // // // -// /* harmony default export */ __webpack_exports__["default"] = ({ props: ['heading', 'headerContent', 'isEnabled'] @@ -36720,58 +36732,54 @@ var render = function() { var _vm = this var _h = _vm.$createElement var _c = _vm._self._c || _h - return _c( - "div", - { class: "row " + (_vm.isEnabled == "0" ? "disabled" : "") }, - [ - _c( - "div", - { staticClass: "main-category fs20 pt10 col-2 pl30 unselectable" }, - [ - _c("i", { - class: - "rango-view-list " + - (_vm.isEnabled == "0" ? "" : "cursor-pointer") + - " align-vertical-top", - on: { - click: function($event) { - _vm.isEnabled == "0" ? "" : _vm.toggleSidebar() - } + return _c("div", { staticClass: "row" }, [ + _c( + "div", + { staticClass: "main-category fs20 pt10 col-2 pl30 unselectable" }, + [ + _c("i", { + class: + "rango-view-list " + + (_vm.isEnabled == "0" ? "" : "cursor-pointer") + + " align-vertical-top", + on: { + click: function($event) { + _vm.isEnabled == "0" ? "" : _vm.toggleSidebar() } - }), - _vm._v(" "), - _c("span", { - staticClass: "text-up", - domProps: { textContent: _vm._s(_vm.heading) } - }) - ] - ), - _vm._v(" "), - _c("div", { staticClass: "content-list row no-margin col-10" }, [ - _c( - "ul", - { staticClass: "no-margin", attrs: { type: "none" } }, - _vm._l(_vm.headerContent, function(content, index) { - return _c("li", { key: index }, [ - content["content_type"] == "link" - ? _c("a", { - attrs: { - href: "content['page_link']", - target: content["link_target"] ? "_blank" : "_self" - }, - domProps: { textContent: _vm._s(content.title) } - }) - : _c("a", { - attrs: { href: "#" }, - domProps: { textContent: _vm._s(content.title) } - }) - ]) - }), - 0 - ) - ]) - ] - ) + } + }), + _vm._v(" "), + _c("span", { + staticClass: "text-up", + domProps: { textContent: _vm._s(_vm.heading) } + }) + ] + ), + _vm._v(" "), + _c("div", { staticClass: "content-list row no-margin col-10" }, [ + _c( + "ul", + { staticClass: "no-margin", attrs: { type: "none" } }, + _vm._l(_vm.headerContent, function(content, index) { + return _c("li", { key: index }, [ + content["content_type"] == "link" + ? _c("a", { + attrs: { + href: content["page_link"], + target: content["link_target"] ? "_blank" : "_self" + }, + domProps: { textContent: _vm._s(content.title) } + }) + : _c("a", { + attrs: { href: "#" }, + domProps: { textContent: _vm._s(content.title) } + }) + ]) + }), + 0 + ) + ]) + ]) } var staticRenderFns = [] render._withStripped = true diff --git a/packages/Webkul/Velocity/src/Database/Seeders/VelocityMetaDataSeeder.php b/packages/Webkul/Velocity/src/Database/Seeders/VelocityMetaDataSeeder.php index 7cfd09540..769c14dbc 100644 --- a/packages/Webkul/Velocity/src/Database/Seeders/VelocityMetaDataSeeder.php +++ b/packages/Webkul/Velocity/src/Database/Seeders/VelocityMetaDataSeeder.php @@ -22,8 +22,7 @@ class VelocityMetaDataSeeder extends Seeder 'slider' => 1, - 'subscription_bar_content' => '
-
' + 'subscription_bar_content' => '
' ]); } } diff --git a/packages/Webkul/Velocity/src/Resources/assets/js/UI/components/content-header.vue b/packages/Webkul/Velocity/src/Resources/assets/js/UI/components/content-header.vue index cfee988c1..5a16f8cae 100644 --- a/packages/Webkul/Velocity/src/Resources/assets/js/UI/components/content-header.vue +++ b/packages/Webkul/Velocity/src/Resources/assets/js/UI/components/content-header.vue @@ -1,7 +1,6 @@