diff --git a/resources/views/segments/products/TalWaveProducts/TalWaveProducts.blade.php b/resources/views/segments/products/TalWaveProducts/TalWaveProducts.blade.php new file mode 100644 index 0000000..47b4f7c --- /dev/null +++ b/resources/views/segments/products/TalWaveProducts/TalWaveProducts.blade.php @@ -0,0 +1,53 @@ +
+ + + + + + + + + + + + +
+
+

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

+
    + @foreach(getCategorySubCatsBySetting($data->area_name.'_'.$data->part.'_category') as $k => $cat) +
  • + {{$cat->name}} +
  • + @endforeach +
+ + @foreach(getCategorySubCatsBySetting($data->area_name.'_'.$data->part.'_category') as $k => $cat) +
+
+ + @foreach($cat->products()->limit(4)->get() as $product) +
+
+ @include(\App\Models\Area::where('name','product-grid')->first()->defPart(),compact('product')) +
+
+ @endforeach +
+
+ @endforeach +
+ +
+
diff --git a/resources/views/segments/products/TalWaveProducts/TalWaveProducts.js b/resources/views/segments/products/TalWaveProducts/TalWaveProducts.js new file mode 100644 index 0000000..8f3b9ab --- /dev/null +++ b/resources/views/segments/products/TalWaveProducts/TalWaveProducts.js @@ -0,0 +1,16 @@ +document.addEventListener('DOMContentLoaded',function () { + document.querySelectorAll('.tal-tab-control li')?.forEach(function (el) { + el.addEventListener('click',function () { + el.closest('.content').querySelectorAll('.tal-tab').forEach(function (el2) { + el2.style.display = 'none'; + }); + el.closest('.content').querySelectorAll('.tal-tab-control li').forEach(function (el2) { + el2.classList.remove('active'); + }); + el.classList.add('active'); + el.closest('.content') + .querySelector(el.getAttribute('data-id')) + .style.display = 'block'; + }); + }) +}); diff --git a/resources/views/segments/products/TalWaveProducts/TalWaveProducts.json b/resources/views/segments/products/TalWaveProducts/TalWaveProducts.json new file mode 100644 index 0000000..0e23a98 --- /dev/null +++ b/resources/views/segments/products/TalWaveProducts/TalWaveProducts.json @@ -0,0 +1,10 @@ +{ + "name": "TalWaveProducts", + "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/products/TalWaveProducts/TalWaveProducts.php b/resources/views/segments/products/TalWaveProducts/TalWaveProducts.php new file mode 100644 index 0000000..5b3b581 --- /dev/null +++ b/resources/views/segments/products/TalWaveProducts/TalWaveProducts.php @@ -0,0 +1,66 @@ +section = 'theme'; + $setting->key = $part->area_name . '_' . $part->part.'_title'; + $setting->value = 'Our products'; + $setting->type = 'TEXT'; + $setting->size = 12; + $setting->title = $part->area_name . ' ' . $part->part .' title'; + $setting->save(); + + + $setting = new Setting(); + $setting->section = 'theme'; + $setting->key = $part->area_name . '_' . $part->part.'_color_bg'; + $setting->value = gfx()['primary']; + $setting->data = json_encode(['name' => 'tal-bg-color']); + $setting->type = 'COLOR'; + $setting->size = 4; + $setting->title = $part->area_name . ' ' . $part->part .' background color'; + $setting->save(); + + $setting = new Setting(); + $setting->section = 'theme'; + $setting->key = $part->area_name . '_' . $part->part.'_color_text'; + $setting->value = '#ffae00'; + $setting->data = json_encode(['name' => 'tal-text-color']); + $setting->type = 'COLOR'; + $setting->size = 4; + $setting->title = $part->area_name . ' ' . $part->part .' text color'; + $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(); + } + 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.'_color_bg')->first()?->delete(); + Setting::where('key',$part->area_name . '_' . $part->part.'_color_text')->first()?->delete(); + Setting::where('key',$part->area_name . '_' . $part->part.'_category')->first()?->delete(); + } + public static function onMount(Part $part = null) + { + return $part; + } +} diff --git a/resources/views/segments/products/TalWaveProducts/TalWaveProducts.scss b/resources/views/segments/products/TalWaveProducts/TalWaveProducts.scss new file mode 100644 index 0000000..9f8f271 --- /dev/null +++ b/resources/views/segments/products/TalWaveProducts/TalWaveProducts.scss @@ -0,0 +1,58 @@ +.TalWaveProducts { + margin-top: 1rem; + // scss + overflow-x: hidden; + .content{ + background: var(--tal-bg-color); + color: var(--tal-text-color); + } + + svg{ + width: calc(176% + 1.3px); + height: 171px; + transform: rotateY(180deg) rotateZ(180deg); + display: block; + left: 50%; + position: relative; + } + + h1{ + text-align: center; + font-weight: 400; + font-size: 35px; + } + + ul{ + list-style: none; + padding-bottom: 2rem; + display: flex; + align-items: center; + justify-content: space-around; + + li{ + cursor: pointer; + padding: .5rem; + border-bottom: 1px solid transparent; + &.active{ + //text-shadow: 3px 3px 0px #000000; + border-bottom: 1px solid var(--tal-text-color); + } + } + } + + .tal-tab{ + display: none; + + &.active{ + display: block; + } + + padding-bottom: 2rem; + } + .xshop-product-item{ + color: var(--tal-bg-color); + background: var(--tal-text-color); + margin-bottom: 1rem; + } + +} diff --git a/resources/views/segments/products/TalWaveProducts/screenshot.png b/resources/views/segments/products/TalWaveProducts/screenshot.png new file mode 100644 index 0000000..7eb3846 Binary files /dev/null and b/resources/views/segments/products/TalWaveProducts/screenshot.png differ