diff --git a/app/Models/Area.php b/app/Models/Area.php index 573bd62..1ba5097 100644 --- a/app/Models/Area.php +++ b/app/Models/Area.php @@ -29,6 +29,7 @@ class Area extends Model 'group', 'groups', 'groups_page', + 'header', 'index', 'invoice', 'login', diff --git a/public/upload/images/index.ParallaxHeader.jpg b/public/upload/images/index.ParallaxHeader.jpg new file mode 100644 index 0000000..8f60d93 Binary files /dev/null and b/public/upload/images/index.ParallaxHeader.jpg differ diff --git a/resources/views/segments/header/ParallaxHeader/ParallaxHeader.blade.php b/resources/views/segments/header/ParallaxHeader/ParallaxHeader.blade.php new file mode 100644 index 0000000..9660f6f --- /dev/null +++ b/resources/views/segments/header/ParallaxHeader/ParallaxHeader.blade.php @@ -0,0 +1,10 @@ +
+
+

+ {{$title}} +

+

+ {{$subtitle}} +

+
+
diff --git a/resources/views/segments/header/ParallaxHeader/ParallaxHeader.js b/resources/views/segments/header/ParallaxHeader/ParallaxHeader.js new file mode 100644 index 0000000..e69de29 diff --git a/resources/views/segments/header/ParallaxHeader/ParallaxHeader.json b/resources/views/segments/header/ParallaxHeader/ParallaxHeader.json new file mode 100644 index 0000000..2badf1d --- /dev/null +++ b/resources/views/segments/header/ParallaxHeader/ParallaxHeader.json @@ -0,0 +1,10 @@ +{ + "name": "ParallaxHeader", + "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/header/ParallaxHeader/ParallaxHeader.php b/resources/views/segments/header/ParallaxHeader/ParallaxHeader.php new file mode 100644 index 0000000..0704e9e --- /dev/null +++ b/resources/views/segments/header/ParallaxHeader/ParallaxHeader.php @@ -0,0 +1,33 @@ +section = 'theme'; + $setting->key = $part->area->name . '_' . $part->part.'_jpg'; + $setting->value = null; + $setting->type = 'FILE'; + $setting->size = 6; + $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'); + } + public static function onRemove(Part $part = null) + { + Setting::where('key',$part->area->name . '_' . $part->part.'_jpg')->first()?->delete(); + } + public static function onMount(Part $part = null) + { + return $part; + } +} diff --git a/resources/views/segments/header/ParallaxHeader/ParallaxHeader.scss b/resources/views/segments/header/ParallaxHeader/ParallaxHeader.scss new file mode 100644 index 0000000..06d3fe1 --- /dev/null +++ b/resources/views/segments/header/ParallaxHeader/ParallaxHeader.scss @@ -0,0 +1,13 @@ +.ParallaxHeader { + background-size: cover; + background-attachment: fixed; + height: 250px; + color: var(--xshop-diff); + display: flex; + align-items: center; + justify-content: center; + + h2{ + opacity: .4; + } +} diff --git a/resources/views/segments/header/ParallaxHeader/screenshot.png b/resources/views/segments/header/ParallaxHeader/screenshot.png new file mode 100644 index 0000000..c83bd13 Binary files /dev/null and b/resources/views/segments/header/ParallaxHeader/screenshot.png differ diff --git a/resources/views/segments/header/SimpleHeader/SimpleHeader.blade.php b/resources/views/segments/header/SimpleHeader/SimpleHeader.blade.php new file mode 100644 index 0000000..da2b907 --- /dev/null +++ b/resources/views/segments/header/SimpleHeader/SimpleHeader.blade.php @@ -0,0 +1,10 @@ +
+
+

+ {{$title}} +

+

+ {{$subtitle}} +

+
+
diff --git a/resources/views/segments/header/SimpleHeader/SimpleHeader.js b/resources/views/segments/header/SimpleHeader/SimpleHeader.js new file mode 100644 index 0000000..e69de29 diff --git a/resources/views/segments/header/SimpleHeader/SimpleHeader.json b/resources/views/segments/header/SimpleHeader/SimpleHeader.json new file mode 100644 index 0000000..3ea8e03 --- /dev/null +++ b/resources/views/segments/header/SimpleHeader/SimpleHeader.json @@ -0,0 +1,10 @@ +{ + "name": "SimpleHeader", + "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/header/SimpleHeader/SimpleHeader.php b/resources/views/segments/header/SimpleHeader/SimpleHeader.php new file mode 100644 index 0000000..44eb54e --- /dev/null +++ b/resources/views/segments/header/SimpleHeader/SimpleHeader.php @@ -0,0 +1,21 @@ +name('welcome')->middleware(\App\Http\Middleware\VisitorCounter::class); Auth::routes(['register' => false]);