diff --git a/app/Console/Commands/clientAssetGenerator.php b/app/Console/Commands/clientAssetGenerator.php index 5db2f4f..d0e72b3 100644 --- a/app/Console/Commands/clientAssetGenerator.php +++ b/app/Console/Commands/clientAssetGenerator.php @@ -29,16 +29,22 @@ class clientAssetGenerator extends Command { // make gfx variable $gfxes = gfx(); + $vars['xshop-background'] = $gfxes['background'] ?? '#000000'; $vars['xshop-primary'] = $gfxes['primary'] ?? '#6e0000'; + $vars['xshop-diff'] = getGrayscaleTextColor($gfxes['primary']) ?? '#6e0000'; $vars['xshop-secondary'] = $gfxes['secondary'] ?? '#ff0000'; $vars['xshop-text'] = $gfxes['text'] ?? '#111111'; - $vars['border-radius'] = $gfxes['border-radius'] ?? '7px'; + $vars['xshop-border-radius'] = $gfxes['border-radius'] ?? '7px'; $vars['xshop-shadow'] = $gfxes['shadow'] ?? '2px 2px 4px #777777'; + // prepare client.scss and add gfx variable $js = "// PLEASE DO NOT EDIT THIS FILE, \n// IF YOU WANT ADD ANY CODE CREATE NEW JS INTO client-custom" . PHP_EOL; $variables = "// PLEASE DO NOT EDIT THIS FILE, \n// IF YOU WANT ADD ANY CODE CREATE NEW SCSS INTO client-custom" . PHP_EOL; + foreach ($vars as $k => $var) { + $variables .= '$'."$k:$var;" . PHP_EOL; + } $variables .= ":root{" . PHP_EOL; foreach ($vars as $k => $var) { $variables .= "--$k:$var;" . PHP_EOL; diff --git a/app/Console/Commands/data/handle.dat b/app/Console/Commands/data/handle.dat index 2675606..3214bd9 100644 --- a/app/Console/Commands/data/handle.dat +++ b/app/Console/Commands/data/handle.dat @@ -16,6 +16,6 @@ class Handle } public static function onMount(Part $part = null) { - + return $part; } } diff --git a/app/Helpers/Helper.php b/app/Helpers/Helper.php index 23d3fe7..527a3ed 100644 --- a/app/Helpers/Helper.php +++ b/app/Helpers/Helper.php @@ -2,6 +2,7 @@ use App\Helpers; use App\Models\Setting; +use App\Models\Group; use App\Models\Area; use App\Models\Part; use Illuminate\Support\Facades\Route; @@ -684,17 +685,18 @@ function nestedWithData($items, $parent_id = null) * @param $areaName * @return \App\Models\Part|false */ -function hasPart($areaName){ - $a = Area::where('name',$areaName)->first(); - if ($a == null){ +function hasPart($areaName) +{ + $a = Area::where('name', $areaName)->first(); + if ($a == null) { return false; } - $p = Part::where('area_id',$a->id)->first(); - if ($p == null){ - return false; + $p = Part::where('area_id', $a->id)->first(); + if ($p == null) { + return false; } - return $p ; + return $p; } @@ -704,8 +706,9 @@ function hasPart($areaName){ * @param $areaName * @return Part[]|\Illuminate\Database\Eloquent\Collection|\LaravelIdea\Helper\App\Models\_IH_Part_C */ -function getParts($areaName){ - $a = Area::where('name',$areaName)->first(); +function getParts($areaName) +{ + $a = Area::where('name', $areaName)->first(); return $a->parts()->orderBy('sort')->get(); } @@ -715,14 +718,61 @@ function getParts($areaName){ * @param $group * @return array */ -function getSettingsGroup($group){ +function getSettingsGroup($group) +{ $result = []; - foreach (Setting::where('key','LIKE',$group.'%') - ->whereNotNull('value')->get(['key','value']) as $r){ - if ($r->value != null){ - $result[substr($r->key,mb_strlen($group))] = $r->value; + foreach (Setting::where('key', 'LIKE', $group . '%') + ->whereNotNull('value')->get(['key', 'value']) as $r) { + if ($r->value != null) { + $result[substr($r->key, mb_strlen($group))] = $r->value; } } return $result; } + + +/** + * get different color by backgroun + * @param $bgColor + * @return string + */ +function getGrayscaleTextColor($bgColor) +{ + // Convert the provided background color to RGB + $bgRgb = sscanf($bgColor, "#%02x%02x%02x"); + + // Calculate the luminance of the background color + $luminance = (0.299 * $bgRgb[0] + 0.587 * $bgRgb[1] + 0.114 * $bgRgb[2]) / 255; + + // Determine the best color for text based on luminance + if ($luminance > 0.5) { + $textColor = '#000000'; // Black text + } else { + $textColor = '#ffffff'; // White text + } + + return $textColor; +} + +/** + * get group by setting key + * @param $key + * @return Group + */ +function getGroupBySetting($key) +{ + return Group::where('id', getSetting($key) ?? 1)->first(); +} + +/** + * get group's posts by setting key + * @param $key + * @param $limit + * @return \App\Models\Post[]|\Illuminate\Database\Eloquent\Collection|\LaravelIdea\Helper\App\Models\_IH_Post_C + */ +function getGroupPostsBySetting($key, $limit = 10) +{ + return Group::where('id', getSetting($key) ?? 1)->first() + ->posts()->where('status', 1)->limit($limit)->get(); +} diff --git a/app/Models/Area.php b/app/Models/Area.php index 8f63362..573bd62 100644 --- a/app/Models/Area.php +++ b/app/Models/Area.php @@ -12,8 +12,10 @@ class Area extends Model 'ads', 'attachment', 'attachments', - 'attachmentsList', + 'attachments_page', 'card', + 'categories', + 'categories_page', 'category', 'clip', 'clips', @@ -26,14 +28,20 @@ class Area extends Model 'gallery', 'group', 'groups', + 'groups_page', 'index', 'invoice', 'login', 'menu', + 'other', 'parallax', + 'post', + 'posts', + 'posts_page', 'preloader', 'product', 'products', + 'products_page', 'questions', 'search', 'slider', diff --git a/app/Models/Category.php b/app/Models/Category.php index 6f2d29c..945fb60 100644 --- a/app/Models/Category.php +++ b/app/Models/Category.php @@ -70,4 +70,9 @@ class Category extends Model return $this->morphMany(Attachment::class,'attachable'); } + public function webUrl(){ + return '#';// WIP + return route(''); + } + } diff --git a/app/Models/Clip.php b/app/Models/Clip.php index caacafb..757906b 100644 --- a/app/Models/Clip.php +++ b/app/Models/Clip.php @@ -46,5 +46,9 @@ class Clip extends Model return $this->morphMany(Attachment::class,'attachable'); } + public function webUrl(){ + return '#';// WIP + return route(''); + } } diff --git a/app/Models/Gallery.php b/app/Models/Gallery.php index b834394..b61c2b6 100644 --- a/app/Models/Gallery.php +++ b/app/Models/Gallery.php @@ -69,4 +69,9 @@ class Gallery extends Model implements HasMedia public function attachs(){ return $this->morphMany(Attachment::class,'attachable'); } + + public function webUrl(){ + return '#';// WIP + return route(''); + } } diff --git a/app/Models/Group.php b/app/Models/Group.php index 79986ce..d40a108 100644 --- a/app/Models/Group.php +++ b/app/Models/Group.php @@ -75,4 +75,9 @@ class Group extends Model public function attachs(){ return $this->morphMany(Attachment::class,'attachable'); } + + public function webUrl(){ + return '#';// WIP + return route(''); + } } diff --git a/app/Models/Part.php b/app/Models/Part.php index 54687d3..9419a48 100644 --- a/app/Models/Part.php +++ b/app/Models/Part.php @@ -16,4 +16,13 @@ class Part extends Model $handle::onMount($this); return 'segments.'.$this->segment.'.'.$this->part.'.'.$this->part; } + public function getBladeWithData(){ + $className= ucfirst($this->part); + $handle = "\\Resources\\Views\\Segments\\$className"; + return ['blade' => 'segments.'.$this->segment.'.'.$this->part.'.'.$this->part, 'data' => $handle::onMount($this)]; + } + + public function area(){ + return $this->belongsTo(Area::class); + } } diff --git a/app/Models/Post.php b/app/Models/Post.php index 9b98207..3b384e1 100644 --- a/app/Models/Post.php +++ b/app/Models/Post.php @@ -122,4 +122,9 @@ class Post extends Model implements HasMedia // 'tags' => $this->tags->implode(' ') ?? null, // ]; // } + + public function webUrl(){ + return '#';// WIP + return route(''); + } } diff --git a/app/Models/Product.php b/app/Models/Product.php index f340833..b499aa2 100644 --- a/app/Models/Product.php +++ b/app/Models/Product.php @@ -188,5 +188,9 @@ class Product extends Model implements HasMedia } + public function webUrl(){ + return '#';// WIP + return route(''); + } } diff --git a/app/Models/Setting.php b/app/Models/Setting.php index e8ff576..6c17ff4 100644 --- a/app/Models/Setting.php +++ b/app/Models/Setting.php @@ -12,6 +12,10 @@ class Setting extends Model public $translatable = ['value']; - public static $settingTypes = ['TEXT', 'LONGTEXT', 'CODE', 'EDITOR', - 'CATEGORY', 'GROUP', 'CHECKBOX', 'FILE', 'COLOR']; + public static $settingTypes = ['TEXT','NUMBER', 'LONGTEXT', 'CODE', 'EDITOR', + 'CATEGORY', 'GROUP', 'CHECKBOX', 'FILE', 'COLOR','SELECT']; + + public function getData(){ + return json_decode($this->data,true); + } } diff --git a/app/Observers/PartObsever.php b/app/Observers/PartObsever.php index d4314c6..f2c85da 100644 --- a/app/Observers/PartObsever.php +++ b/app/Observers/PartObsever.php @@ -25,9 +25,11 @@ class PartObsever // remove old part add new part if ($part->isDirty('part')){ - $className = ucfirst($part->getOriginal('part')); - $handle = "\\Resources\\Views\\Segments\\$className"; - $handle::onRemove($part); + $p = clone $part; + $p->part = $part->getOriginal('part'); + $classNameOld = ucfirst($part->getOriginal('part')); + $handleOld = "\\Resources\\Views\\Segments\\$classNameOld"; + $handleOld::onRemove($p); $className = $part->part; $className= ucfirst($part->part); @@ -37,6 +39,7 @@ class PartObsever } + /** * Handle the Part "deleted" event. */ diff --git a/database/migrations/2024_05_07_133136_create_settings_table.php b/database/migrations/2024_05_07_133136_create_settings_table.php index 8806201..6d03780 100644 --- a/database/migrations/2024_05_07_133136_create_settings_table.php +++ b/database/migrations/2024_05_07_133136_create_settings_table.php @@ -22,6 +22,7 @@ return new class extends Migration $table->boolean('ltr')->default(false); $table->boolean('is_basic')->default(false); $table->boolean('size')->default('12'); + $table->json('data')->nullable(); $table->timestamps(); }); } diff --git a/database/seeders/AreaSeeder.php b/database/seeders/AreaSeeder.php index c510e77..a4b6ac9 100644 --- a/database/seeders/AreaSeeder.php +++ b/database/seeders/AreaSeeder.php @@ -18,7 +18,7 @@ class AreaSeeder extends Seeder [ 'name' => 'preloader', 'valid_segments' => json_encode( - ['preloader'] + ["preloader"] ), 'max' => 1, 'icon' => 'ri-loader-2-line', @@ -26,7 +26,9 @@ class AreaSeeder extends Seeder [ 'name' => 'index', 'valid_segments' => json_encode( - ['top','slider','header','footer','menu','parallax'] + ["top","slider","header","footer","menu", + "parallax","other","posts","products","attachments" + ,"groups","categories"] ), 'max' => 10, 'icon' => 'ri-layout-top-2-line', diff --git a/resources/js/client.js b/resources/js/client.js index f1333d2..71d3601 100644 --- a/resources/js/client.js +++ b/resources/js/client.js @@ -2,4 +2,7 @@ // IF YOU WANT ADD ANY CODE CREATE NEW JS INTO client-custom import "./client-custom/assetsNode.js"; import "./client-custom/confirm.js"; -import "../views/segments/preloader/PreloaderImage/PreloaderImage.js"; +import "../views/segments/preloader/PreloaderCircle/PreloaderCircle.js"; +import "../views/segments/top/TopSimple/TopSimple.js"; +import "../views/segments/slider/SliderSimple/SliderSimple.js"; +import "../views/segments/posts/PostsIconSimple/PostsIconSimple.js"; diff --git a/resources/js/components/Increment.vue b/resources/js/components/Increment.vue index 91d19cd..d28dd3c 100644 --- a/resources/js/components/Increment.vue +++ b/resources/js/components/Increment.vue @@ -4,6 +4,7 @@ @@ -40,6 +41,10 @@ export default { type: Number, default: 100 }, + xname:{ + type: String, + default: '', + } }, mounted() { if (!isNaN(this.modelValue)) { diff --git a/resources/sass/client.scss b/resources/sass/client.scss index 6334802..34c34b9 100644 --- a/resources/sass/client.scss +++ b/resources/sass/client.scss @@ -1,15 +1,26 @@ // PLEASE DO NOT EDIT THIS FILE, // IF YOU WANT ADD ANY CODE CREATE NEW SCSS INTO client-custom +$xshop-background:#eeeeee; +$xshop-primary:#6e0000; +$xshop-diff:#ffffff; +$xshop-secondary:#ff0000; +$xshop-text:#111111; +$xshop-border-radius:7px; +$xshop-shadow:2px 2px 4px #777777; :root{ --xshop-background:#eeeeee; --xshop-primary:#6e0000; +--xshop-diff:#ffffff; --xshop-secondary:#ff0000; --xshop-text:#111111; ---border-radius:7px; +--xshop-border-radius:7px; --xshop-shadow:2px 2px 4px #777777; } @import "client-custom/assetsNode"; @import "client-custom/general"; @import "client-custom/zfix"; -@import "../views/segments/preloader/PreloaderImage/PreloaderImage"; +@import "../views/segments/preloader/PreloaderCircle/PreloaderCircle"; +@import "../views/segments/top/TopSimple/TopSimple"; +@import "../views/segments/slider/SliderSimple/SliderSimple"; +@import "../views/segments/posts/PostsIconSimple/PostsIconSimple"; diff --git a/resources/views/components/setting-field.blade.php b/resources/views/components/setting-field.blade.php index 8d5947a..102d71b 100644 --- a/resources/views/components/setting-field.blade.php +++ b/resources/views/components/setting-field.blade.php @@ -2,7 +2,7 @@ @switch($setting->type) @@ -33,7 +33,7 @@ @case('CATEGORY') @break + @case('NUMBER') +
+{{-- ltr) dir="ltr" @endif>--}} + getData() as $k => $v) {{$k}}="{{$v}}" @endforeach > + @break @case('FILE')
@php($ext = strtolower(pathinfo(str_replace('_','.',$setting->key), PATHINFO_EXTENSION))) @@ -99,9 +106,9 @@ @if (old($setting->key, $setting->value??'webp') == 'webp' ) selected @endif >{{__("webp")}} @else - ltr) dir="ltr" @endif> + ltr) dir="ltr" @endif> @endif @endswitch
diff --git a/resources/views/segments/posts/PostsIconSimple/PostsIconSimple.blade.php b/resources/views/segments/posts/PostsIconSimple/PostsIconSimple.blade.php new file mode 100755 index 0000000..2917c64 --- /dev/null +++ b/resources/views/segments/posts/PostsIconSimple/PostsIconSimple.blade.php @@ -0,0 +1,31 @@ +
+
+

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

+

+ {{getGroupBySetting($data->area->name.'_'.$data->part)->description}} +

+
+ @foreach(getGroupPostsBySetting($data->area->name.'_'.$data->part, getSetting($data->area->name.'_'.$data->part.'_limit')) as $post) +
+ +

+ {{$post->title}} +

+ +

+ {{$post->subtitle}} +

+ + + {{__("Read more")}} + +
+ @endforeach + +
+
+
diff --git a/resources/views/segments/posts/PostsIconSimple/PostsIconSimple.js b/resources/views/segments/posts/PostsIconSimple/PostsIconSimple.js new file mode 100755 index 0000000..e69de29 diff --git a/resources/views/segments/posts/PostsIconSimple/PostsIconSimple.json b/resources/views/segments/posts/PostsIconSimple/PostsIconSimple.json new file mode 100755 index 0000000..a7c8203 --- /dev/null +++ b/resources/views/segments/posts/PostsIconSimple/PostsIconSimple.json @@ -0,0 +1,10 @@ +{ + "name": "PostsIconSimple", + "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": [] +} diff --git a/resources/views/segments/posts/PostsIconSimple/PostsIconSimple.php b/resources/views/segments/posts/PostsIconSimple/PostsIconSimple.php new file mode 100755 index 0000000..71eb453 --- /dev/null +++ b/resources/views/segments/posts/PostsIconSimple/PostsIconSimple.php @@ -0,0 +1,46 @@ +section = 'theme'; + $setting->key = $part->area->name . '_' . $part->part; + $setting->value = Group::first()->id; + $setting->type = 'GROUP'; + $setting->size = 6; + $setting->title = $part->area->name . ' ' . $part->part; + $setting->save(); + $setting = new Setting(); + $setting->section = 'theme'; + $setting->key = $part->area->name . '_' . $part->part.'_limit'; + $setting->value = 3; + $setting->size = 6; + $setting->type = 'NUMBER'; + $setting->data = json_encode(['xmin' => 2, 'xmax' => 12]); + $setting->title = $part->area->name . ' ' . $part->part. ' limit'; + $setting->save(); + } + + public static function onRemove(Part $part = null) + { +// \Log::info(' --- onRemove rem --- '.$part->area->name . '_' . $part->part); + +// dd(Setting::where('key',$part->area->name . '_' . $part->part)->get()); + Setting::where('key',$part->area->name . '_' . $part->part)->first()?->delete(); + Setting::where('key',$part->area->name . '_' . $part->part.'_limit')->first()?->delete(); + } + + public static function onMount(Part $part = null) + { + return $part; + } +} diff --git a/resources/views/segments/posts/PostsIconSimple/PostsIconSimple.scss b/resources/views/segments/posts/PostsIconSimple/PostsIconSimple.scss new file mode 100755 index 0000000..0ca97f8 --- /dev/null +++ b/resources/views/segments/posts/PostsIconSimple/PostsIconSimple.scss @@ -0,0 +1,20 @@ +.PostsIconSimple { + // scss + + h1{ + a{ + color: $xshop-text ; + } + } + .row{ + text-align: center; + + i{ + font-size: 75px; + color: var(--xshop-primary); + } + p{ + text-align: justify; + } + } +} diff --git a/resources/views/segments/posts/PostsIconSimple/screenshot.png b/resources/views/segments/posts/PostsIconSimple/screenshot.png new file mode 100755 index 0000000..094cdb7 Binary files /dev/null and b/resources/views/segments/posts/PostsIconSimple/screenshot.png differ diff --git a/resources/views/segments/preloader/PreloaderCircle/PreloaderCircle.blade.php b/resources/views/segments/preloader/PreloaderCircle/PreloaderCircle.blade.php old mode 100644 new mode 100755 diff --git a/resources/views/segments/preloader/PreloaderCircle/PreloaderCircle.js b/resources/views/segments/preloader/PreloaderCircle/PreloaderCircle.js old mode 100644 new mode 100755 diff --git a/resources/views/segments/preloader/PreloaderCircle/PreloaderCircle.json b/resources/views/segments/preloader/PreloaderCircle/PreloaderCircle.json old mode 100644 new mode 100755 diff --git a/resources/views/segments/preloader/PreloaderCircle/PreloaderCircle.php b/resources/views/segments/preloader/PreloaderCircle/PreloaderCircle.php old mode 100644 new mode 100755 index 5b501ed..f40b39a --- a/resources/views/segments/preloader/PreloaderCircle/PreloaderCircle.php +++ b/resources/views/segments/preloader/PreloaderCircle/PreloaderCircle.php @@ -8,14 +8,12 @@ class PreloaderCircle { public static function onAdd(Part $part = null) { - \Log::info('added '.$part->part.' on '.$part->segment); } public static function onRemove(Part $part = null) { - \Log::info('remove '.$part->part.' on '.$part->segment); } public static function onMount(Part $part = null) { - \Log::info('monted '.$part->part.' on '.$part->segment); + return $part; } } diff --git a/resources/views/segments/preloader/PreloaderCircle/PreloaderCircle.scss b/resources/views/segments/preloader/PreloaderCircle/PreloaderCircle.scss old mode 100644 new mode 100755 diff --git a/resources/views/segments/preloader/PreloaderCircle/screenshot.png b/resources/views/segments/preloader/PreloaderCircle/screenshot.png old mode 100644 new mode 100755 diff --git a/resources/views/segments/preloader/PreloaderImage/PreloaderImage.blade.php b/resources/views/segments/preloader/PreloaderImage/PreloaderImage.blade.php old mode 100644 new mode 100755 diff --git a/resources/views/segments/preloader/PreloaderImage/PreloaderImage.js b/resources/views/segments/preloader/PreloaderImage/PreloaderImage.js old mode 100644 new mode 100755 diff --git a/resources/views/segments/preloader/PreloaderImage/PreloaderImage.json b/resources/views/segments/preloader/PreloaderImage/PreloaderImage.json old mode 100644 new mode 100755 diff --git a/resources/views/segments/preloader/PreloaderImage/PreloaderImage.php b/resources/views/segments/preloader/PreloaderImage/PreloaderImage.php old mode 100644 new mode 100755 index c9fb359..ffcbfc9 --- a/resources/views/segments/preloader/PreloaderImage/PreloaderImage.php +++ b/resources/views/segments/preloader/PreloaderImage/PreloaderImage.php @@ -10,7 +10,6 @@ class PreloaderImage { public static function onAdd(Part $part = null) { - \Log::info('added '.$part->part.' on '.$part->segment); $setting = new Setting(); $setting->key = 'PreloaderImage_gif'; $setting->title = ''; @@ -21,12 +20,11 @@ class PreloaderImage } public static function onRemove(Part $part = null) { - \Log::info('remove '.$part->part.' on '.$part->segment); Setting::where('key','PreloaderImage_gif')->delete(); File::delete(public_path('upload/images/').'PreloaderImage.gif'); } public static function onMount(Part $part = null) { - \Log::info('monted '.$part->part.' on '.$part->segment); + return $part; } } diff --git a/resources/views/segments/preloader/PreloaderImage/PreloaderImage.scss b/resources/views/segments/preloader/PreloaderImage/PreloaderImage.scss old mode 100644 new mode 100755 diff --git a/resources/views/segments/preloader/PreloaderImage/assets/PreloaderImage.gif b/resources/views/segments/preloader/PreloaderImage/assets/PreloaderImage.gif old mode 100644 new mode 100755 diff --git a/resources/views/segments/preloader/PreloaderImage/screenshot.png b/resources/views/segments/preloader/PreloaderImage/screenshot.png old mode 100644 new mode 100755 diff --git a/resources/views/segments/slider/SliderSimple/SliderSimple.blade.php b/resources/views/segments/slider/SliderSimple/SliderSimple.blade.php old mode 100644 new mode 100755 diff --git a/resources/views/segments/slider/SliderSimple/SliderSimple.js b/resources/views/segments/slider/SliderSimple/SliderSimple.js old mode 100644 new mode 100755 diff --git a/resources/views/segments/slider/SliderSimple/SliderSimple.json b/resources/views/segments/slider/SliderSimple/SliderSimple.json old mode 100644 new mode 100755 diff --git a/resources/views/segments/slider/SliderSimple/SliderSimple.php b/resources/views/segments/slider/SliderSimple/SliderSimple.php old mode 100644 new mode 100755 index d0d96cf..259641c --- a/resources/views/segments/slider/SliderSimple/SliderSimple.php +++ b/resources/views/segments/slider/SliderSimple/SliderSimple.php @@ -16,6 +16,6 @@ class SliderSimple } public static function onMount(Part $part = null) { - + return $part; } } diff --git a/resources/views/segments/slider/SliderSimple/SliderSimple.scss b/resources/views/segments/slider/SliderSimple/SliderSimple.scss old mode 100644 new mode 100755 diff --git a/resources/views/segments/slider/SliderSimple/screenshot.png b/resources/views/segments/slider/SliderSimple/screenshot.png old mode 100644 new mode 100755 diff --git a/resources/views/segments/top/TopSimple/TopSimple.blade.php b/resources/views/segments/top/TopSimple/TopSimple.blade.php old mode 100644 new mode 100755 diff --git a/resources/views/segments/top/TopSimple/TopSimple.js b/resources/views/segments/top/TopSimple/TopSimple.js old mode 100644 new mode 100755 diff --git a/resources/views/segments/top/TopSimple/TopSimple.json b/resources/views/segments/top/TopSimple/TopSimple.json old mode 100644 new mode 100755 diff --git a/resources/views/segments/top/TopSimple/TopSimple.php b/resources/views/segments/top/TopSimple/TopSimple.php old mode 100644 new mode 100755 index 333ae3d..38af40b --- a/resources/views/segments/top/TopSimple/TopSimple.php +++ b/resources/views/segments/top/TopSimple/TopSimple.php @@ -16,6 +16,6 @@ class TopSimple } public static function onMount(Part $part = null) { - + return $part; } } diff --git a/resources/views/segments/top/TopSimple/TopSimple.scss b/resources/views/segments/top/TopSimple/TopSimple.scss old mode 100644 new mode 100755 diff --git a/resources/views/segments/top/TopSimple/screenshot.png b/resources/views/segments/top/TopSimple/screenshot.png old mode 100644 new mode 100755 diff --git a/resources/views/welcome.blade.php b/resources/views/welcome.blade.php index bdcc7e5..3e1596a 100644 --- a/resources/views/welcome.blade.php +++ b/resources/views/welcome.blade.php @@ -5,6 +5,7 @@ @endsection @section('content') @foreach(getParts('index') as $part) - @include($part->getBlade()) + @php($p = $part->getBladeWithData()) + @include($p['blade'],['data' => $p['data']]) @endforeach @endsection