diff --git a/resources/beike/shop/default/css/page-categories.scss b/resources/beike/shop/default/css/page-categories.scss index 0539338f..26d42cf3 100644 --- a/resources/beike/shop/default/css/page-categories.scss +++ b/resources/beike/shop/default/css/page-categories.scss @@ -28,7 +28,7 @@ body.page-categories { } .style-wrap { - span { + label { cursor: pointer; &.active { svg { @@ -68,8 +68,10 @@ body.page-categories { } .product-tool { - .order-wrap { - min-width: 150px; + @media (min-width: 992px) { + .order-select { + min-width: 170px; + } } } @@ -106,3 +108,88 @@ body.page-categories { } } +.sidebar-widget { + list-style: none; + padding: 0 0 1.4rem; + border-bottom: 1px solid #E6E6E6; + + > li { + padding-top: 0.3rem; + padding-bottom: 0.3rem; + // border-bottom: 1px solid #e9ecef; + + &:last-of-type { + border-bottom: none; + } + + .category-href { + display: inline-block; + position: relative; + color: #333; + overflow: hidden; + text-overflow:ellipsis; + white-space: nowrap; + width: calc(100% - 36px); + } + + &.active { + > a { + font-weight: bold; + color: $primary; + } + } + } + + ul { + padding-left: 12px; + list-style: none; + + li { + margin-top: 0; + + ul { + margin-top: 8px; + padding-left: 14px; + } + + &:last-of-type { + border: none; + } + + &.active { + > a { + color: $primary; + font-weight: bold; + } + } + + a { + color: #868e96; + &:first-of-type { + width: calc(100% - 26px); + overflow: hidden; + text-overflow:ellipsis; + white-space: nowrap; + display: inline-block; + } + + &:hover { + color: $primary; + } + } + } + } + + .toggle-icon { + float: right; + font-size: 16px; + padding: 0 6px; + i { + color: #aaa; + } + + &.collapsed { + transform: rotate(-180deg); + } + } +} diff --git a/resources/beike/shop/default/css/page-product.scss b/resources/beike/shop/default/css/page-product.scss index 3bcc69e3..45ad126e 100644 --- a/resources/beike/shop/default/css/page-product.scss +++ b/resources/beike/shop/default/css/page-product.scss @@ -15,6 +15,13 @@ body.page-product { } } + #product-description { + img { + max-width: 100%; + height: auto; + } + } + .product-image { #swiper { height: 250px; diff --git a/resources/beike/shop/default/css/product-style.scss b/resources/beike/shop/default/css/product-style.scss index 4499a576..083824de 100644 --- a/resources/beike/shop/default/css/product-style.scss +++ b/resources/beike/shop/default/css/product-style.scss @@ -47,6 +47,11 @@ transition: all 0.3s ease-in-out; } + .product-name { + height: auto; + margin-bottom: 20px; + } + .product-bottom-info { padding-top: 10px; padding-left: 20px; diff --git a/resources/lang/de/common.php b/resources/lang/de/common.php index 84c1af05..2be4fd48 100644 --- a/resources/lang/de/common.php +++ b/resources/lang/de/common.php @@ -67,6 +67,10 @@ return [ 'menu' => 'Menü', 'whether_open' => 'ob öffnen', 'to_setting' => 'zu konfigurieren', + 'low' => 'niedrig', + 'high' => 'hoch', + 'sales' => 'Verkauf', + 'showing_page' => 'Showing 1-:per_page of :total item(s)', 'id' => 'ID', 'created_at' => 'Erstellungszeit', diff --git a/resources/lang/en/common.php b/resources/lang/en/common.php index e6180bdd..d3ae1363 100644 --- a/resources/lang/en/common.php +++ b/resources/lang/en/common.php @@ -71,6 +71,7 @@ return [ 'low' => 'Low', 'high' => 'High', 'sales' => 'Sales', + 'showing_page' => 'Showing 1-:per_page of :total item(s)', 'id' => 'ID', 'created_at' => 'Created At', diff --git a/resources/lang/es/common.php b/resources/lang/es/common.php index 3cd8ddea..bd88c74f 100644 --- a/resources/lang/es/common.php +++ b/resources/lang/es/common.php @@ -67,6 +67,10 @@ return [ 'menu' => 'menú', 'whether_open' => 'Ya sea para abrir', 'to_setting' => 'para configurar', + 'low' => 'bajo', + 'high' => 'alto', + 'sales' => 'ventas', + 'showing_page' => 'Showing 1-:per_page of :total item(s)', 'id' => 'ID', 'created_at' => 'tiempo de creación', diff --git a/resources/lang/fr/common.php b/resources/lang/fr/common.php index 92328ae5..14886ee6 100644 --- a/resources/lang/fr/common.php +++ b/resources/lang/fr/common.php @@ -67,6 +67,10 @@ return [ 'menu' => 'menu', 'whether_open' => 'Que ce soit pour ouvrir', 'to_setting' => 'pour configurer', + 'low' => 'faible', + 'high' => 'élevé', + 'sales' => 'ventes', + 'showing_page' => 'Showing 1-:per_page of :total item(s)', 'id' => 'ID', 'created_at' => 'temps de creation', diff --git a/resources/lang/it/common.php b/resources/lang/it/common.php index 6a19c08d..1877515b 100644 --- a/resources/lang/it/common.php +++ b/resources/lang/it/common.php @@ -67,6 +67,10 @@ return [ 'menu' => 'menù', 'whether_open' => 'Se aprire', 'to_setting' => 'configurare', + 'low' => 'basso', + 'high' => 'alto', + 'sales' => 'vendite', + 'showing_page' => 'Showing 1-:per_page of :total item(s)', 'id' => 'ID', 'created_at' => 'tempo di creazione', diff --git a/resources/lang/ja/common.php b/resources/lang/ja/common.php index c73e0cd9..8b7de828 100644 --- a/resources/lang/ja/common.php +++ b/resources/lang/ja/common.php @@ -67,6 +67,10 @@ return [ 'menu' => 'メニュー', 'whether_open' => '開くかどうか', 'to_setting' => '設定する', + 'low' => '低い', + 'high' => '高い', + 'sales' => '売上', + 'showing_page' => 'Showing 1-:per_page of :total item(s)', 'id' => 'ID', 'created_at' => '作成時間', diff --git a/resources/lang/ru/common.php b/resources/lang/ru/common.php index 39e63e6c..6c828658 100644 --- a/resources/lang/ru/common.php +++ b/resources/lang/ru/common.php @@ -67,6 +67,10 @@ return [ 'menu' => 'меню', 'whether_open' => 'открывать ли', 'to_setting' => 'настроить', + 'low' => 'низкий', + 'high' => 'высокий', + 'sales' => 'продажи', + 'showing_page' => 'Showing 1-:per_page of :total item(s)', 'id' => 'ID', 'created_at' => 'время создания', diff --git a/resources/lang/zh_cn/common.php b/resources/lang/zh_cn/common.php index 530c5d8b..a6b500fa 100644 --- a/resources/lang/zh_cn/common.php +++ b/resources/lang/zh_cn/common.php @@ -71,6 +71,7 @@ return [ 'low' => '低', 'high' => '高', 'sales' => '销量', + 'showing_page' => '1-:per_page 共 :total 条数据', 'id' => 'ID', 'created_at' => '创建时间', diff --git a/resources/lang/zh_hk/common.php b/resources/lang/zh_hk/common.php index 3514aa1d..4a153b28 100644 --- a/resources/lang/zh_hk/common.php +++ b/resources/lang/zh_hk/common.php @@ -70,6 +70,7 @@ return [ 'low' => '低', 'high' => '高', 'sales' => '銷量', + 'showing_page' => '1-:per_page 共 :total 条数据', 'id' => 'ID', 'created_at' => '創建時間', diff --git a/themes/default/category.blade.php b/themes/default/category.blade.php index 7900bb81..06c5a655 100644 --- a/themes/default/category.blade.php +++ b/themes/default/category.blade.php @@ -16,6 +16,27 @@
+
+

{{ __('product.category') }}

+ +
+
@if ($filter_data['price']['min'] != $filter_data['price']['max'])
@@ -70,35 +91,7 @@
-
-
- - - - - - -
-
- {{--
Showing 1-19 of 20 item(s)
--}} - - - - -
-
+ @include('shared.filter_bar_block') @if (count($products_format))
@@ -142,8 +135,8 @@ $(document).ready(function () { $("#slider").slider({ range: true, - min: {{ $filter_data['price']['min'] }}, - max: {{ $filter_data['price']['max'] }}, + min: {{ $filter_data['price']['min'] ?? 0 }}, + max: {{ $filter_data['price']['max'] ?? 0 }}, values: [{{ $filter_data['price']['select_min'] }}, {{ $filter_data['price']['select_max'] }}], change: function(event, ui) { $('input.price-min').val(ui.values[0]) @@ -156,13 +149,20 @@ }); }); + $('.child-category').each(function(index, el) { + if ($(this).hasClass('active')) { + $(this).parent('ul').addClass('show').siblings('button').removeClass('collapsed') + $(this).parents('li').addClass('active') + } + }); + $('.attr-value-check').change(function(event) { let [attr, val] = [$(this).data('attr'),$(this).data('attrval')]; filterAttr[attr].values[val].selected = $(this).is(":checked"); filterProductData(); }); - $('.form-select').change(function(event) { + $('.form-select, input[name="style_list"]').change(function(event) { filterProductData(); }); @@ -190,6 +190,7 @@ let [priceMin, priceMax] = [$('.price-min').val(), $('.price-max').val()]; let order = $('.order-select').val(); let perpage = $('.perpage-select').val(); + let styleList = $('input[name="style_list"]:checked').val(); layer.load(2, {shade: [0.3,'#fff'] }) @@ -211,6 +212,10 @@ url = bk.updateQueryStringParameter(url, 'per_page', perpage); } + if (styleList) { + url = bk.updateQueryStringParameter(url, 'style_list', styleList); + } + location = url; } diff --git a/themes/default/shared/filter_bar_block.blade.php b/themes/default/shared/filter_bar_block.blade.php new file mode 100644 index 00000000..c7a2c353 --- /dev/null +++ b/themes/default/shared/filter_bar_block.blade.php @@ -0,0 +1,35 @@ +
+ @if (!is_mobile()) +
+ + +
+ @endif +
+
+ {{ __('common.showing_page', ['per_page' => request('per_page'), 'total' => $products->total()]) }} +
+ + + + +
+
\ No newline at end of file diff --git a/themes/default/shared/product.blade.php b/themes/default/shared/product.blade.php index 451b3a57..e0562330 100644 --- a/themes/default/shared/product.blade.php +++ b/themes/default/shared/product.blade.php @@ -1,4 +1,4 @@ -
+