diff --git a/themes/berkarar/assets/css/components/1-main/nulifier.scss b/themes/berkarar/assets/css/components/1-main/nulifier.scss index 250c10a..a25a222 100644 --- a/themes/berkarar/assets/css/components/1-main/nulifier.scss +++ b/themes/berkarar/assets/css/components/1-main/nulifier.scss @@ -133,13 +133,14 @@ li { /* Handle */ ::-webkit-scrollbar-thumb { - background: #DFDFDF; + background: #474545; border-radius: 10px; + @include transition; } /* Handle on hover */ ::-webkit-scrollbar-thumb:hover { - background: #DFDFDF; + background: #000000; } input[type=date]::-webkit-calendar-picker-indicator { diff --git a/themes/berkarar/assets/css/components/2-layout/responsive.scss b/themes/berkarar/assets/css/components/2-layout/responsive.scss index 4e2c657..62f0c13 100644 --- a/themes/berkarar/assets/css/components/2-layout/responsive.scss +++ b/themes/berkarar/assets/css/components/2-layout/responsive.scss @@ -1811,6 +1811,24 @@ .shops { padding: 20px 0 40px; + &_sort { + flex-direction: column; + + .custom-select { + width: 100%; + } + } + + &_search { + margin-bottom: 15px; + margin-right: 0; + width: 100%; + + input { + width: calc(100% - 60px); + } + } + &_tab { margin-bottom: 25px; @@ -2194,7 +2212,6 @@ line-height: 1.8; } - &-photo {} } } diff --git a/themes/berkarar/assets/css/components/2-layout/select.scss b/themes/berkarar/assets/css/components/2-layout/select.scss index bea078a..648db6f 100644 --- a/themes/berkarar/assets/css/components/2-layout/select.scss +++ b/themes/berkarar/assets/css/components/2-layout/select.scss @@ -4,6 +4,10 @@ .custom-select { position: relative; + + &.w150 { + width: 150px; + } } .select-selected { @@ -14,30 +18,32 @@ padding: 12px 40px 12px 20px; cursor: pointer; - background-color: #fff; + background-color: #292929; border-radius: 4px; - border: 1px solid #ced4da; + border: 1px solid #292929; + color: #fff; &.select-arrow-active { border: 4px 4px 0 0; &:after { - transform: translateY(5px) rotate(225deg); + transform: rotate(90deg); } } &::after { position: absolute; content: ""; - top: 40px; - transform: rotate(45deg); + top: 17px; right: 20px; - width: 8px; - height: 8px; + width: 15px; + height: 15px; z-index: 4; - border-bottom: 1.5px solid #868686; - border-right: 1.5px solid #868686; + // border-bottom: 1.5px solid #868686; + // border-right: 1.5px solid #868686; @include transition; + background: url("../images/svg/select-arrow.svg") no-repeat center; + background-size: contain; } } @@ -47,12 +53,16 @@ left: 0; right: 0; z-index: 99; + cursor: pointer; animation-name: select; animation-duration: 0.3s; - background: #fff; + background: #292929; + color: #fff; - max-height: 500px; + text-align: center; + + max-height: 350px; overflow-y: auto; div { @@ -60,26 +70,21 @@ font-size: 14px; line-height: 1.4; - color: black; + color: #fff; padding: 10px; cursor: pointer; @include transition; - background-color: rgba(200,200,200,.5);; - border: 1px solid #EDEDED; border-radius: 4px; margin-bottom: 2px; - &:last-child { - margin-bottom: 30px; - } - &:hover { - border: 1px solid #EDEDED; + // border: 1px solid #EDEDED; + background: #fff; } } &::-webkit-scrollbar { - width: 10px; + width: 0px; } &::-webkit-scrollbar-track { diff --git a/themes/berkarar/assets/css/components/3-page/about.scss b/themes/berkarar/assets/css/components/3-page/about.scss index c8902c7..9c961f4 100644 --- a/themes/berkarar/assets/css/components/3-page/about.scss +++ b/themes/berkarar/assets/css/components/3-page/about.scss @@ -214,7 +214,7 @@ img { @include ImgCon; - // height: 80%; + // height: 80%; display: block; } } @@ -245,4 +245,4 @@ } } -// About end ========================== +// About end ========================== \ No newline at end of file diff --git a/themes/berkarar/assets/css/components/3-page/home.scss b/themes/berkarar/assets/css/components/3-page/home.scss index 8c84f5a..1528173 100644 --- a/themes/berkarar/assets/css/components/3-page/home.scss +++ b/themes/berkarar/assets/css/components/3-page/home.scss @@ -100,6 +100,53 @@ .shops { padding: 80px 0; + &_sort { + display: flex; + align-items: center; + margin-bottom: 30px; + } + + &_search { + display: block; + position: relative; + margin-right: 25px; + + input { + background: #292929; + padding: 12px 40px 12px 20px; + + font-size: 16px; + font-weight: 400; + line-height: 1.3; + color: #fff; + + border-radius: 4px; + + &::placeholder { + color: #fff; + } + } + + button { + position: absolute; + top: 55%; + right: 15px; + display: block; + + @include transformY; + background: transparent; + cursor: pointer; + border: none; + + width: 16px; + height: 16px; + + svg { + @include ImgCon; + } + } + } + &_tab { display: flex; align-items: center; @@ -145,7 +192,7 @@ &_block { display: flex; flex-wrap: wrap; - justify-content: center; + // justify-content: center; margin: -5px auto; max-width: 1440px; @@ -844,7 +891,6 @@ .pag { display: flex; align-items: center; - justify-content: space-between; margin-top: 50px; &_group { @@ -877,6 +923,7 @@ font-size: 18px; line-height: 25px; color: #7D7D7D; + margin-left: 20px; } } diff --git a/themes/berkarar/assets/css/main.css b/themes/berkarar/assets/css/main.css index cdc455f..73e2588 100644 --- a/themes/berkarar/assets/css/main.css +++ b/themes/berkarar/assets/css/main.css @@ -23,7 +23,7 @@ input::-webkit-inner-spin-button { margin: 0; } -/*** +/*** ==================================================================== Global Settings ==================================================================== @@ -134,13 +134,16 @@ li { /* Handle */ ::-webkit-scrollbar-thumb { - background: #DFDFDF; + background: #474545; border-radius: 10px; + -webkit-transition: all 0.2s ease-in-out 0s; + transition: all 0.2s ease-in-out 0s; + -moz-transition: all 0.2s ease-in-out 0s; } /* Handle on hover */ ::-webkit-scrollbar-thumb:hover { - background: #DFDFDF; + background: #000000; } input[type=date]::-webkit-calendar-picker-indicator { @@ -973,6 +976,105 @@ input[type=date]::-webkit-calendar-picker-indicator { -moz-transition: all 0.2s ease-in-out 0s; } +.custom-select select { + display: none; +} + +.custom-select { + position: relative; +} +.custom-select.w150 { + width: 150px; +} + +.select-selected { + font-weight: 400; + font-size: 16px; + line-height: 1.4; + padding: 12px 40px 12px 20px; + cursor: pointer; + background-color: #292929; + border-radius: 4px; + border: 1px solid #292929; + color: #fff; +} +.select-selected.select-arrow-active { + border: 4px 4px 0 0; +} +.select-selected.select-arrow-active:after { + -webkit-transform: rotate(90deg); + transform: rotate(90deg); +} +.select-selected::after { + position: absolute; + content: ""; + top: 17px; + right: 20px; + width: 15px; + height: 15px; + z-index: 4; + -webkit-transition: all 0.2s ease-in-out 0s; + transition: all 0.2s ease-in-out 0s; + -moz-transition: all 0.2s ease-in-out 0s; + background: url("../images/svg/select-arrow.svg") no-repeat center; + background-size: contain; +} + +.select-items { + position: absolute; + top: calc(100% + 10px); + left: 0; + right: 0; + z-index: 99; + cursor: pointer; + -webkit-animation-name: select; + animation-name: select; + -webkit-animation-duration: 0.3s; + animation-duration: 0.3s; + background: #292929; + color: #fff; + text-align: center; + max-height: 350px; + overflow-y: auto; +} +.select-items div { + font-weight: 400; + font-size: 14px; + line-height: 1.4; + color: #fff; + padding: 10px; + cursor: pointer; + -webkit-transition: all 0.2s ease-in-out 0s; + transition: all 0.2s ease-in-out 0s; + -moz-transition: all 0.2s ease-in-out 0s; + border-radius: 4px; + margin-bottom: 2px; +} +.select-items div:hover { + background: #fff; +} +.select-items::-webkit-scrollbar { + width: 0px; +} +.select-items::-webkit-scrollbar-track { + background: #ededed; + border-radius: 10px; +} +.select-items::-webkit-scrollbar-thumb { + background: #aeaeae; + -webkit-box-shadow: 0 0 6px rgba(0, 0, 0, 0.5); + box-shadow: 0 0 6px rgba(0, 0, 0, 0.5); +} + +.select-hide { + display: none; +} + +.select-items div:hover, +.same-as-selected { + background-color: rgba(250, 250, 250, 0.5); +} + .modal { position: fixed; top: 0; @@ -1416,6 +1518,66 @@ input[type=date]::-webkit-calendar-picker-indicator { .shops { padding: 80px 0; } +.shops_sort { + display: -webkit-box; + display: -ms-flexbox; + display: flex; + -webkit-box-align: center; + -ms-flex-align: center; + align-items: center; + margin-bottom: 30px; +} +.shops_search { + display: block; + position: relative; + margin-right: 25px; +} +.shops_search input { + background: #292929; + padding: 12px 40px 12px 20px; + font-size: 16px; + font-weight: 400; + line-height: 1.3; + color: #fff; + border-radius: 4px; +} +.shops_search input::-webkit-input-placeholder { + color: #fff; +} +.shops_search input::-moz-placeholder { + color: #fff; +} +.shops_search input:-ms-input-placeholder { + color: #fff; +} +.shops_search input::-ms-input-placeholder { + color: #fff; +} +.shops_search input::placeholder { + color: #fff; +} +.shops_search button { + position: absolute; + top: 55%; + right: 15px; + display: block; + transform: translateY(-50%); + -moz-ransform: translateY(-50%); + -o-transform: translateY(-50%); + -ms-transform: translateY(-50%); + -webkit-transform: translateY(-50%); + background: transparent; + cursor: pointer; + border: none; + width: 16px; + height: 16px; +} +.shops_search button svg { + width: 100%; + height: 100%; + object-fit: contain; + -o-object-fit: contain; +} .shops_tab { display: -webkit-box; display: -ms-flexbox; @@ -1465,9 +1627,6 @@ input[type=date]::-webkit-calendar-picker-indicator { display: flex; -ms-flex-wrap: wrap; flex-wrap: wrap; - -webkit-box-pack: center; - -ms-flex-pack: center; - justify-content: center; margin: -5px auto; max-width: 1440px; } @@ -2152,9 +2311,6 @@ input[type=date]::-webkit-calendar-picker-indicator { -webkit-box-align: center; -ms-flex-align: center; align-items: center; - -webkit-box-pack: justify; - -ms-flex-pack: justify; - justify-content: space-between; margin-top: 50px; } .pag_group { @@ -2190,6 +2346,7 @@ input[type=date]::-webkit-calendar-picker-indicator { font-size: 18px; line-height: 25px; color: #7D7D7D; + margin-left: 20px; } @-webkit-keyframes tabActive { @@ -4881,6 +5038,23 @@ input[type=date]::-webkit-calendar-picker-indicator { .shops { padding: 20px 0 40px; } + .shops_sort { + -webkit-box-orient: vertical; + -webkit-box-direction: normal; + -ms-flex-direction: column; + flex-direction: column; + } + .shops_sort .custom-select { + width: 100%; + } + .shops_search { + margin-bottom: 15px; + margin-right: 0; + width: 100%; + } + .shops_search input { + width: calc(100% - 60px); + } .shops_tab { margin-bottom: 25px; } @@ -5094,4 +5268,4 @@ input[type=date]::-webkit-calendar-picker-indicator { .bill_item > div p { font-size: 16px; } -} +} \ No newline at end of file diff --git a/themes/berkarar/assets/css/main.scss b/themes/berkarar/assets/css/main.scss index 3807efb..373d1b9 100644 --- a/themes/berkarar/assets/css/main.scss +++ b/themes/berkarar/assets/css/main.scss @@ -1,15 +1,14 @@ - // 1-main components +@import "./components/1-main/mixin.scss"; @import "./components/1-main/nulifier.scss"; @import "./components/1-main/variables.scss"; -@import "./components/1-main/mixin.scss"; // 2-layout components @import "./components/2-layout/header.scss"; @import "./components/2-layout/breadcrumb.scss"; @import "./components/2-layout/slider.scss"; -// @import "./components/2-layout/select.scss"; +@import "./components/2-layout/select.scss"; @import "./components/2-layout/modal.scss"; @import "./components/2-layout/footer.scss"; // @import "./components/2-layout/file-input.scss"; @@ -22,7 +21,6 @@ @import "./components/3-page/post.scss"; @import "./components/3-page/result.scss"; @import "./components/3-page/404.scss"; - @import "./components/2-layout/slick.scss"; @import "./components/2-layout/slick-theme.scss"; -@import "./components/2-layout/responsive.scss"; +@import "./components/2-layout/responsive.scss"; \ No newline at end of file diff --git a/themes/berkarar/assets/images/about-1.png b/themes/berkarar/assets/images/about-1.png new file mode 100644 index 0000000..2d7b8ae Binary files /dev/null and b/themes/berkarar/assets/images/about-1.png differ diff --git a/themes/berkarar/assets/images/about-2.png b/themes/berkarar/assets/images/about-2.png new file mode 100644 index 0000000..6d25f80 Binary files /dev/null and b/themes/berkarar/assets/images/about-2.png differ diff --git a/themes/berkarar/assets/images/about-3.png b/themes/berkarar/assets/images/about-3.png new file mode 100644 index 0000000..0e61350 Binary files /dev/null and b/themes/berkarar/assets/images/about-3.png differ diff --git a/themes/berkarar/assets/images/about-4.png b/themes/berkarar/assets/images/about-4.png new file mode 100644 index 0000000..bdbb8bf Binary files /dev/null and b/themes/berkarar/assets/images/about-4.png differ diff --git a/themes/berkarar/assets/images/about-pics-1.png b/themes/berkarar/assets/images/about-pics-1.png new file mode 100644 index 0000000..d70c906 Binary files /dev/null and b/themes/berkarar/assets/images/about-pics-1.png differ diff --git a/themes/berkarar/assets/images/about-pics-2.png b/themes/berkarar/assets/images/about-pics-2.png new file mode 100644 index 0000000..e91c67c Binary files /dev/null and b/themes/berkarar/assets/images/about-pics-2.png differ diff --git a/themes/berkarar/assets/images/about-pics-3.png b/themes/berkarar/assets/images/about-pics-3.png new file mode 100644 index 0000000..ca3c8df Binary files /dev/null and b/themes/berkarar/assets/images/about-pics-3.png differ diff --git a/themes/berkarar/assets/images/about-pics-4.png b/themes/berkarar/assets/images/about-pics-4.png new file mode 100644 index 0000000..60884bb Binary files /dev/null and b/themes/berkarar/assets/images/about-pics-4.png differ diff --git a/themes/berkarar/assets/images/about-pics-5.png b/themes/berkarar/assets/images/about-pics-5.png new file mode 100644 index 0000000..666f090 Binary files /dev/null and b/themes/berkarar/assets/images/about-pics-5.png differ diff --git a/themes/berkarar/assets/images/bg.png b/themes/berkarar/assets/images/bg.png index 33ab161..da20277 100644 Binary files a/themes/berkarar/assets/images/bg.png and b/themes/berkarar/assets/images/bg.png differ diff --git a/themes/berkarar/assets/images/movie-photo.jpg b/themes/berkarar/assets/images/movie-photo.jpg new file mode 100644 index 0000000..d46f5d7 Binary files /dev/null and b/themes/berkarar/assets/images/movie-photo.jpg differ diff --git a/themes/berkarar/assets/images/movie-pic-1.png b/themes/berkarar/assets/images/movie-pic-1.png new file mode 100644 index 0000000..55c9459 Binary files /dev/null and b/themes/berkarar/assets/images/movie-pic-1.png differ diff --git a/themes/berkarar/assets/images/movie-pic-2.png b/themes/berkarar/assets/images/movie-pic-2.png new file mode 100644 index 0000000..416d151 Binary files /dev/null and b/themes/berkarar/assets/images/movie-pic-2.png differ diff --git a/themes/berkarar/assets/images/poster.png b/themes/berkarar/assets/images/poster.png new file mode 100644 index 0000000..bd30455 Binary files /dev/null and b/themes/berkarar/assets/images/poster.png differ diff --git a/themes/berkarar/assets/images/rahat-coffee.png b/themes/berkarar/assets/images/rahat-coffee.png new file mode 100644 index 0000000..a753f3d Binary files /dev/null and b/themes/berkarar/assets/images/rahat-coffee.png differ diff --git a/themes/berkarar/assets/images/restaurant-1.png b/themes/berkarar/assets/images/restaurant-1.png new file mode 100644 index 0000000..2a1779d Binary files /dev/null and b/themes/berkarar/assets/images/restaurant-1.png differ diff --git a/themes/berkarar/assets/images/restaurant-2.png b/themes/berkarar/assets/images/restaurant-2.png new file mode 100644 index 0000000..eeb0bd4 Binary files /dev/null and b/themes/berkarar/assets/images/restaurant-2.png differ diff --git a/themes/berkarar/assets/images/shop-1.png b/themes/berkarar/assets/images/shop-1.png new file mode 100644 index 0000000..05d4b46 Binary files /dev/null and b/themes/berkarar/assets/images/shop-1.png differ diff --git a/themes/berkarar/assets/images/shop-2.png b/themes/berkarar/assets/images/shop-2.png new file mode 100644 index 0000000..45ac726 Binary files /dev/null and b/themes/berkarar/assets/images/shop-2.png differ diff --git a/themes/berkarar/assets/images/svg/nav_link-arrow.png b/themes/berkarar/assets/images/svg/nav_link-arrow.png new file mode 100644 index 0000000..e5f36e8 Binary files /dev/null and b/themes/berkarar/assets/images/svg/nav_link-arrow.png differ diff --git a/themes/berkarar/assets/images/svg/select-arrow.svg b/themes/berkarar/assets/images/svg/select-arrow.svg new file mode 100644 index 0000000..6fb6067 --- /dev/null +++ b/themes/berkarar/assets/images/svg/select-arrow.svg @@ -0,0 +1,3 @@ + + + diff --git a/themes/berkarar/assets/js/customSelect.js b/themes/berkarar/assets/js/customSelect.js index eebd1b7..2f27de7 100644 --- a/themes/berkarar/assets/js/customSelect.js +++ b/themes/berkarar/assets/js/customSelect.js @@ -7,6 +7,7 @@ function initializeCustomSelect() { for (i = 0; i < l; i++) { selElmnt = x[i].getElementsByTagName("select")[0]; + var onSelectFunc = x[i].getAttribute('onCustomSelect') ll = selElmnt.length; @@ -25,11 +26,26 @@ function initializeCustomSelect() { c.addEventListener("click", function (e) { var y, i, k, s, h, sl, yl; s = this.parentNode.parentNode.getElementsByTagName("select")[0]; + // console.log(s); + // console.log(s); sl = s.length; h = this.parentNode.previousSibling; for (i = 0; i < sl; i++) { if (s.options[i].innerHTML == this.innerHTML) { s.selectedIndex = i; + + + // console.log(s.options[i]); + + // for (var j = 0; j < s.options.length; j++) { + // s.options[j].removeAttribute("selected"); + // } + // s.options[i].setAttribute("selected", "selected"); + // console.log(s.options[i]); + handleChange(s.selectedIndex); + + + h.innerHTML = this.innerHTML; y = this.parentNode.getElementsByClassName("same-as-selected"); yl = y.length; @@ -93,3 +109,20 @@ function closeAllSelect(elmnt) { then close all select boxes: */ document.addEventListener("click", closeAllSelect); initializeCustomSelect(); + + +function handleChange(selectElement) { + var floorID = selectElement; // Get the selected value of the dropdown + console.log("Selected Value:", floorID); + + $.request('onUpdate', { + data: { floorID: floorID }, + update: { + 'home/shop_item': '#rest-all', + 'home/pagination': '#pagination-container' // Update this with the correct ID or selector + } + }); + + + return false; +} diff --git a/themes/berkarar/layouts/default.htm b/themes/berkarar/layouts/default.htm index 3a2cca1..1f314d9 100644 --- a/themes/berkarar/layouts/default.htm +++ b/themes/berkarar/layouts/default.htm @@ -119,10 +119,25 @@ function onStart(){ + + + + + {% framework extras %} {% scripts %} + + + + \ No newline at end of file diff --git a/themes/berkarar/pages/shop.htm b/themes/berkarar/pages/shop.htm index 71b417c..dfd5245 100644 --- a/themes/berkarar/pages/shop.htm +++ b/themes/berkarar/pages/shop.htm @@ -160,7 +160,7 @@ function onStart(){
- Посмотреть все + {{'Посмотреть все'|_}} diff --git a/themes/berkarar/pages/top_category.htm b/themes/berkarar/pages/top_category.htm index dc64278..10f3d14 100644 --- a/themes/berkarar/pages/top_category.htm +++ b/themes/berkarar/pages/top_category.htm @@ -4,20 +4,67 @@ layout = "default" is_hidden = 0 == param('id'); + $currentUrl = url()->full(); + $urlComponents = parse_url($currentUrl); + $queryString = $urlComponents['query'] ?? ''; + parse_str($queryString, $queryParams); + $floorID = $queryParams['floor'] ?? null; - if($this['id'] != 0){ - $this['top_category'] = Tps\Shops\Models\TopCategory::where("id", $this['id'])->get()->first(); - $categories = $this['top_category']->categories->pluck('id')->toArray(); + if (!is_null($floorID)) { + $this['id'] = $this->param('id'); - $this['shops'] = Tps\Shops\Models\Shop::whereIn('category_id', $categories)->paginate(12); - }else{ - $this['shops'] = Tps\Shops\Models\Shop::orderBy('created_at')->paginate(12); + if ($this['id'] != 0) { + $this['top_category'] = Tps\Shops\Models\TopCategory::where("id", $this['id'])->first(); + $categories = $this['top_category']->categories->pluck('id')->toArray(); + + $this['shops'] = Tps\Shops\Models\Shop::whereIn('category_id', $categories) + ->where('floor', $floorID) + ->paginate(12) + ->appends(['floor' => $floorID]); + } else { + $this['shops'] = Tps\Shops\Models\Shop::where('floor', $floorID) + ->orderBy('created_at') + ->paginate(12) + ->appends(['floor' => $floorID]); + } + } else { + $this['id'] = $this->param('id'); + + if ($this['id'] != 0) { + $this['top_category'] = Tps\Shops\Models\TopCategory::where("id", $this['id'])->first(); + $categories = $this['top_category']->categories->pluck('id')->toArray(); + + $this['shops'] = Tps\Shops\Models\Shop::whereIn('category_id', $categories)->paginate(12); + } else { + $this['shops'] = Tps\Shops\Models\Shop::orderBy('created_at')->paginate(12); + } } - } + + +function onUpdate() +{ + + $floorID = post('floorID'); + + $data = Tps\Shops\Models\Shop::orderBy('created_at') + ->where('floor', $floorID) + ->paginate(12) + ->appends(['floor' => $floorID]); + + return [ + 'home/shop_item' => $this->renderPartial('home/shop_item', ['shops' => $data]), + 'home/pagination' => $this->renderPartial('home/pagination', ['result' => $data]) // Update this with the correct data + ]; +} + + + + + ?> ==
@@ -52,14 +99,54 @@ function onStart(){
+ + +
+
+ + + +
+
- {% for shop in shops%} - {% partial 'home/shop_item' shop=shop %} - {% endfor %} + {% partial 'home/shop_item' shops=shops %}
{% partial 'home/pagination' result=shops %}
+ +
+ diff --git a/themes/berkarar/partials/home/pagination.htm b/themes/berkarar/partials/home/pagination.htm index 01b6578..2e9c0ee 100644 --- a/themes/berkarar/partials/home/pagination.htm +++ b/themes/berkarar/partials/home/pagination.htm @@ -1,6 +1,6 @@ {% if result.hasPages %} -
+ - \ No newline at end of file + +{% endfor %} \ No newline at end of file diff --git a/themes/berkarar/partials/home/slider.htm b/themes/berkarar/partials/home/slider.htm index 91ff8db..377e6fd 100644 --- a/themes/berkarar/partials/home/slider.htm +++ b/themes/berkarar/partials/home/slider.htm @@ -51,10 +51,7 @@ // updateSliderCounter(slick); }); - + $slider.slick(); }