diff --git a/resources/views/segments/default-assets/coin-left.png b/resources/views/segments/default-assets/coin-left.png new file mode 100644 index 0000000..78a2741 Binary files /dev/null and b/resources/views/segments/default-assets/coin-left.png differ diff --git a/resources/views/segments/default-assets/gold-right.png b/resources/views/segments/default-assets/gold-right.png new file mode 100644 index 0000000..c5b4d3a Binary files /dev/null and b/resources/views/segments/default-assets/gold-right.png differ diff --git a/resources/views/segments/products/PedramProducts/PedramProducts.blade.php b/resources/views/segments/products/PedramProducts/PedramProducts.blade.php new file mode 100644 index 0000000..1afe899 --- /dev/null +++ b/resources/views/segments/products/PedramProducts/PedramProducts.blade.php @@ -0,0 +1,62 @@ +
+ + + + + [right] + [left] +
+
+

+ {{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) + + @endforeach +
+
+ +
+ + + +
diff --git a/resources/views/segments/products/PedramProducts/PedramProducts.js b/resources/views/segments/products/PedramProducts/PedramProducts.js new file mode 100644 index 0000000..6f6ee80 --- /dev/null +++ b/resources/views/segments/products/PedramProducts/PedramProducts.js @@ -0,0 +1,16 @@ +document.addEventListener('DOMContentLoaded',function () { + document.querySelectorAll('.pedi-tab-control li')?.forEach(function (el) { + el.addEventListener('click',function () { + el.closest('.content').querySelectorAll('.pedi-tab').forEach(function (el2) { + el2.style.display = 'none'; + }); + el.closest('.content').querySelectorAll('.pedi-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/PedramProducts/PedramProducts.json b/resources/views/segments/products/PedramProducts/PedramProducts.json new file mode 100644 index 0000000..d55bcc7 --- /dev/null +++ b/resources/views/segments/products/PedramProducts/PedramProducts.json @@ -0,0 +1,10 @@ +{ + "name": "PedramProducts", + "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/PedramProducts/PedramProducts.php b/resources/views/segments/products/PedramProducts/PedramProducts.php new file mode 100644 index 0000000..dbf7a7c --- /dev/null +++ b/resources/views/segments/products/PedramProducts/PedramProducts.php @@ -0,0 +1,88 @@ +section = 'theme'; + $setting->key = $part->area_name . '_' . $part->part.'_title'; + $setting->value = 'My 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' => 'pedi-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 = '#ffffff'; + $setting->data = json_encode(['name' => 'pedi-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(); + + $setting = new Setting(); + $setting->section = 'theme'; + $setting->key = $part->area_name . '_' . $part->part.'1_png'; + $setting->value = null; + $setting->type = 'FILE'; + $setting->size = 6; + $setting->title = $part->area_name . ' ' . $part->part.' Image'; + $setting->save(); + + File::copy(__DIR__.'/../../default-assets/coin-left.png',public_path('upload/images/').$part->area_name . '.' . $part->part.'.png'); + $setting = new Setting(); + $setting->section = 'theme'; + $setting->key = $part->area_name . '_' . $part->part.'2_png'; + $setting->value = null; + $setting->type = 'FILE'; + $setting->size = 6; + $setting->title = $part->area_name . ' ' . $part->part.' Image'; + $setting->save(); + + File::copy(__DIR__.'/../../default-assets/gold-right.png',public_path('upload/images/').$part->area_name . '.' . $part->part.'.png'); + } + 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.'_color_bg')->first()?->delete(); + Setting::where('key',$part->area_name . '_' . $part->part.'_color_text')->first()?->delete(); + Setting::where('key',$part->area_name . '_' . $part->part.'1_png')->first()?->delete(); + Setting::where('key',$part->area_name . '_' . $part->part.'2_png')->first()?->delete(); + } + public static function onMount(Part $part = null) + { + return $part; + } +} diff --git a/resources/views/segments/products/PedramProducts/PedramProducts.scss b/resources/views/segments/products/PedramProducts/PedramProducts.scss new file mode 100644 index 0000000..3674fb6 --- /dev/null +++ b/resources/views/segments/products/PedramProducts/PedramProducts.scss @@ -0,0 +1,127 @@ +.PedramProducts { + margin-top: 1rem; + overflow-x: hidden; + position: relative; + + .content { + background: var(--pedi-bg-color); + color: var(--pedi-text-color); + } + + svg:first-child { + width: calc(176% + 1.3px); + height: 171px; + transform: rotateY(180deg) rotateZ(180deg); + display: block; + left: 50%; + position: relative; + } + + svg:last-child { + width: calc(100%); + //height: 171px; + //transform: rotateY(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; + color: var(--xshop-text); + border-radius: var(--xshop-border-radius); + + &.active { + //text-shadow: 3px 3px 0px #000000; + border: 1px solid var(--pedi-bg-color); + } + + &:hover { + background: var(--pedi-bg-color); + } + } + } + + .pedi-tab { + display: none; + + &.active { + display: block; + } + + padding-bottom: 2rem; + } + + .content2 { + background: var(--xshop-background); + border-radius: var(--xshop-border-radius); + padding: 1rem; + } + + .pedi-product { + display: block; + border: 1px dashed var(--pedi-bg-color); + padding: 5px; + border-radius: var(--xshop-border-radius); + margin-bottom: 1rem; + overflow: hidden; + color: var(--xshop-text); + position: relative; + + span { + inset-inline-end: 1rem; + top: 1rem; + position: absolute; + font-size: 20px; + } + + h4 { + padding: 1rem; + } + + img { + margin: 1rem; + width: 100px; + height: 100px; + border-radius: 50%; + object-fit: cover; + } + } + + .right-img { + position: absolute; + right: 0; + top: 10rem; + } + + .left-img { + position: absolute; + left: 0; + bottom: 10rem; + } +} + +/*-968px width*/ +@media (max-width: 968px) { + + .PedramProducts { + .content2 { + position: relative; + } + } +} diff --git a/resources/views/segments/products/PedramProducts/screenshot.png b/resources/views/segments/products/PedramProducts/screenshot.png new file mode 100644 index 0000000..a2242e7 Binary files /dev/null and b/resources/views/segments/products/PedramProducts/screenshot.png differ diff --git a/resources/views/segments/products/TalWaveProducts/TalWaveProducts.php b/resources/views/segments/products/TalWaveProducts/TalWaveProducts.php index 5b3b581..9b9965d 100644 --- a/resources/views/segments/products/TalWaveProducts/TalWaveProducts.php +++ b/resources/views/segments/products/TalWaveProducts/TalWaveProducts.php @@ -35,7 +35,7 @@ class TalWaveProducts $setting = new Setting(); $setting->section = 'theme'; $setting->key = $part->area_name . '_' . $part->part.'_color_text'; - $setting->value = '#ffae00'; + $setting->value = '#ffffff'; $setting->data = json_encode(['name' => 'tal-text-color']); $setting->type = 'COLOR'; $setting->size = 4;