diff --git a/resources/sass/client-custom/_general.scss b/resources/sass/client-custom/_general.scss index 2ac2f18..eb2150c 100644 --- a/resources/sass/client-custom/_general.scss +++ b/resources/sass/client-custom/_general.scss @@ -33,6 +33,10 @@ body { } +section { + max-width: 100%; +} + #website-preloader { transition: 500ms; } @@ -129,18 +133,21 @@ body { } -.tag-page{ +.tag-page { min-height: 60vh; - .tab-control{ + + .tab-control { padding-left: 12px; padding-right: 12px; } - .tab-control a.active{ + + .tab-control a.active { background: var(--xshop-primary); color: var(--xshop-diff); } - .tab-content{ + + .tab-content { background: transparent; } } @@ -148,7 +155,7 @@ body { .tab-content { display: none; padding: 1rem; - background: var(--karen-tab-bg-color,#ffffff); + background: var(--karen-tab-bg-color, #ffffff); &.active { display: block; @@ -157,16 +164,15 @@ body { } -.x64-img{ +.x64-img { width: 64px; height: 64px; object-fit: cover; } - @media print { - .no-print{ + .no-print { display: none; } } diff --git a/resources/sass/client-custom/_zfix.scss b/resources/sass/client-custom/_zfix.scss index 6daf774..0d26364 100644 --- a/resources/sass/client-custom/_zfix.scss +++ b/resources/sass/client-custom/_zfix.scss @@ -14,6 +14,14 @@ } } + + + + +.tns-inner{ + overflow: hidden; +} + a, a:visited { text-decoration: none; color: var(--xshop-primary); diff --git a/resources/views/segments/header/ParallaxHeader/ParallaxHeader.php b/resources/views/segments/header/ParallaxHeader/ParallaxHeader.php index a7987bb..42b22e5 100644 --- a/resources/views/segments/header/ParallaxHeader/ParallaxHeader.php +++ b/resources/views/segments/header/ParallaxHeader/ParallaxHeader.php @@ -16,11 +16,11 @@ class ParallaxHeader $setting->key = $part->area->name . '_' . $part->part.'_jpg'; $setting->value = null; $setting->type = 'FILE'; - $setting->size = 6; + $setting->size = 12; $setting->title = $part->area->name . ' ' . $part->part.' default image'; $setting->save(); - File::copy(__DIR__.'/../../default-assets/bg.jpg',public_path('upload/images/').$part->area->name . '_' . $part->part.'.jpg'); + File::copy(__DIR__.'/../../default-assets/bg.jpg',public_path('upload/images/').$part->area->name . '.' . $part->part.'.jpg'); } public static function onRemove(Part $part = null) { diff --git a/resources/views/segments/posts/PostsSlider/PostsSlider.blade.php b/resources/views/segments/posts/PostsSlider/PostsSlider.blade.php new file mode 100644 index 0000000..d2e8782 --- /dev/null +++ b/resources/views/segments/posts/PostsSlider/PostsSlider.blade.php @@ -0,0 +1,27 @@ +
+
+

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

+ +
+
+ +
+ + @foreach( getGroupPostsBySetting($data->area->name.'_'.$data->part.'_group',10) as $post ) + + @endforeach +
+
+
diff --git a/resources/views/segments/posts/PostsSlider/PostsSlider.js b/resources/views/segments/posts/PostsSlider/PostsSlider.js new file mode 100644 index 0000000..19691d6 --- /dev/null +++ b/resources/views/segments/posts/PostsSlider/PostsSlider.js @@ -0,0 +1,43 @@ +import {tns} from "tiny-slider/src/tiny-slider"; + +var postsSlider ; + +document.addEventListener('DOMContentLoaded', () => { + document.querySelectorAll('#posts-slider')?.forEach(function (el) { + if (el.classList.contains('.tns-slider')){ + console.log('ignore'); + return 'ignore'; + } + postsSlider = tns({ + container: el, + autoplay: true, + autoplayButton: false, + // nextButton: false, + controls: false, + mouseDrag: true, + autoplayTimeout: 5000, + gutter: 10, + responsive:{ + 560:{ + items: 2, + edgePadding: 30, + }, + 768:{ + items: 4, + edgePadding: 40, + }, + 1000:{ + items: 5, + edgePadding: 50, + }, + 1400:{ + items: 6, + edgePadding: 60, + }, + + }, + // speed:10000, + }); + }); + +}); diff --git a/resources/views/segments/posts/PostsSlider/PostsSlider.json b/resources/views/segments/posts/PostsSlider/PostsSlider.json new file mode 100644 index 0000000..c267da2 --- /dev/null +++ b/resources/views/segments/posts/PostsSlider/PostsSlider.json @@ -0,0 +1,10 @@ +{ + "name": "PostsSlider", + "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/posts/PostsSlider/PostsSlider.php b/resources/views/segments/posts/PostsSlider/PostsSlider.php new file mode 100644 index 0000000..10357e6 --- /dev/null +++ b/resources/views/segments/posts/PostsSlider/PostsSlider.php @@ -0,0 +1,55 @@ +section = 'theme'; + $setting->key = $part->area->name . '_' . $part->part.'_title'; + $setting->value = 'Lorem ipsum dolor sit amet'; + $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.'_group'; + $setting->value = Group::first()->id; + $setting->size = 6; + $setting->type = 'GROUP'; +// $setting->data = json_encode(['xmin' => 2, 'xmax' => 90]); + $setting->title = $part->area->name . ' ' . $part->part. ' group'; + $setting->save(); + + + + $setting = new Setting(); + $setting->section = 'theme'; + $setting->key = $part->area->name . '_' . $part->part.'_color'; + $setting->value = gfx()['primary']; + $setting->type = 'COLOR'; + $setting->data = json_encode(['name' => 'post-slider-color']); + $setting->size = 6; + $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.'_group')->first()?->delete(); + Setting::where('key',$part->area->name . '_' . $part->part.'_color')->first()?->delete(); + } + public static function onMount(Part $part = null) + { + return $part; + } +} diff --git a/resources/views/segments/posts/PostsSlider/PostsSlider.scss b/resources/views/segments/posts/PostsSlider/PostsSlider.scss new file mode 100644 index 0000000..d560187 --- /dev/null +++ b/resources/views/segments/posts/PostsSlider/PostsSlider.scss @@ -0,0 +1,67 @@ +.PostsSlider { + // scss + padding: 3rem 0; + background: var(--post-slider-color); + color: var(--xshop-diff); + + h1{ + font-size: 30px; + font-weight: 300; + margin-bottom: 2rem; + } + + #posts-slider-container{ + position: relative; + &:before,&:after{ + content: ' '; + top: 0; + bottom: 0; + width: 20%; + position: absolute; + z-index: 9; + } + + &:before{ + left: 0; + background: linear-gradient(90deg, var(--post-slider-color) 20%, rgba(0,0,0,0) 100%); + + } + &:after{ + right: 0; + background: linear-gradient(-90deg, var(--post-slider-color) 20%, rgba(0,0,0,0) 100%); + + } + } + .post-slider{ + border-radius: var(--xshop-border-radius); + position: relative; + img{ + width: 100%; + height: 35vh; + border-radius: var(--xshop-border-radius); + object-fit: cover; + } + + h3{ + position: absolute; + bottom: 0; + right: 0; + left: 0; + font-size: 17px; + text-align: center; + color: transparent; + padding: 1rem 0; + transition: 400ms; + margin-bottom: 0; + font-weight: 400; + } + + &:hover{ + h3{ + color: white; + background: #00000077; + } + } + + } +} diff --git a/resources/views/segments/posts/PostsSlider/screenshot.png b/resources/views/segments/posts/PostsSlider/screenshot.png new file mode 100644 index 0000000..dd18a61 Binary files /dev/null and b/resources/views/segments/posts/PostsSlider/screenshot.png differ