diff --git a/resources/sass/client-custom/_zfix.scss b/resources/sass/client-custom/_zfix.scss index 0d26364..46e8a6c 100644 --- a/resources/sass/client-custom/_zfix.scss +++ b/resources/sass/client-custom/_zfix.scss @@ -146,3 +146,7 @@ ul.pagination { .accordion-button:not(.collapsed){ background: transparent; } + +.btn-outline-light:hover{ + color: black !important; +} diff --git a/resources/views/segments/categories/CurveCategories/CurveCategories.blade.php b/resources/views/segments/categories/CurveCategories/CurveCategories.blade.php new file mode 100644 index 0000000..b2301b2 --- /dev/null +++ b/resources/views/segments/categories/CurveCategories/CurveCategories.blade.php @@ -0,0 +1,42 @@ +
+ + +
+ +
+
+ {{-- class="{{gfx()['container']}}"--}} + +

+ {{getSetting($part->area_name . '_' . $part->part.'_title')}} +

+
+ +
+ +
+
+ +
+ +
+ @foreach(getCategorySubCatsBySetting($part->area_name . '_' . $part->part.'_category') as $cat) + + @endforeach +
+
+
+ +
+ +
+
diff --git a/resources/views/segments/categories/CurveCategories/CurveCategories.js b/resources/views/segments/categories/CurveCategories/CurveCategories.js new file mode 100644 index 0000000..19e707c --- /dev/null +++ b/resources/views/segments/categories/CurveCategories/CurveCategories.js @@ -0,0 +1,52 @@ +import {tns} from "tiny-slider/src/tiny-slider"; + +var curveCatSlider ; + +document.addEventListener('DOMContentLoaded', () => { + document.querySelectorAll('#curve-slider-cat')?.forEach(function (el) { + if (el.classList.contains('.tns-slider')){ + console.log('ignore'); + return 'ignore'; + } + curveCatSlider = tns({ + container: el, + responsive:{ + 560:{ + items: 1.5, + }, + 1000:{ + items: 3.5, + }, + 1400:{ + items: 5.5, + }, + + }, + // edgePadding: 50, + autoplay: true, + autoplayButton: false, + mouseDrag: true, + prevButton: false, + nextButton: false, + autoplayTimeout: 8000, + center: true, + nav: true, + loop:true, + }); + }); + // + document.querySelector('#crc-nxt')?.addEventListener('click',function () { + if (document.documentElement.getAttribute('dir') === 'rtl'){ + curveCatSlider.goTo('prev'); + }else{ + curveCatSlider.goTo('next'); + } + }); + document.querySelector('#crc-prv')?.addEventListener('click',function () { + if (document.documentElement.getAttribute('dir') !== 'rtl'){ + curveCatSlider.goTo('prev'); + }else{ + curveCatSlider.goTo('next'); + } + }); +}); diff --git a/resources/views/segments/categories/CurveCategories/CurveCategories.json b/resources/views/segments/categories/CurveCategories/CurveCategories.json new file mode 100644 index 0000000..24bdfb5 --- /dev/null +++ b/resources/views/segments/categories/CurveCategories/CurveCategories.json @@ -0,0 +1,10 @@ +{ + "name": "CurveCategories", + "version": "1.0", + "author": "xStack", + "email": "xshop@xstack.ir", + "license": "GPL-3.0-or-later", + "url": "https:\/\/xstack.ir", + "author_url": "https:\/\/4xmen.ir", + "packages": [] +} \ No newline at end of file diff --git a/resources/views/segments/categories/CurveCategories/CurveCategories.php b/resources/views/segments/categories/CurveCategories/CurveCategories.php new file mode 100644 index 0000000..17e1d98 --- /dev/null +++ b/resources/views/segments/categories/CurveCategories/CurveCategories.php @@ -0,0 +1,56 @@ +section = 'theme'; + $setting->key = $part->area_name . '_' . $part->part.'_title'; + $setting->value = 'Lorem ipsum dolor sit amet'; + $setting->type = 'TEXT'; + $setting->size = 4; + $setting->title = $part->area_name . ' ' . $part->part .' titles'; + $setting->save(); + + + $setting = new Setting(); + $setting->section = 'theme'; + $setting->key = $part->area_name . '_' . $part->part.'_category'; + $setting->value = Category::first()->id; + $setting->type = 'CATEGORY'; + $setting->size = 4; + $setting->title = $part->area_name . ' ' . $part->part .' category'; + $setting->save(); + + + $setting = new Setting(); + $setting->section = 'theme'; + $setting->key = $part->area_name . '_' . $part->part.'_bg'; + $setting->value = gfx()['secondary']; + $setting->type = 'COLOR'; + $setting->data = json_encode(['name' => 'curve-slider-bg']); + $setting->size = 4; + $setting->title = $part->area_name . ' ' . $part->part .' background color'; + $setting->save(); + + + + } + public static function onRemove(Part $part = null) + { + Setting::where('key',$part->area_name . '_' . $part->part.'_title')->first()?->delete(); + Setting::where('key',$part->area_name . '_' . $part->part.'_category')->first()?->delete(); + Setting::where('key',$part->area_name . '_' . $part->part.'bg')->first()?->delete(); + } + public static function onMount(Part $part = null) + { + return $part; + } +} diff --git a/resources/views/segments/categories/CurveCategories/CurveCategories.scss b/resources/views/segments/categories/CurveCategories/CurveCategories.scss new file mode 100644 index 0000000..180f17e --- /dev/null +++ b/resources/views/segments/categories/CurveCategories/CurveCategories.scss @@ -0,0 +1,171 @@ +#CurveCategories { + position: relative; + background: var(--curve-slider-bg); + + + h1{ + position: relative; + z-index: 33; + margin-bottom: 1rem; + font-size: 30px; + font-weight: 300; + } + #curve-cat-top, #curve-cat-bottom { + height: 10rem; + position: relative; + background: transparent; + overflow: hidden; + + } + + #curve-cat-top { + + margin-bottom: -4.5rem; + + z-index: 15; + + &:before { + content: " "; + position: absolute; + bottom: 0; + left: 0; + width: 100%; + height: 700%; + background: var(--xshop-background); + border-radius: 50%; + transform: scaleX(1.75); + } + + } + + #curve-cat-bottom { + margin-top: -2.5rem; + z-index: 10; + + &:before { + content: " "; + position: absolute; + top: 0; + left: 0; + width: 100%; + height: 700%; + background: var(--xshop-background); + border-radius: 50%; + transform: scaleX(1.75); + } + } + + #curve-slider-cat-container { + height: 35vh; + + #curve-slider-cat{ + //width: 100vw; + //left: 0; + //right: 0; + } + + .slider-content { + transform: translateX(25%); + } + + &:before, &:after { + content: ' '; + position: absolute; + top: 0; + bottom: 0; + width: 45%; + z-index: 9; + pointer-events: none; + } + + &:before { + background: linear-gradient(90deg, var(--curve-slider-bg) 20%, rgba(0, 0, 0, 0) 100%); + left: 0; + } + + &:after { + background: linear-gradient(-90deg, var(--curve-slider-bg) 20%, rgba(0, 0, 0, 0) 100%); + right: 0; + } + + + .sld-btn,.tns-nav{ + z-index: 70; + position: absolute; + top: 75%; + cursor: pointer; + i{ + font-size: 35px; + } + } + + #crc-nxt{ + right:calc(50% - 100px); + transform: translateX(-50%); + } + #crc-prv{ + left:calc(50% - 100px); + transform: translateX(50%); + } + + .tns-nav{ + display: flex !important; + width: 150px; + left:calc(50% - 75px); + height: 50px; + + align-items: center; + justify-content: space-evenly; + button{ + display: inline-block; + margin: 3px; + width: 10px; + height: 10px; + border-radius: var(--xshop-border-radius); + background: #00000044; + border: 0; + } + + .tns-nav-active{ + + background: var(--xshop-primary); + } + } + } + + .curve-cat-item { + height: 35vh; + position: relative; + img { + height: 100%; + width: 100%; + object-fit: cover; + } + + h4{ + position: absolute; + bottom: 45%; + left: 0; + right: 0; + width: 100%; + text-align: center; + z-index: 33; + background: var(--xshop-background); + padding: .5rem; + transition: 300ms; + font-weight: 400; + opacity: 0; + } + + &:hover{ + h4{ + opacity: 1; + } + } + + + + } + + +} diff --git a/resources/views/segments/categories/CurveCategories/screenshot.png b/resources/views/segments/categories/CurveCategories/screenshot.png new file mode 100644 index 0000000..c715a5f Binary files /dev/null and b/resources/views/segments/categories/CurveCategories/screenshot.png differ diff --git a/resources/views/segments/products/SamiraProductSlider/SamiraProductSlider.blade.php b/resources/views/segments/products/SamiraProductSlider/SamiraProductSlider.blade.php index 70b17a9..0d8c228 100644 --- a/resources/views/segments/products/SamiraProductSlider/SamiraProductSlider.blade.php +++ b/resources/views/segments/products/SamiraProductSlider/SamiraProductSlider.blade.php @@ -28,6 +28,7 @@ {{__("View product")}} +   diff --git a/resources/views/segments/products/SamiraProductSlider/SamiraProductSlider.js b/resources/views/segments/products/SamiraProductSlider/SamiraProductSlider.js index e231d42..ed20603 100644 --- a/resources/views/segments/products/SamiraProductSlider/SamiraProductSlider.js +++ b/resources/views/segments/products/SamiraProductSlider/SamiraProductSlider.js @@ -1,6 +1,6 @@ import {tns} from "tiny-slider/src/tiny-slider"; -var author ; +var samSlider ; document.addEventListener('DOMContentLoaded', () => { document.querySelectorAll('#samira-slider')?.forEach(function (el) { @@ -8,7 +8,7 @@ document.addEventListener('DOMContentLoaded', () => { console.log('ignore'); return 'ignore'; } - author = tns({ + samSlider = tns({ container: el, items: 1.5, // edgePadding: 50, @@ -26,16 +26,16 @@ document.addEventListener('DOMContentLoaded', () => { document.querySelector('#sam-nxt')?.addEventListener('click',function () { if (document.documentElement.getAttribute('dir') === 'rtl'){ - author.goTo('prev'); + samSlider.goTo('prev'); }else{ - author.goTo('next'); + samSlider.goTo('next'); } }); document.querySelector('#sam-prv')?.addEventListener('click',function () { if (document.documentElement.getAttribute('dir') !== 'rtl'){ - author.goTo('prev'); + samSlider.goTo('prev'); }else{ - author.goTo('next'); + samSlider.goTo('next'); } }); });