added custom theme each post, category, group, product

pull/49/head v2.1.0
farazdy 3 months ago
parent a75eda97e4
commit 3d7a03e703

@ -757,12 +757,19 @@ function hasPart($areaName)
/**
* get parts of area
* @param $areaName
* @param null $custom custom theme
* @return Part[]|\Illuminate\Database\Eloquent\Collection|\LaravelIdea\Helper\App\Models\_IH_Part_C
*/
function getParts($areaName)
function getParts($areaName, $custom = null)
{
$a = Area::where('name', $areaName)->first();
return $a->parts()->orderBy('sort')->get();
if ($custom != null) {
$customs = Part::where('custom', $custom)->orderBy('sort');
if ($customs->count() > 0) {
return $customs->get();
}
}
return Area::where('name', $areaName)->first()->parts()->orderBy('sort')->get();
}
@ -1278,7 +1285,8 @@ function sendingSMS($text, $number, $args)
* @param $html
* @return array
*/
function generateTOC($html) {
function generateTOC($html)
{
// Load HTML into a DOMDocument for parsing
$doc = new DOMDocument();
@$doc->loadHTML(mb_convert_encoding($html, 'HTML-ENTITIES', 'UTF-8'));
@ -1333,7 +1341,8 @@ function generateTOC($html) {
* @param $counter
* @return string
*/
function generateHeadingID($text, $counter) {
function generateHeadingID($text, $counter)
{
// Convert to lowercase and replace non-alphanumeric characters with dashes
$id = strtolower(preg_replace('/[^a-zA-Z0-9]+/', '-', $text));
@ -1352,7 +1361,8 @@ function generateHeadingID($text, $counter) {
}
// The buildTOC function remains unchanged
function buildTOC($items) {
function buildTOC($items)
{
$html = '<ul>';
foreach ($items as $item) {
$html .= '<li>';
@ -1376,21 +1386,35 @@ function buildTOC($items) {
* @param $evaluation
* @return int|mixed
*/
function detectRateCustomer($type,$id,$evaluation)
function detectRateCustomer($type, $id, $evaluation)
{
if (!auth('customer')->check()){
if (!auth('customer')->check()) {
return 0;
}
$rate = Rate::where('rater_id',auth('customer')->id())
->where('rater_type', \App\Models\Customer::class)
->where('rateable_type',$type)
->where('rateable_id',$id)
->where('evaluation_id',$evaluation);
if ($rate->count() == 0){
return 0;
}else{
return $rate->first()->rate;
$rate = Rate::where('rater_id', auth('customer')->id())
->where('rater_type', \App\Models\Customer::class)
->where('rateable_type', $type)
->where('rateable_id', $id)
->where('evaluation_id', $evaluation);
if ($rate->count() == 0) {
return 0;
} else {
return $rate->first()->rate;
}
}
/**
* @param $name string area name
* @param $model \Illuminate\Database\Eloquent\Model $custom model
* @return Area|mixed
*/
function findArea($name,$model = null)
{
if ($model != null && $model->theme != null){
return json_decode($model->theme);
}
return \App\Models\Area::where('name', $name)->first();
}

@ -4,7 +4,11 @@ namespace App\Http\Controllers\Admin;
use App\Http\Controllers\Controller;
use App\Models\Area;
use App\Models\Category;
use App\Models\Group;
use App\Models\Part;
use App\Models\Post;
use App\Models\Product;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\File;
@ -17,7 +21,7 @@ class AreaController extends Controller
return view('admin.areas.area-list', compact('areas'));
}
public function desgin(Area $area)
public function design(Area $area)
{
$valids = [];
@ -38,6 +42,53 @@ class AreaController extends Controller
return view('admin.areas.area-design', compact('area', 'valids'));
}
public function designModel(Area $area, $model, $id)
{
switch ($model) {
case 'Group':
$m = Group::whereId($id)->first();
break;
case 'Category':
$m = Category::whereId($id)->first();
break;
case 'Post':
$m = Post::whereId($id)->first();
break;
case 'Product':
$m = Product::whereId($id)->first();
break;
default:
return abort(404);
}
$valids = [];
foreach ($area->segment as $seg) {
if (File::exists(resource_path() . '/views/segments/' . $seg)) {
$dirs = File::directories(resource_path() . '/views/segments/' . $seg);
foreach ($dirs as $dir) {
$temp = explode('/', $dir);
$valids[] = [
'segment' => $temp[count($temp) - 2],
'part' => $temp[count($temp) - 1],
'data' => json_decode(file_get_contents($dir . '/' . $temp[count($temp) - 1] . '.json'), true)
];
}
}
}
$parts = $area->parts;
foreach ($parts as $part) {
$part->id = null;
}
if ($m->theme == null) {
$data = ['parts' => $parts, 'use_default' => $area->use_default,'max' => 10];
} else {
$data = json_decode($m->theme, true);
}
return view('admin.areas.model-design', compact('m', 'valids', 'data', 'model'));
}
/**
* screenshot segment
* @param $segment
@ -80,9 +131,9 @@ class AreaController extends Controller
logAdmin(__METHOD__, __CLASS__, $area->id);
if ($request->has('use_default')){
if ($request->has('use_default')) {
$area->use_default = 1;
}else{
} else {
$area->use_default = 0;
}
$area->save();
@ -91,6 +142,70 @@ class AreaController extends Controller
return redirect()->back()->with(['message' => __('area :NAME of website updated', ['NAME' => $area->name])]);
}
public function updateModel(Request $request, $model, $id)
{
// return $request->all();
switch ($model) {
case 'Group':
$m = Group::whereId($id)->first();
break;
case 'Category':
$m = Category::whereId($id)->first();
break;
case 'Post':
$m = Post::whereId($id)->first();
break;
case 'Product':
$m = Product::whereId($id)->first();
break;
default:
return abort(404);
}
foreach ($request->input('parts', []) as $i => $item) {
$data = json_decode($item);
if ($data == null) {
continue;
}
if ($data->id == null) {
// create
$part = new Part();
$part->area_id = null;
$part->segment = $data->segment;
$part->part = $data->part;
$part->sort = $i;
$part->custom = $model.$m->id;
$part->save();
} else {
$part = Part::whereId($data->id)->first();
$part->segment = $data->segment;
$part->part = $data->part;
$part->sort = $i;
$part->save();
}
}
foreach (json_decode($request->input('removed')) as $id) {
Part::where('id', $id)->first()->delete();
}
\Artisan::call('client');
logAdmin(__METHOD__, __CLASS__, $m->id);
$m->theme = [
'parts' => Part::where('custom',$model.$m->id)->get(),
'use_default' => ($request->has('use_default')),
'max' => 10,
];
$m->save();
return redirect()->back()->with(['message' => __('area :NAME of website updated', ['NAME' => $model.$m->id ])]);
}
public function sort(Area $area)
{
return view('admin.areas.area-sort', compact('area'));

@ -309,7 +309,7 @@ class ClientController extends Controller
$breadcrumb[$product->category->parent->name] = $product->category->parent->webUrl();
}
$breadcrumb[$product->name] = null;
return view('client.default-list', compact('area', 'product', 'title', 'subtitle', 'breadcrumb'));
return view('client.product', compact('area', 'product', 'title', 'subtitle', 'breadcrumb'));
}
public function category($slug, Request $request)

@ -25,8 +25,13 @@ class Part extends Model
return ['blade' => 'segments.' . $this->segment . '.' . $this->part . '.' . $this->part, 'data' => $handle::onMount($this, $item)];
}
public function area()
{
public function area(){
return $this->belongsTo(Area::class);
}
public function getAreaNameAttribute()
{
return $this->area_id ? $this->area->name : $this->custom;
}
}

@ -13,11 +13,12 @@ return new class extends Migration
{
Schema::create('parts', function (Blueprint $table) {
$table->id();
$table->unsignedBigInteger('area_id');
$table->unsignedBigInteger('area_id')->nullable();
$table->string('segment');
$table->string('part');
$table->json('data')->default('[]');
$table->integer('sort')->default(0);
$table->string('custom')->nullable();
$table->timestamps();
});
}

@ -335,3 +335,6 @@ a.btn,a.action-btn,a.circle-btn{
}
}
.btn-light,a.btn-light{
color: black !important;
}

@ -0,0 +1,52 @@
@extends('layouts.app')
@section('title')
{{__("Design :AREA",['AREA' => $model . ' [' . $m->id.']'])}}
@endsection
@section('content')
@include('components.err')
<form action="{{route('admin.area.update.model',[$model,$m->id])}}" method="post">
@csrf
<div class="general-form mb-5">
<h1>
{{__("Design :AREA",['AREA' => $model . ' [' . $m->id.']'])}}
</h1>
<div class="form-group p-3">
<div class="form-check form-switch">
<input value="1" class="form-check-input @error('use_default') is-invalid @enderror" name="use_default" @if( $data['use_default']) checked @endif type="checkbox" id="use_default">
<label class="form-check-label" for="use_default"> {{__('Use default')}}</label>
</div>
</div>
<area-designer
image-link="{{route('admin.area.image',['',''])}}"
:parts='@json($data['parts'])'
:valids='@json($valids)'
:area='@json($data)'
></area-designer>
{{-- <div class="row">--}}
{{-- @foreach($valids as $valid)--}}
{{-- <div class="col-md-3">--}}
{{-- <img class="img-fluid" src="{{route('admin.area.image',[$valid['segment'],$valid['part']])}}" alt="{{$valid['segment'].'.'.$valid['part']}}">--}}
{{-- <h5 class="mt-2 text-center">--}}
{{-- {{$valid['data']['name']}} [v{{$valid['data']['version']}}]--}}
{{-- </h5>--}}
{{-- </div>--}}
{{-- @endforeach--}}
{{-- </div>--}}
</div>
<button
class="action-btn circle-btn"
data-bs-toggle="tooltip"
data-bs-placement="top"
data-bs-custom-class="custom-tooltip"
data-bs-title="{{__("Save")}}"
>
<i class="ri-save-2-line"></i>
</button>
</form>
@endsection

@ -72,7 +72,7 @@
<h1>
@if(isset($item))
{{__("Edit group")}} [{{$item->name}}]
{{__("Edit group")}} [{{$item->name}}] <a href="{{route('admin.area.design.model',['group','Group',$item->id])}}" class="btn btn-secondary"> <i class="ri-palette-line"></i> </a>
@else
{{__("Add new group")}}
@endif

@ -10,17 +10,17 @@ if ($category->bg != null){
@endphp
@section('content')
<main>
@if(\App\Models\Area::where('name',$area)->first()->use_default)
@if(findArea($area,$category)->use_default)
@foreach(getParts('defaultHeader') as $part)
@php($p = $part->getBladeWithData())
@include($p['blade'],['data' => $p['data']])
@endforeach
@endif
@foreach(getParts($area) as $part)
@foreach(getParts($area,$category) as $part)
@php($p = $part->getBladeWithData())
@include($p['blade'],['data' => $p['data']])
@endforeach
@if(\App\Models\Area::where('name',$area)->first()->use_default)
@if(findArea($area,$category)->use_default)
@foreach(getParts('defaultFooter') as $part)
@php($p = $part->getBladeWithData())
@include($p['blade'],['data' => $p['data']])

@ -5,7 +5,7 @@
@endsection
@section('content')
<main>
@if(\App\Models\Area::where('name',$area)->first()->use_default)
@if(findArea($area)->use_default)
@foreach(getParts('defaultHeader') as $part)
@php($p = $part->getBladeWithData())
@include($p['blade'],['data' => $p['data']])
@ -15,7 +15,7 @@
@php($p = $part->getBladeWithData())
@include($p['blade'],['data' => $p['data']])
@endforeach
@if(\App\Models\Area::where('name',$area)->first()->use_default)
@if(findArea($area)->use_default)
@foreach(getParts('defaultFooter') as $part)
@php($p = $part->getBladeWithData())
@include($p['blade'],['data' => $p['data']])

@ -5,7 +5,7 @@
@endsection
@section('content')
<main>
@if(\App\Models\Area::where('name',$area)->first()->use_default)
@if(findArea($area)->use_default)
@foreach(getParts('defaultHeader') as $part)
@php($p = $part->getBladeWithData())
@include($p['blade'],['data' => $p['data']])
@ -15,7 +15,7 @@
@php($p = $part->getBladeWithData())
@include($p['blade'],['data' => $p['data']])
@endforeach
@if(\App\Models\Area::where('name',$area)->first()->use_default)
@if(findArea($area)->use_default)
@foreach(getParts('defaultFooter') as $part)
@php($p = $part->getBladeWithData())
@include($p['blade'],['data' => $p['data']])

@ -4,23 +4,23 @@
{{$title}} - {{config('app.name')}}
@endsection
@php
if ($group->bg != null){
$bg = $group->bgUrl();
}
if ($group->bg != null){
$bg = $group->bgUrl();
}
@endphp
@section('content')
<main>
@if(\App\Models\Area::where('name',$area)->first()->use_default)
@if(findArea($area,$group)->use_default)
@foreach(getParts('defaultHeader') as $part)
@php($p = $part->getBladeWithData())
@include($p['blade'],['data' => $p['data']])
@endforeach
@endif
@foreach(getParts($area) as $part)
@foreach(getParts($area,'group'.$group->id) as $part)
@php($p = $part->getBladeWithData())
@include($p['blade'],['data' => $p['data']])
@endforeach
@if(\App\Models\Area::where('name',$area)->first()->use_default)
@if(findArea($area,$group)->use_default)
@foreach(getParts('defaultFooter') as $part)
@php($p = $part->getBladeWithData())
@include($p['blade'],['data' => $p['data']])

@ -6,7 +6,7 @@
@section('content')
<main>
<div class="no-print">
@if(\App\Models\Area::where('name',$area)->first()->use_default)
@if(findArea($area)->use_default)
@foreach(getParts('defaultHeader') as $part)
@php($p = $part->getBladeWithData())
@include($p['blade'],['data' => $p['data']])
@ -18,7 +18,7 @@
@include($p['blade'],['data' => $p['data']])
@endforeach
<div class="no-print">
@if(\App\Models\Area::where('name',$area)->first()->use_default)
@if(findArea($area)->use_default)
@foreach(getParts('defaultFooter') as $part)
@php($p = $part->getBladeWithData())
@include($p['blade'],['data' => $p['data']])

@ -1,21 +1,20 @@
@extends('website.inc.website-layout')
@section('title')
{{$post->title}} - {{config('app.name')}}
@endsection
@section('content')
@if(\App\Models\Area::where('name',$area)->first()->use_default)
@if(findArea($area,$post)->use_default)
@foreach(getParts('defaultHeader') as $part)
@php($p = $part->getBladeWithData())
@include($p['blade'],['data' => $p['data']])
@endforeach
@endif
@foreach(getParts($area) as $part)
@foreach(getParts($area,$post) as $part)
@php($p = $part->getBladeWithData())
@include($p['blade'],['data' => $p['data']])
@endforeach
@if(\App\Models\Area::where('name',$area)->first()->use_default)
@if(findArea($area,$post)->use_default)
@foreach(getParts('defaultFooter') as $part)
@php($p = $part->getBladeWithData())
@include($p['blade'],['data' => $p['data']])

@ -0,0 +1,25 @@
@extends('website.inc.website-layout')
@section('title')
{{$title}} - {{config('app.name')}}
@endsection
@section('content')
<main>
@if(findArea($area,$product)->use_default)
@foreach(getParts('defaultHeader') as $part)
@php($p = $part->getBladeWithData())
@include($p['blade'],['data' => $p['data']])
@endforeach
@endif
@foreach(getParts($area,$product) as $part)
@php($p = $part->getBladeWithData())
@include($p['blade'],['data' => $p['data']])
@endforeach
@if(findArea($area,$product)->use_default)
@foreach(getParts('defaultFooter') as $part)
@php($p = $part->getBladeWithData())
@include($p['blade'],['data' => $p['data']])
@endforeach
@endif
</main>
@endsection

@ -5,7 +5,7 @@
@endsection
@section('content')
<main>
@if(\App\Models\Area::where('name',$area)->first()->use_default)
@if(findArea($area)->use_default)
@foreach(getParts('defaultHeader') as $part)
@php($p = $part->getBladeWithData())
@include($p['blade'],['data' => $p['data']])
@ -15,7 +15,7 @@
@php($p = $part->getBladeWithData())
@include($p['blade'],['data' => $p['data']])
@endforeach
@if(\App\Models\Area::where('name',$area)->first()->use_default)
@if(findArea($area)->use_default)
@foreach(getParts('defaultFooter') as $part)
@php($p = $part->getBladeWithData())
@include($p['blade'],['data' => $p['data']])

@ -4,7 +4,7 @@
{{$title}}
</h1>
<p class="text-muted">
{{getSetting($data->area->name.'_'.$data->part.'_title')}}
{{getSetting($data->area_name.'_'.$data->part.'_title')}}
</p>
<div id="dena-list">

@ -11,16 +11,16 @@ class DenaAttachList
{
$setting = new Setting();
$setting->section = 'theme';
$setting->key = $part->area->name . '_' . $part->part.'_title';
$setting->key = $part->area_name . '_' . $part->part.'_title';
$setting->value = __("Website attachments list").' [ pdf, docx, zip, png, jpg, svg, mp4, rar, mp3 ]';
$setting->type = 'TEXT';
$setting->size = 6;
$setting->title = $part->area->name . ' ' . $part->part;
$setting->title = $part->area_name . ' ' . $part->part;
$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.'_title')->first()?->delete();
}
public static function onMount(Part $part = null)
{

@ -2,10 +2,10 @@
<div class="{{gfx()['container']}}">
<h1>
{{getSetting($data->area->name.'_'.$data->part.'_title')}}
{{getSetting($data->area_name.'_'.$data->part.'_title')}}
</h1>
<div id="brands-slider">
@foreach( getCategorySubCatsBySetting($data->area->name.'_'.$data->part.'_category',8) as $category )
@foreach( getCategorySubCatsBySetting($data->area_name.'_'.$data->part.'_category',8) as $category )
<div class="item">
<a href="{{$category->webUrl()}}">
<img src="{{$category->imgUrl()}}" alt="{{$category->name}}" title="{{$category->name}}">

@ -14,30 +14,30 @@ class CategoriesFavImageLinks
$setting = new Setting();
$setting->section = 'theme';
$setting->key = $part->area->name . '_' . $part->part.'_title';
$setting->key = $part->area_name . '_' . $part->part.'_title';
$setting->value = 'Brands';
$setting->size = 6;
$setting->type = 'TEXT';
// $setting->data = json_encode(['xmin' => 2, 'xmax' => 90]);
$setting->title = $part->area->name . ' ' . $part->part. ' title';
$setting->title = $part->area_name . ' ' . $part->part. ' title';
$setting->save();
$setting = new Setting();
$setting->section = 'theme';
$setting->key = $part->area->name . '_' . $part->part.'_category';
$setting->key = $part->area_name . '_' . $part->part.'_category';
$setting->value = Category::first()->id;
$setting->size = 6;
$setting->type = 'CATEGORY';
// $setting->data = json_encode(['xmin' => 2, 'xmax' => 90]);
$setting->title = $part->area->name . ' ' . $part->part. ' category';
$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.'_category')->first()?->delete();
Setting::where('key',$part->area_name . '_' . $part->part.'_title')->first()?->delete();
Setting::where('key',$part->area_name . '_' . $part->part.'_category')->first()?->delete();
}
public static function onMount(Part $part = null)
{

@ -1,10 +1,10 @@
<section class='CategoriesGrid'>
<div class="{{gfx()['container']}}">
<h1>
{{getSetting($data->area->name.'_'.$data->part.'_title')}}
{{getSetting($data->area_name.'_'.$data->part.'_title')}}
</h1>
<div class="row cat-grid-list">
@foreach( getCategorySubCatsBySetting($data->area->name.'_'.$data->part.'_category',getSetting($data->area->name.'_'.$data->part.'_limit')) as $category )
@foreach( getCategorySubCatsBySetting($data->area_name.'_'.$data->part.'_category',getSetting($data->area_name.'_'.$data->part.'_limit')) as $category )
<div class="col-md p-0">
<div class="cat-grid-item">
<a href="{{$category->webUrl()}}">

@ -13,40 +13,40 @@ class CategoriesGrid
$setting = new Setting();
$setting->section = 'theme';
$setting->key = $part->area->name . '_' . $part->part.'_title';
$setting->key = $part->area_name . '_' . $part->part.'_title';
$setting->value = Category::first()->name;
$setting->size = 4;
$setting->type = 'TEXT';
// $setting->data = json_encode(['xmin' => 2, 'xmax' => 90]);
$setting->title = $part->area->name . ' ' . $part->part. ' title';
$setting->title = $part->area_name . ' ' . $part->part. ' title';
$setting->save();
$setting = new Setting();
$setting->section = 'theme';
$setting->key = $part->area->name . '_' . $part->part.'_limit';
$setting->key = $part->area_name . '_' . $part->part.'_limit';
$setting->value = '4';
$setting->size = 4;
$setting->type = 'NUMBER';
$setting->data = json_encode(['xmin' => 2, 'xmax' => 6]);
$setting->title = $part->area->name . ' ' . $part->part. ' count';
$setting->title = $part->area_name . ' ' . $part->part. ' count';
$setting->save();
$setting = new Setting();
$setting->section = 'theme';
$setting->key = $part->area->name . '_' . $part->part.'_category';
$setting->key = $part->area_name . '_' . $part->part.'_category';
$setting->value = Category::first()->id;
$setting->size = 4;
$setting->type = 'CATEGORY';
// $setting->data = json_encode(['xmin' => 2, 'xmax' => 90]);
$setting->title = $part->area->name . ' ' . $part->part. ' category';
$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.'_limit')->first()?->delete();
Setting::where('key',$part->area->name . '_' . $part->part.'_category')->first()?->delete();
Setting::where('key',$part->area_name . '_' . $part->part.'_title')->first()?->delete();
Setting::where('key',$part->area_name . '_' . $part->part.'_limit')->first()?->delete();
Setting::where('key',$part->area_name . '_' . $part->part.'_category')->first()?->delete();
}
public static function onMount(Part $part = null)
{

@ -1,9 +1,9 @@
@php($productFav = getCategoryProductBySetting($data->area->name.'_'.$data->part,1) )
@php($productFav = getCategoryProductBySetting($data->area_name.'_'.$data->part,1) )
@if(count($productFav) > 0)
<section class="FavProductWithMeta py-5">
<div class="{{gfx()['container']}}">
<h4 class="text-center text-muted">
{{getSetting($data->area->name.'_'.$data->part.'_title')}}
{{getSetting($data->area_name.'_'.$data->part.'_title')}}
</h4>
<h1 class="text-center my-2">
{{$productFav[0]->name}}

@ -12,19 +12,19 @@ class FavProductWithMeta
{
$setting = new Setting();
$setting->section = 'theme';
$setting->key = $part->area->name . '_' . $part->part.'_title';
$setting->key = $part->area_name . '_' . $part->part.'_title';
$setting->value = "Fav product";
$setting->type = 'text';
$setting->size = 6;
$setting->title = $part->area->name . ' ' . $part->part;
$setting->title = $part->area_name . ' ' . $part->part;
$setting->save();
$setting = new Setting();
$setting->section = 'theme';
$setting->key = $part->area->name . '_' . $part->part;
$setting->key = $part->area_name . '_' . $part->part;
$setting->value = Category::first()->id;
$setting->type = 'CATEGORY';
$setting->size = 6;
$setting->title = $part->area->name . ' ' . $part->part;
$setting->title = $part->area_name . ' ' . $part->part;
$setting->save();
}
@ -32,8 +32,8 @@ class FavProductWithMeta
{
Setting::where('key',$part->area->name . '_' . $part->part)->first()?->delete();
Setting::where('key',$part->area->name . '_' . $part->part.'_title')->first()?->delete();
Setting::where('key',$part->area_name . '_' . $part->part)->first()?->delete();
Setting::where('key',$part->area_name . '_' . $part->part.'_title')->first()?->delete();
}
public static function onMount(Part $part = null)
{

@ -1,7 +1,7 @@
<section class='AutoPlayClips'>
<div class="{{gfx()['container']}}">
<h1>
{{getSetting($data->area->name.'_'.$data->part.'_title')}}
{{getSetting($data->area_name.'_'.$data->part.'_title')}}
</h1>
<div class="autoplay-clip-list">
@foreach(\App\Models\Clip::where('status',1)->get() as $clip)

@ -11,16 +11,16 @@ class AutoPlayClips
{
$setting = new Setting();
$setting->section = 'theme';
$setting->key = $part->area->name . '_' . $part->part.'_title';
$setting->key = $part->area_name . '_' . $part->part.'_title';
$setting->value = "Clips list";
$setting->type = 'text';
$setting->size = 6;
$setting->title = $part->area->name . ' ' . $part->part;
$setting->title = $part->area_name . ' ' . $part->part;
$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.'_title')->first()?->delete();
}
public static function onMount(Part $part = null)
{

@ -12,17 +12,17 @@ class CompareProducts
$setting = new Setting();
$setting->section = 'theme';
$setting->key = $part->area->name . '_' . $part->part.'_color';
$setting->key = $part->area_name . '_' . $part->part.'_color';
$setting->value = '#ffffff';
$setting->type = 'COLOR';
$setting->data = json_encode(['name' => 'compare-bg']);
$setting->size = 12;
$setting->title = $part->area->name . ' ' . $part->part .' main color';
$setting->title = $part->area_name . ' ' . $part->part .' main color';
$setting->save();
}
public static function onRemove(Part $part = null)
{
Setting::where('key',$part->area->name . '_' . $part->part.'_color')->first()?->delete();
Setting::where('key',$part->area_name . '_' . $part->part.'_color')->first()?->delete();
}
public static function onMount(Part $part = null)

@ -2,21 +2,21 @@
<div class="{{gfx()['container']}}">
<h1 class="text-center fw-light mb-3">
{{getSetting($data->area->name.'_'.$data->part.'_title')}}
{{getSetting($data->area_name.'_'.$data->part.'_title')}}
</h1>
<div class="row">
<div class="col-md-5">
<div class="pin-box p-3">
<i class="ri-mail-add-line icon"></i>
@if(getGroupBySetting($data->area->name.'_'.$data->part)?->posts()->where('status',1)->where('is_pinned',1)->count() == 0)
@if(getGroupBySetting($data->area_name.'_'.$data->part)?->posts()->where('status',1)->where('is_pinned',1)->count() == 0)
<h3 class="p-4 text-center">
{{__("You must add a pinned post to :GROUP",['GROUP' => getGroupBySetting($data->area->name.'_'.$data->part)?->name])}}
{{__("You must add a pinned post to :GROUP",['GROUP' => getGroupBySetting($data->area_name.'_'.$data->part)?->name])}}
</h3>
@else
<h3>
{{getGroupBySetting($data->area->name.'_'.$data->part)?->posts()->where('status',1)->where('is_pinned',1)->first()->title}}
{{getGroupBySetting($data->area_name.'_'.$data->part)?->posts()->where('status',1)->where('is_pinned',1)->first()->title}}
</h3>
{!! getGroupBySetting($data->area->name.'_'.$data->part)?->posts()->where('status',1)->where('is_pinned',1)->first()->body!!}
{!! getGroupBySetting($data->area_name.'_'.$data->part)?->posts()->where('status',1)->where('is_pinned',1)->first()->body!!}
<ul class="social text-center">
@foreach(getSettingsGroup('social_')??[] as $k => $social)
@ -106,7 +106,7 @@
@php($dir = langIsRTL(app()->getLocale() )?'rtl':'ltr' )
@foreach( getGroupBySetting($data->area->name.'_'.$data->part)?->posts()->where('status',1)
@foreach( getGroupBySetting($data->area_name.'_'.$data->part)?->posts()->where('status',1)
->where('is_pinned',0)->orderByDesc('id')->get() as $i => $post)
<div class="row mb-2" @if( ($i % 2) == 0) dir="rtl" @else dir="ltr" @endif>
<div class="col-md-2">

@ -12,26 +12,26 @@ class MeloContact
{
$setting = new Setting();
$setting->section = 'theme';
$setting->key = $part->area->name . '_' . $part->part;
$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->title = $part->area_name . ' ' . $part->part;
$setting->save();
$setting = new Setting();
$setting->section = 'theme';
$setting->key = $part->area->name . '_' . $part->part.'_title';
$setting->key = $part->area_name . '_' . $part->part.'_title';
$setting->value = __("Contact us");
$setting->type = 'TEXT';
$setting->size = 6;
$setting->title = $part->area->name . ' ' . $part->part . ' title';
$setting->title = $part->area_name . ' ' . $part->part . ' title';
$setting->save();
}
public static function onRemove(Part $part = null)
{
Setting::where('key',$part->area->name . '_' . $part->part)->first()?->delete();
Setting::where('key',$part->area->name . '_' . $part->part.'_title')->first()?->delete();
Setting::where('key',$part->area_name . '_' . $part->part)->first()?->delete();
Setting::where('key',$part->area_name . '_' . $part->part.'_title')->first()?->delete();
}

@ -1,3 +1,3 @@
<a id='SimpleGoTop' href="#">
<i class="{{getSetting($data->area->name.'_'.$data->part.'_icon')}}"></i>
<i class="{{getSetting($data->area_name.'_'.$data->part.'_icon')}}"></i>
</a>

@ -11,17 +11,17 @@ class SimpleGoTop
{
$setting = new Setting();
$setting->section = 'theme';
$setting->key = $part->area->name . '_' . $part->part.'_icon';
$setting->key = $part->area_name . '_' . $part->part.'_icon';
$setting->value = 'ri-arrow-up-line';
$setting->size = 12;
$setting->type = 'ICON';
// $setting->data = json_encode(['xmin' => 2, 'xmax' => 6]);
$setting->title = $part->area->name . ' ' . $part->part. ' icon ';
$setting->title = $part->area_name . ' ' . $part->part. ' icon ';
$setting->save();
}
public static function onRemove(Part $part = null)
{
Setting::where('key',$part->area->name . '_' . $part->part.'_icon')->first()?->delete();
Setting::where('key',$part->area_name . '_' . $part->part.'_icon')->first()?->delete();
}
public static function onMount(Part $part = null)

@ -267,15 +267,15 @@
{{config('app.name')}}
</h3>
<p>
{{getSetting($data->area->name.'_'.$data->part.'_text')}}
{{getSetting($data->area_name.'_'.$data->part.'_text')}}
</p>
</div>
<div class="col-md-5">
<h3>
{{getSetting($data->area->name.'_'.$data->part.'_title2')}}
{{getSetting($data->area_name.'_'.$data->part.'_title2')}}
</h3>
<ul>
@foreach( getGroupPostsBySetting($data->area->name.'_'.$data->part.'_group',5) as $post )
@foreach( getGroupPostsBySetting($data->area_name.'_'.$data->part.'_group',5) as $post )
<li>
<a href="{{$post->webUrl()}}">
{{Str::limit($post->title,40)}}
@ -285,7 +285,7 @@
</ul>
</div>
<div class="col-md-2">
{!! getSetting($data->area->name.'_'.$data->part.'_last') !!}
{!! getSetting($data->area_name.'_'.$data->part.'_last') !!}
</div>
</div>
</div>

@ -12,50 +12,50 @@ class FireFooter
{
$setting = new Setting();
$setting->section = 'theme';
$setting->key = $part->area->name . '_' . $part->part.'_text';
$setting->key = $part->area_name . '_' . $part->part.'_text';
$setting->value = 'Lorem ipsum dolor sit amet, consectetur adipisicing elit. Accusamus aliquid consequuntur culpa cupiditate dignissimos dolor doloremque error facilis ipsum iure officia quam qui, tempora! Fuga harum impedit iusto magnam veniam.';
$setting->size = 12;
$setting->type = 'LONGTEXT';
// $setting->data = json_encode(['xmin' => 2, 'xmax' => 90]);
$setting->title = $part->area->name . ' ' . $part->part. ' main text';
$setting->title = $part->area_name . ' ' . $part->part. ' main text';
$setting->save();
$setting = new Setting();
$setting->section = 'theme';
$setting->key = $part->area->name . '_' . $part->part.'_title2';
$setting->key = $part->area_name . '_' . $part->part.'_title2';
$setting->value = 'FAQ';
$setting->size = 6;
$setting->type = 'TEXT';
// $setting->data = json_encode(['xmin' => 2, 'xmax' => 90]);
$setting->title = $part->area->name . ' ' . $part->part. ' title 2';
$setting->title = $part->area_name . ' ' . $part->part. ' title 2';
$setting->save();
$setting = new Setting();
$setting->section = 'theme';
$setting->key = $part->area->name . '_' . $part->part.'_group';
$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->title = $part->area_name . ' ' . $part->part. ' group';
$setting->save();
$setting = new Setting();
$setting->section = 'theme';
$setting->key = $part->area->name . '_' . $part->part.'_last';
$setting->key = $part->area_name . '_' . $part->part.'_last';
$setting->value = 'Lorem ipsum dolor sit amet, consectetur adipisicing elit. Accusamus aliquid consequuntur culpa cupiditate dignissimos dolor doloremque error facilis ipsum iure officia quam qui, tempora! Fuga harum impedit iusto magnam veniam.';
$setting->size = 12;
$setting->title = $part->area->name . ' ' . $part->part. ' last content';
$setting->title = $part->area_name . ' ' . $part->part. ' last content';
$setting->type = 'EDITOR';
$setting->save();
}
public static function onRemove(Part $part = null)
{
Setting::where('key',$part->area->name . '_' . $part->part.'_text')->first()?->delete();
Setting::where('key',$part->area->name . '_' . $part->part.'_title2')->first()?->delete();
Setting::where('key',$part->area->name . '_' . $part->part.'_group')->first()?->delete();
Setting::where('key',$part->area->name . '_' . $part->part.'_last')->first()?->delete();
Setting::where('key',$part->area_name . '_' . $part->part.'_text')->first()?->delete();
Setting::where('key',$part->area_name . '_' . $part->part.'_title2')->first()?->delete();
Setting::where('key',$part->area_name . '_' . $part->part.'_group')->first()?->delete();
Setting::where('key',$part->area_name . '_' . $part->part.'_last')->first()?->delete();
}
public static function onMount(Part $part = null)
{

@ -1,4 +1,4 @@
<footer class='ParallaxFooter' style="background-image: url('{{asset('upload/images/'.$data->area->name.'.'.$data->part.'.jpg')}}')">
<footer class='ParallaxFooter' style="background-image: url('{{asset('upload/images/'.$data->area_name.'.'.$data->part.'.jpg')}}')">
<div class="{{gfx()['container']}}">
<div class="row">
@ -7,15 +7,15 @@
{{config('app.name')}}
</h3>
<p class="px-4">
{{getSetting($data->area->name.'_'.$data->part.'_text')}}
{{getSetting($data->area_name.'_'.$data->part.'_text')}}
</p>
</div>
<div class="col-md-5">
<h3>
{{getSetting($data->area->name.'_'.$data->part.'_title2')}}
{{getSetting($data->area_name.'_'.$data->part.'_title2')}}
</h3>
<ul class="ps-5">
@foreach( getGroupPostsBySetting($data->area->name.'_'.$data->part.'_group',5) as $post )
@foreach( getGroupPostsBySetting($data->area_name.'_'.$data->part.'_group',5) as $post )
<li>
<a href="{{$post->webUrl()}}">
{{Str::limit($post->title,40)}}
@ -25,7 +25,7 @@
</ul>
</div>
<div class="col-md-2">
{!! getSetting($data->area->name.'_'.$data->part.'_last') !!}
{!! getSetting($data->area_name.'_'.$data->part.'_last') !!}
</div>
</div>
</div>

@ -14,62 +14,62 @@ class ParallaxFooter
$setting = new Setting();
$setting->section = 'theme';
$setting->key = $part->area->name . '_' . $part->part.'_text';
$setting->key = $part->area_name . '_' . $part->part.'_text';
$setting->value = 'Lorem ipsum dolor sit amet, consectetur adipisicing elit. Accusamus aliquid consequuntur culpa cupiditate dignissimos dolor doloremque error facilis ipsum iure officia quam qui, tempora! Fuga harum impedit iusto magnam veniam.';
$setting->size = 12;
$setting->type = 'LONGTEXT';
// $setting->data = json_encode(['xmin' => 2, 'xmax' => 90]);
$setting->title = $part->area->name . ' ' . $part->part. ' main text';
$setting->title = $part->area_name . ' ' . $part->part. ' main text';
$setting->save();
$setting = new Setting();
$setting->section = 'theme';
$setting->key = $part->area->name . '_' . $part->part.'_title2';
$setting->key = $part->area_name . '_' . $part->part.'_title2';
$setting->value = 'FAQ';
$setting->size = 6;
$setting->type = 'TEXT';
// $setting->data = json_encode(['xmin' => 2, 'xmax' => 90]);
$setting->title = $part->area->name . ' ' . $part->part. ' title 2';
$setting->title = $part->area_name . ' ' . $part->part. ' title 2';
$setting->save();
$setting = new Setting();
$setting->section = 'theme';
$setting->key = $part->area->name . '_' . $part->part.'_group';
$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->title = $part->area_name . ' ' . $part->part. ' group';
$setting->save();
$setting = new Setting();
$setting->section = 'theme';
$setting->key = $part->area->name . '_' . $part->part.'_last';
$setting->key = $part->area_name . '_' . $part->part.'_last';
$setting->value = 'Lorem ipsum dolor sit amet, consectetur adipisicing elit. Accusamus aliquid consequuntur culpa cupiditate dignissimos dolor doloremque error facilis ipsum iure officia quam qui, tempora! Fuga harum impedit iusto magnam veniam.';
$setting->size = 12;
$setting->title = $part->area->name . ' ' . $part->part. ' last content';
$setting->title = $part->area_name . ' ' . $part->part. ' last content';
$setting->type = 'EDITOR';
$setting->save();
$setting = new Setting();
$setting->section = 'theme';
$setting->key = $part->area->name . '_' . $part->part.'_jpg';
$setting->key = $part->area_name . '_' . $part->part.'_jpg';
$setting->value = null;
$setting->type = 'FILE';
$setting->size = 12;
$setting->title = $part->area->name . ' ' . $part->part.' Image';
$setting->title = $part->area_name . ' ' . $part->part.' Image';
$setting->save();
File::copy(__DIR__.'/../../default-assets/bg-girl.jpg',public_path('upload/images/').$part->area->name . '.' . $part->part.'.jpg');
File::copy(__DIR__.'/../../default-assets/bg-girl.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.'_text')->first()?->delete();
Setting::where('key',$part->area->name . '_' . $part->part.'_title2')->first()?->delete();
Setting::where('key',$part->area->name . '_' . $part->part.'_group')->first()?->delete();
Setting::where('key',$part->area->name . '_' . $part->part.'_last')->first()?->delete();
Setting::where('key',$part->area->name . '_' . $part->part.'_jpg')->first()?->delete();
Setting::where('key',$part->area_name . '_' . $part->part.'_text')->first()?->delete();
Setting::where('key',$part->area_name . '_' . $part->part.'_title2')->first()?->delete();
Setting::where('key',$part->area_name . '_' . $part->part.'_group')->first()?->delete();
Setting::where('key',$part->area_name . '_' . $part->part.'_last')->first()?->delete();
Setting::where('key',$part->area_name . '_' . $part->part.'_jpg')->first()?->delete();
}
public static function onMount(Part $part = null)
{

@ -4,9 +4,9 @@
<div class="row">
<div class="col-md-4">
<h3>
{{getSetting($data->area->name.'_'.$data->part.'_title1')}}
{{getSetting($data->area_name.'_'.$data->part.'_title1')}}
</h3>
@foreach( getGroupPostsBySetting($data->area->name.'_'.$data->part.'_group1',5) as $post )
@foreach( getGroupPostsBySetting($data->area_name.'_'.$data->part.'_group1',5) as $post )
<li>
<a href="{{$post->webUrl()}}">
{{Str::limit($post->title,40)}}
@ -16,10 +16,10 @@
</div>
<div class="col-md-4">
<h3>
{{getSetting($data->area->name.'_'.$data->part.'_title2')}}
{{getSetting($data->area_name.'_'.$data->part.'_title2')}}
</h3>
<ul>
@foreach( getGroupPostsBySetting($data->area->name.'_'.$data->part.'_group2',5) as $post )
@foreach( getGroupPostsBySetting($data->area_name.'_'.$data->part.'_group2',5) as $post )
<li>
<a href="{{$post->webUrl()}}">
{{Str::limit($post->title,40)}}
@ -29,7 +29,7 @@
</ul>
</div>
<div class="col-md-4">
{!! getSetting($data->area->name.'_'.$data->part.'_last') !!}
{!! getSetting($data->area_name.'_'.$data->part.'_last') !!}
</div>
</div>
</div>

@ -14,75 +14,75 @@ class SimpleFooter
$setting = new Setting();
$setting->section = 'theme';
$setting->key = $part->area->name . '_' . $part->part.'_title1';
$setting->key = $part->area_name . '_' . $part->part.'_title1';
$setting->value = 'FAQ';
$setting->size = 6;
$setting->type = 'TEXT';
// $setting->data = json_encode(['xmin' => 2, 'xmax' => 90]);
$setting->title = $part->area->name . ' ' . $part->part. ' title 1';
$setting->title = $part->area_name . ' ' . $part->part. ' title 1';
$setting->save();
$setting = new Setting();
$setting->section = 'theme';
$setting->key = $part->area->name . '_' . $part->part.'_group1';
$setting->key = $part->area_name . '_' . $part->part.'_group1';
$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. ' group1';
$setting->title = $part->area_name . ' ' . $part->part. ' group1';
$setting->save();
$setting = new Setting();
$setting->section = 'theme';
$setting->key = $part->area->name . '_' . $part->part.'_title2';
$setting->key = $part->area_name . '_' . $part->part.'_title2';
$setting->value = 'FAQ';
$setting->size = 6;
$setting->type = 'TEXT';
// $setting->data = json_encode(['xmin' => 2, 'xmax' => 90]);
$setting->title = $part->area->name . ' ' . $part->part. ' title 2';
$setting->title = $part->area_name . ' ' . $part->part. ' title 2';
$setting->save();
$setting = new Setting();
$setting->section = 'theme';
$setting->key = $part->area->name . '_' . $part->part.'_group2';
$setting->key = $part->area_name . '_' . $part->part.'_group2';
$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. ' group2';
$setting->title = $part->area_name . ' ' . $part->part. ' group2';
$setting->save();
$setting = new Setting();
$setting->section = 'theme';
$setting->key = $part->area->name . '_' . $part->part.'_last';
$setting->key = $part->area_name . '_' . $part->part.'_last';
$setting->value = 'Lorem ipsum dolor sit amet, consectetur adipisicing elit. Accusamus aliquid consequuntur culpa cupiditate dignissimos dolor doloremque error facilis ipsum iure officia quam qui, tempora! Fuga harum impedit iusto magnam veniam.';
$setting->size = 12;
$setting->title = $part->area->name . ' ' . $part->part. ' last content';
$setting->title = $part->area_name . ' ' . $part->part. ' last content';
$setting->type = 'EDITOR';
$setting->save();
// $setting = new Setting();
// $setting->section = 'theme';
// $setting->key = $part->area->name . '_' . $part->part.'_bg';
// $setting->key = $part->area_name . '_' . $part->part.'_bg';
// $setting->value = '#111111';
// $setting->type = 'COLOR';
// $setting->data = json_encode(['name' => 'simple-footer-bg']);
// $setting->size = 3;
// $setting->title = $part->area->name . ' ' . $part->part .' background';
// $setting->title = $part->area_name . ' ' . $part->part .' background';
// $setting->save();
}
public static function onRemove(Part $part = null)
{
Setting::where('key',$part->area->name . '_' . $part->part.'_title1')->first()?->delete();
Setting::where('key',$part->area->name . '_' . $part->part.'_group1')->first()?->delete();
Setting::where('key',$part->area->name . '_' . $part->part.'_title2')->first()?->delete();
Setting::where('key',$part->area->name . '_' . $part->part.'_group2')->first()?->delete();
Setting::where('key',$part->area->name . '_' . $part->part.'_last')->first()?->delete();
// Setting::where('key',$part->area->name . '_' . $part->part.'_bg')->first()?->delete();
Setting::where('key',$part->area_name . '_' . $part->part.'_title1')->first()?->delete();
Setting::where('key',$part->area_name . '_' . $part->part.'_group1')->first()?->delete();
Setting::where('key',$part->area_name . '_' . $part->part.'_title2')->first()?->delete();
Setting::where('key',$part->area_name . '_' . $part->part.'_group2')->first()?->delete();
Setting::where('key',$part->area_name . '_' . $part->part.'_last')->first()?->delete();
// Setting::where('key',$part->area_name . '_' . $part->part.'_bg')->first()?->delete();
}
public static function onMount(Part $part = null)
{

@ -1,8 +1,8 @@
<footer class='WaveFooter'
style="--speed: {{getSetting($data->area->name.'_'.$data->part.'_speed')}}s;
--speed2: {{getSetting($data->area->name.'_'.$data->part.'_speed2')}}s;
--speed3: {{getSetting($data->area->name.'_'.$data->part.'_speed3')}}s">
style="--speed: {{getSetting($data->area_name.'_'.$data->part.'_speed')}}s;
--speed2: {{getSetting($data->area_name.'_'.$data->part.'_speed2')}}s;
--speed3: {{getSetting($data->area_name.'_'.$data->part.'_speed3')}}s">
<svg
xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"

@ -12,37 +12,37 @@ class WaveFooter
$setting = new Setting();
$setting->section = 'theme';
$setting->key = $part->area->name . '_' . $part->part.'_speed';
$setting->key = $part->area_name . '_' . $part->part.'_speed';
$setting->value = 2;
$setting->size = 4;
$setting->type = 'NUMBER';
$setting->data = json_encode(['xmin' => 2, 'xmax' => 90]);
$setting->title = $part->area->name . ' ' . $part->part. ' speed wave 1';
$setting->title = $part->area_name . ' ' . $part->part. ' speed wave 1';
$setting->save();
$setting = new Setting();
$setting->section = 'theme';
$setting->key = $part->area->name . '_' . $part->part.'_speed2';
$setting->key = $part->area_name . '_' . $part->part.'_speed2';
$setting->value = 6;
$setting->size = 4;
$setting->type = 'NUMBER';
$setting->data = json_encode(['xmin' => 2, 'xmax' => 90]);
$setting->title = $part->area->name . ' ' . $part->part. ' speed wave 2';
$setting->title = $part->area_name . ' ' . $part->part. ' speed wave 2';
$setting->save();
$setting = new Setting();
$setting->section = 'theme';
$setting->key = $part->area->name . '_' . $part->part.'_speed3';
$setting->key = $part->area_name . '_' . $part->part.'_speed3';
$setting->value = 4;
$setting->size = 4;
$setting->type = 'NUMBER';
$setting->data = json_encode(['xmin' => 2, 'xmax' => 90]);
$setting->title = $part->area->name . ' ' . $part->part. ' speed wave 3';
$setting->title = $part->area_name . ' ' . $part->part. ' speed wave 3';
$setting->save();
}
public static function onRemove(Part $part = null)
{
Setting::where('key',$part->area->name . '_' . $part->part.'_speed')->first()?->delete();
Setting::where('key',$part->area->name . '_' . $part->part.'_speed2')->first()?->delete();
Setting::where('key',$part->area->name . '_' . $part->part.'_speed3')->first()?->delete();
Setting::where('key',$part->area_name . '_' . $part->part.'_speed')->first()?->delete();
Setting::where('key',$part->area_name . '_' . $part->part.'_speed2')->first()?->delete();
Setting::where('key',$part->area_name . '_' . $part->part.'_speed3')->first()?->delete();
}
public static function onMount(Part $part = null)
{

@ -1,10 +1,10 @@
<section class='GridGallery'>
<div class="{{gfx()['container']}}">
<h1>
{{ getSetting($data->area->name.'_'.$data->part.'_title')}}
{{ getSetting($data->area_name.'_'.$data->part.'_title')}}
</h1>
<div class="row">
@foreach(\App\Models\Gallery::where('status',1)->orderBy('id')->limit( getSetting($data->area->name.'_'.$data->part.'_limit'))->get() as $gallery)
@foreach(\App\Models\Gallery::where('status',1)->orderBy('id')->limit( getSetting($data->area_name.'_'.$data->part.'_limit'))->get() as $gallery)
<div class="col-md p-1">
<a class="gallery-grid" href="{{$gallery->webUrl()}}">

@ -11,26 +11,26 @@ class GridGallery
{
$setting = new Setting();
$setting->section = 'theme';
$setting->key = $part->area->name . '_' . $part->part.'_title';
$setting->key = $part->area_name . '_' . $part->part.'_title';
$setting->value = __('Galleries');
$setting->type = 'TEXT';
$setting->size = 6;
$setting->title = $part->area->name . ' ' . $part->part.' title';
$setting->title = $part->area_name . ' ' . $part->part.' title';
$setting->save();
$setting = new Setting();
$setting->section = 'theme';
$setting->key = $part->area->name . '_' . $part->part.'_limit';
$setting->key = $part->area_name . '_' . $part->part.'_limit';
$setting->value = 3;
$setting->size = 6;
$setting->type = 'NUMBER';
$setting->data = json_encode(['xmin' => 2, 'xmax' => 6]);
$setting->title = $part->area->name . ' ' . $part->part. ' limit';
$setting->title = $part->area_name . ' ' . $part->part. ' limit';
$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.'_limit')->first()?->delete();
Setting::where('key',$part->area_name . '_' . $part->part.'_title')->first()?->delete();
Setting::where('key',$part->area_name . '_' . $part->part.'_limit')->first()?->delete();
}
public static function onMount(Part $part = null)
{

@ -1,4 +1,4 @@
<header class='ParallaxHeader' style="background-image: url('{{$bg??asset('upload/images/'.$part->area->name . '.' . $part->part.'.jpg')}}')">
<header class='ParallaxHeader' style="background-image: url('{{$bg??asset('upload/images/'.$part->area_name . '.' . $part->part.'.jpg')}}')">
<div class="{{gfx()['container']}}">
<h1>
{{$title}}

@ -13,18 +13,18 @@ class ParallaxHeader
$setting = new Setting();
$setting->section = 'theme';
$setting->key = $part->area->name . '_' . $part->part.'_jpg';
$setting->key = $part->area_name . '_' . $part->part.'_jpg';
$setting->value = null;
$setting->type = 'FILE';
$setting->size = 12;
$setting->title = $part->area->name . ' ' . $part->part.' default image';
$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)
{
Setting::where('key',$part->area->name . '_' . $part->part.'_jpg')->first()?->delete();
Setting::where('key',$part->area_name . '_' . $part->part.'_jpg')->first()?->delete();
}
public static function onMount(Part $part = null)
{

@ -1,4 +1,4 @@
<header class='ParallaxHeaderPin' style="background-image: url('{{$bg??asset('upload/images/'.$part->area->name . '.' . $part->part.'.jpg')}}')">
<header class='ParallaxHeaderPin' style="background-image: url('{{$bg??asset('upload/images/'.$part->area_name . '.' . $part->part.'.jpg')}}')">
<div class="{{gfx()['container']}}">
<h1>
{{$title}}

@ -14,18 +14,18 @@ class ParallaxHeaderPin
$setting = new Setting();
$setting->section = 'theme';
$setting->key = $part->area->name . '_' . $part->part.'_jpg';
$setting->key = $part->area_name . '_' . $part->part.'_jpg';
$setting->value = null;
$setting->type = 'FILE';
$setting->size = 12;
$setting->title = $part->area->name . ' ' . $part->part.' default image';
$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)
{
Setting::where('key',$part->area->name . '_' . $part->part.'_jpg')->first()?->delete();
Setting::where('key',$part->area_name . '_' . $part->part.'_jpg')->first()?->delete();
}
public static function onMount(Part $part = null)
{

@ -1,7 +1,7 @@
<section class='AuthorSlider'>
<div class="{{gfx()['container']}}">
<h1>
{{getSetting($data->area->name.'_'.$data->part.'_title')}}
{{getSetting($data->area_name.'_'.$data->part.'_title')}}
</h1>
<div id="slider-author-container">
<div id="auth-nxt" class="sld-btn">
@ -11,7 +11,7 @@
<i class="ri-arrow-left-line"></i>
</div>
<div id="author-slider">
@foreach( getGroupPostsBySetting($data->area->name.'_'.$data->part.'_group',10) as $post )
@foreach( getGroupPostsBySetting($data->area_name.'_'.$data->part.'_group',10) as $post )
<div class="item slider-content">
<div class="author-slide">

@ -12,49 +12,49 @@ class AuthorSlider
{
$setting = new Setting();
$setting->section = 'theme';
$setting->key = $part->area->name . '_' . $part->part.'_title';
$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->title = $part->area_name . ' ' . $part->part .' title';
$setting->save();
$setting = new Setting();
$setting->section = 'theme';
$setting->key = $part->area->name . '_' . $part->part.'_group';
$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->title = $part->area_name . ' ' . $part->part. ' group';
$setting->save();
$setting = new Setting();
$setting->section = 'theme';
$setting->key = $part->area->name . '_' . $part->part.'_color';
$setting->key = $part->area_name . '_' . $part->part.'_color';
$setting->value = gfx()['secondary'];
$setting->type = 'COLOR';
$setting->data = json_encode(['name' => 'author-slider-color']);
$setting->size = 6;
$setting->title = $part->area->name . ' ' . $part->part .' background color';
$setting->title = $part->area_name . ' ' . $part->part .' background color';
$setting->save();
$setting = new Setting();
$setting->section = 'theme';
$setting->key = $part->area->name . '_' . $part->part.'_color2';
$setting->key = $part->area_name . '_' . $part->part.'_color2';
$setting->value = gfx()['primary'];
$setting->type = 'COLOR';
$setting->data = json_encode(['name' => 'author-slider-color2']);
$setting->size = 6;
$setting->title = $part->area->name . ' ' . $part->part .'content background color';
$setting->title = $part->area_name . ' ' . $part->part .'content 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();
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)
{

@ -4,11 +4,11 @@
<div class="row">
@for($i = 1; $i <= \Resources\Views\Segments\CounterGrid::$count; $i++)
<div class="col-lg-3 col-md-6">
<i class="{{getSetting($data->area->name.'_'.$data->part.'_icon'.$i)}}"></i>
<i class="{{getSetting($data->area_name.'_'.$data->part.'_icon'.$i)}}"></i>
<h3>
{{getSetting($data->area->name.'_'.$data->part.'_title'.$i)}}
{{getSetting($data->area_name.'_'.$data->part.'_title'.$i)}}
</h3>
<div class="grid-counter" data-min="0" data-max="{{getSetting($data->area->name.'_'.$data->part.'_number'.$i)}}">
<div class="grid-counter" data-min="0" data-max="{{getSetting($data->area_name.'_'.$data->part.'_number'.$i)}}">
0
</div>
</div>

@ -18,41 +18,41 @@ class CounterGrid
$setting = new Setting();
$setting->section = 'theme';
$setting->key = $part->area->name . '_' . $part->part.'_title'.$i;
$setting->key = $part->area_name . '_' . $part->part.'_title'.$i;
$setting->value = "Counter ".$i;
$setting->size = 4;
$setting->type = 'TEXT';
// $setting->data = json_encode(['xmin' => 2, 'xmax' => 90]);
$setting->title = $part->area->name . ' ' . $part->part. ' title '.$i;
$setting->title = $part->area_name . ' ' . $part->part. ' title '.$i;
$setting->save();
$setting = new Setting();
$setting->section = 'theme';
$setting->key = $part->area->name . '_' . $part->part.'_icon'.$i;
$setting->key = $part->area_name . '_' . $part->part.'_icon'.$i;
$setting->value = 'ri-user-line';
$setting->size = 4;
$setting->type = 'ICON';
// $setting->data = json_encode(['xmin' => 2, 'xmax' => 6]);
$setting->title = $part->area->name . ' ' . $part->part. ' icon '.$i;
$setting->title = $part->area_name . ' ' . $part->part. ' icon '.$i;
$setting->save();
$setting = new Setting();
$setting->section = 'theme';
$setting->key = $part->area->name . '_' . $part->part.'_number'.$i;
$setting->key = $part->area_name . '_' . $part->part.'_number'.$i;
$setting->value = rand(100,4000);
$setting->size = 4;
$setting->type = 'NUMBER';
$setting->data = json_encode(['xmin' => 0, 'xmax' => 9007199254740992]);
$setting->title = $part->area->name . ' ' . $part->part. ' number '.$i;
$setting->title = $part->area_name . ' ' . $part->part. ' number '.$i;
$setting->save();
}
}
public static function onRemove(Part $part = null)
{
for ($i = 1; $i <= self::$count; $i++) {
Setting::where('key',$part->area->name . '_' . $part->part.'_title'.$i)->first()?->delete();
Setting::where('key',$part->area->name . '_' . $part->part.'_icon'.$i)->first()?->delete();
Setting::where('key',$part->area->name . '_' . $part->part.'_number'.$i)->first()?->delete();
Setting::where('key',$part->area_name . '_' . $part->part.'_title'.$i)->first()?->delete();
Setting::where('key',$part->area_name . '_' . $part->part.'_icon'.$i)->first()?->delete();
Setting::where('key',$part->area_name . '_' . $part->part.'_number'.$i)->first()?->delete();
}
}

@ -1,10 +1,10 @@
<section class='GradientTextLink py-4'>
<div class="{{gfx()['container']}} py-4 text-center">
<h1>
{{getSetting($data->area->name.'_'.$data->part.'_title')}}
{{getSetting($data->area_name.'_'.$data->part.'_title')}}
</h1>
<a class="btn btn-outline-invert" href="{{getSetting($data->area->name.'_'.$data->part.'_link')}}">
{{getSetting($data->area->name.'_'.$data->part.'_btn')}}
<a class="btn btn-outline-invert" href="{{getSetting($data->area_name.'_'.$data->part.'_link')}}">
{{getSetting($data->area_name.'_'.$data->part.'_btn')}}
</a>
</div>
</section>

@ -11,50 +11,50 @@ class GradientTextLink
{
$setting = new Setting();
$setting->section = 'theme';
$setting->key = $part->area->name . '_' . $part->part . '_title';
$setting->key = $part->area_name . '_' . $part->part . '_title';
$setting->value = 'Lorem ipsum dolor sit amet, consectetur adipisicing elit. A adipisci aliquid aspernatur, commodi corporis cupiditate';
$setting->type = 'TEXT';
$setting->size = 12;
$setting->title = $part->area->name . ' ' . $part->part . ' title';
$setting->title = $part->area_name . ' ' . $part->part . ' title';
$setting->save();
$setting = new Setting();
$setting->section = 'theme';
$setting->key = $part->area->name . '_' . $part->part . '_btn';
$setting->key = $part->area_name . '_' . $part->part . '_btn';
$setting->value = 'Shop';
$setting->type = 'TEXT';
$setting->size = 4;
$setting->title = $part->area->name . ' ' . $part->part . ' button text';
$setting->title = $part->area_name . ' ' . $part->part . ' button text';
$setting->save();
$setting = new Setting();
$setting->section = 'theme';
$setting->key = $part->area->name . '_' . $part->part . '_link';
$setting->key = $part->area_name . '_' . $part->part . '_link';
$setting->value = config('app.url');
$setting->type = 'TEXT';
$setting->ltr = true;
$setting->size = 4;
$setting->title = $part->area->name . ' ' . $part->part . ' button link';
$setting->title = $part->area_name . ' ' . $part->part . ' button link';
$setting->save();
$setting = new Setting();
$setting->section = 'theme';
$setting->key = $part->area->name . '_' . $part->part . '_deg';
$setting->key = $part->area_name . '_' . $part->part . '_deg';
$setting->value = 45;
$setting->size = 4;
$setting->type = 'NUMBER';
$setting->data = json_encode(['xmin' => 0, 'xmax' => 360, 'name' => 'gradient-text-link-deg', 'suffix' => 'deg']);
$setting->title = $part->area->name . ' ' . $part->part . ' degree';
$setting->title = $part->area_name . ' ' . $part->part . ' degree';
$setting->save();
}
public static function onRemove(Part $part = null)
{
Setting::where('key', $part->area->name . '_' . $part->part . '_btn')->first()?->delete();
Setting::where('key', $part->area->name . '_' . $part->part . '_title')->first()?->delete();
Setting::where('key', $part->area->name . '_' . $part->part . '_link')->first()?->delete();
Setting::where('key', $part->area->name . '_' . $part->part . '_deg')->first()?->delete();
Setting::where('key', $part->area_name . '_' . $part->part . '_btn')->first()?->delete();
Setting::where('key', $part->area_name . '_' . $part->part . '_title')->first()?->delete();
Setting::where('key', $part->area_name . '_' . $part->part . '_link')->first()?->delete();
Setting::where('key', $part->area_name . '_' . $part->part . '_deg')->first()?->delete();
}
public static function onMount(Part $part = null)

@ -1,15 +1,15 @@
<section id='InlineMap'>
<div class="{{gfx()['container']}}">
<h5>
<a href="{{getSetting($data->area->name.'_'.$data->part.'_link')}}">
{{getSetting($data->area->name.'_'.$data->part.'_title')}}
<a href="{{getSetting($data->area_name.'_'.$data->part.'_link')}}">
{{getSetting($data->area_name.'_'.$data->part.'_title')}}
</a>
</h5>
</div>
<div id="mapContainer" @if(getSetting($data->area->name.'_'.$data->part.'_dark')) class="dark-mode" @endif>
<div id="mapContainer" @if(getSetting($data->area_name.'_'.$data->part.'_dark')) class="dark-mode" @endif>
</div>
@php($mapData = explode(',',getSetting($data->area->name.'_'.$data->part.'_loc')))
@php($mapData = explode(',',getSetting($data->area_name.'_'.$data->part.'_loc')))
<input type="hidden" id="maplat" value="{{$mapData[0]}}">
<input type="hidden" id="maplng" value="{{$mapData[1]}}">
<input type="hidden" id="mapzoom" value="{{$mapData[2]}}">

@ -11,50 +11,50 @@ class InlineMap
{
$setting = new Setting();
$setting->section = 'theme';
$setting->key = $part->area->name . '_' . $part->part.'_loc';
$setting->key = $part->area_name . '_' . $part->part.'_loc';
$setting->value = '35.83266,50.99155,10';
$setting->size = 12;
$setting->type = 'LOCATION';
// $setting->data = json_encode(['xmin' => 2, 'xmax' => 90]);
$setting->title = $part->area->name . ' ' . $part->part. ' location';
$setting->title = $part->area_name . ' ' . $part->part. ' location';
$setting->save();
$setting = new Setting();
$setting->section = 'theme';
$setting->key = $part->area->name . '_' . $part->part.'_title';
$setting->key = $part->area_name . '_' . $part->part.'_title';
$setting->value = '';
$setting->size = 12;
$setting->type = 'TEXT';
// $setting->data = json_encode(['xmin' => 2, 'xmax' => 90]);
$setting->title = $part->area->name . ' ' . $part->part. ' title';
$setting->title = $part->area_name . ' ' . $part->part. ' title';
$setting->save();
$setting = new Setting();
$setting->section = 'theme';
$setting->key = $part->area->name . '_' . $part->part.'_link';
$setting->key = $part->area_name . '_' . $part->part.'_link';
$setting->value = '';
$setting->size = 6;
$setting->type = 'TEXT';
// $setting->data = json_encode(['xmin' => 2, 'xmax' => 90]);
$setting->title = $part->area->name . ' ' . $part->part. ' link';
$setting->title = $part->area_name . ' ' . $part->part. ' link';
$setting->save();
$setting = new Setting();
$setting->section = 'theme';
$setting->key = $part->area->name . '_' . $part->part.'_dark';
$setting->key = $part->area_name . '_' . $part->part.'_dark';
$setting->value = 0;
$setting->size = 6;
$setting->type = 'CHECKBOX';
// $setting->data = json_encode(['xmin' => 2, 'xmax' => 90]);
$setting->title = $part->area->name . ' ' . $part->part. ' dark mode';
$setting->title = $part->area_name . ' ' . $part->part. ' dark mode';
$setting->save();
}
public static function onRemove(Part $part = null)
{
Setting::where('key',$part->area->name . '_' . $part->part.'_loc')->first()?->delete();
Setting::where('key',$part->area->name . '_' . $part->part.'_title')->first()?->delete();
Setting::where('key',$part->area->name . '_' . $part->part.'_link')->first()?->delete();
Setting::where('key',$part->area->name . '_' . $part->part.'_dark')->first()?->delete();
Setting::where('key',$part->area_name . '_' . $part->part.'_loc')->first()?->delete();
Setting::where('key',$part->area_name . '_' . $part->part.'_title')->first()?->delete();
Setting::where('key',$part->area_name . '_' . $part->part.'_link')->first()?->delete();
Setting::where('key',$part->area_name . '_' . $part->part.'_dark')->first()?->delete();
}
public static function onMount(Part $part = null)
{

@ -1,10 +1,10 @@
<section class='SimpleTextLink py-4'>
<div class="{{gfx()['container']}} py-4 text-center">
<h1>
{{getSetting($data->area->name.'_'.$data->part.'_title')}}
{{getSetting($data->area_name.'_'.$data->part.'_title')}}
</h1>
<a class="btn btn-outline-invert" href="{{getSetting($data->area->name.'_'.$data->part.'_link')}}">
{{getSetting($data->area->name.'_'.$data->part.'_btn')}}
<a class="btn btn-outline-invert" href="{{getSetting($data->area_name.'_'.$data->part.'_link')}}">
{{getSetting($data->area_name.'_'.$data->part.'_btn')}}
</a>
</div>
</section>

@ -11,37 +11,37 @@ class SimpleTextLink
{
$setting = new Setting();
$setting->section = 'theme';
$setting->key = $part->area->name . '_' . $part->part.'_title';
$setting->key = $part->area_name . '_' . $part->part.'_title';
$setting->value = 'Lorem ipsum dolor sit amet, consectetur adipisicing elit. A adipisci aliquid aspernatur, commodi corporis cupiditate';
$setting->type = 'TEXT';
$setting->size = 4;
$setting->title = $part->area->name . ' ' . $part->part .' title';
$setting->title = $part->area_name . ' ' . $part->part .' title';
$setting->save();
$setting = new Setting();
$setting->section = 'theme';
$setting->key = $part->area->name . '_' . $part->part.'_btn';
$setting->key = $part->area_name . '_' . $part->part.'_btn';
$setting->value = 'Shop';
$setting->type = 'TEXT';
$setting->size = 4;
$setting->title = $part->area->name . ' ' . $part->part .' button text';
$setting->title = $part->area_name . ' ' . $part->part .' button text';
$setting->save();
$setting = new Setting();
$setting->section = 'theme';
$setting->key = $part->area->name . '_' . $part->part.'_link';
$setting->key = $part->area_name . '_' . $part->part.'_link';
$setting->value = config('app.url');
$setting->type = 'TEXT';
$setting->ltr = true;
$setting->size = 4;
$setting->title = $part->area->name . ' ' . $part->part .' button link';
$setting->title = $part->area_name . ' ' . $part->part .' button link';
$setting->save();
}
public static function onRemove(Part $part = null)
{
Setting::where('key',$part->area->name . '_' . $part->part.'_btn')->first()?->delete();
Setting::where('key',$part->area->name . '_' . $part->part.'_title')->first()?->delete();
Setting::where('key',$part->area->name . '_' . $part->part.'_link')->first()?->delete();
Setting::where('key',$part->area_name . '_' . $part->part.'_btn')->first()?->delete();
Setting::where('key',$part->area_name . '_' . $part->part.'_title')->first()?->delete();
Setting::where('key',$part->area_name . '_' . $part->part.'_link')->first()?->delete();
}
public static function onMount(Part $part = null)
{

@ -106,9 +106,9 @@
{{__("Address")}}:
{{$invoice->address->state->name}}, {{$invoice->address->city->name}}, {{$invoice->address->address}}
, {{$invoice->address->zip}}
@if(trim(getSetting($data->area->name.'_'.$data->part.'_desc')) != '')
@if(trim(getSetting($data->area_name.'_'.$data->part.'_desc')) != '')
<hr>
{!! getSetting($data->area->name.'_'.$data->part.'_desc') !!}
{!! getSetting($data->area_name.'_'.$data->part.'_desc') !!}
@endif
</div>
<div class="no-print btn btn-primary mt-2 w-100" onclick="window.print()">

@ -12,16 +12,16 @@ class LianaInvoice
$setting = new Setting();
$setting->section = 'theme';
$setting->key = $part->area->name . '_' . $part->part.'_desc';
$setting->key = $part->area_name . '_' . $part->part.'_desc';
$setting->value = 'Lorem ipsum dolor sit amet, consectetur adipisicing elit. Accusamus aliquid consequuntur culpa cupiditate dignissimos dolor doloremque error facilis ipsum iure officia quam qui, tempora! Fuga harum impedit iusto magnam veniam.';
$setting->size = 12;
$setting->title = $part->area->name . ' ' . $part->part. ' invoice footer description';
$setting->title = $part->area_name . ' ' . $part->part. ' invoice footer description';
$setting->type = 'EDITOR';
$setting->save();
}
public static function onRemove(Part $part = null)
{
Setting::where('key',$part->area->name . '_' . $part->part.'_desc')->first()?->delete();
Setting::where('key',$part->area_name . '_' . $part->part.'_desc')->first()?->delete();
}
public static function onMount(Part $part = null)
{

@ -1,5 +1,5 @@
<section id='LoginBigBg' class="content"
style="background-image: url('{{asset('upload/images/'.$data->area->name.'.'.$data->part.'.jpg')}}')">
style="background-image: url('{{asset('upload/images/'.$data->area_name.'.'.$data->part.'.jpg')}}')">
<form @if(!config('app.sms.sign')) action="{{route('client.sign-in-do')}}" @endif id="login-form" method="post">
@csrf
<h3>

@ -12,18 +12,18 @@ class LoginBigBg
{
$setting = new Setting();
$setting->section = 'theme';
$setting->key = $part->area->name . '_' . $part->part.'_jpg';
$setting->key = $part->area_name . '_' . $part->part.'_jpg';
$setting->value = null;
$setting->type = 'FILE';
$setting->size = 12;
$setting->title = $part->area->name . ' ' . $part->part.' background image';
$setting->title = $part->area_name . ' ' . $part->part.' background image';
$setting->save();
File::copy(__DIR__.'/../../default-assets/bg-girl.jpg',public_path('upload/images/').$part->area->name . '.' . $part->part.'.jpg');
File::copy(__DIR__.'/../../default-assets/bg-girl.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();
Setting::where('key',$part->area_name . '_' . $part->part.'_jpg')->first()?->delete();
}
public static function onMount(Part $part = null)

@ -1,7 +1,7 @@
<section id='LoginPatternBg' class="content"
>
<div id="login-container"
style="background-image: url('{{asset('upload/images/'.$data->area->name.'.'.$data->part.'.jpg')}}')">
style="background-image: url('{{asset('upload/images/'.$data->area_name.'.'.$data->part.'.jpg')}}')">
<form @if(!config('app.sms.sign')) action="{{route('client.sign-in-do')}}" @endif id="login-form" method="post">
@csrf
<h3>

@ -13,41 +13,41 @@ class LoginPatternBg
$setting = new Setting();
$setting->section = 'theme';
$setting->key = $part->area->name . '_' . $part->part.'_color1';
$setting->key = $part->area_name . '_' . $part->part.'_color1';
$setting->value = gfx()['primary'];
$setting->type = 'COLOR';
$setting->data = json_encode(['name' => 'login-bg-color-1']);
$setting->size = 6;
$setting->title = $part->area->name . ' ' . $part->part .' second gradiant color 1';
$setting->title = $part->area_name . ' ' . $part->part .' second gradiant color 1';
$setting->save();
$setting = new Setting();
$setting->section = 'theme';
$setting->key = $part->area->name . '_' . $part->part.'_color2';
$setting->key = $part->area_name . '_' . $part->part.'_color2';
$setting->value = gfx()['secondary'];
$setting->data = json_encode(['name' => 'login-bg-color-2']);
$setting->type = 'COLOR';
$setting->size = 6;
$setting->title = $part->area->name . ' ' . $part->part .' second gradiant color 2';
$setting->title = $part->area_name . ' ' . $part->part .' second gradiant color 2';
$setting->save();
$setting = new Setting();
$setting->section = 'theme';
$setting->key = $part->area->name . '_' . $part->part.'_png';
$setting->key = $part->area_name . '_' . $part->part.'_png';
$setting->value = null;
$setting->type = 'FILE';
$setting->size = 12;
$setting->title = $part->area->name . ' ' . $part->part.' background pattern image';
$setting->title = $part->area_name . ' ' . $part->part.' background pattern image';
$setting->save();
File::copy(__DIR__.'/../../default-assets/pattern.png',public_path('upload/images/').$part->area->name . '.' . $part->part.'.jpg');
File::copy(__DIR__.'/../../default-assets/pattern.png',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.'_png')->first()?->delete();
Setting::where('key',$part->area->name . '_' . $part->part.'_color1')->first()?->delete();
Setting::where('key',$part->area->name . '_' . $part->part.'_color2')->first()?->delete();
Setting::where('key',$part->area_name . '_' . $part->part.'_png')->first()?->delete();
Setting::where('key',$part->area_name . '_' . $part->part.'_color1')->first()?->delete();
Setting::where('key',$part->area_name . '_' . $part->part.'_color2')->first()?->delete();
}
public static function onMount(Part $part = null)

@ -7,7 +7,7 @@
</a>
</li>
@foreach(getMenuBySettingItems($data->area->name.'_'.$data->part.'_menu') as $item)
@foreach(getMenuBySettingItems($data->area_name.'_'.$data->part.'_menu') as $item)
<li>
@if($item->meta == null)
<a href="{{$item->webUrl()}}">

@ -13,16 +13,16 @@ class AplMenu
$setting = new Setting();
$setting->section = 'theme';
$setting->key = $part->area->name . '_' . $part->part.'_menu';
$setting->key = $part->area_name . '_' . $part->part.'_menu';
$setting->value = Menu::first()->id;
$setting->type = 'MENU';
$setting->size = 12;
$setting->title = $part->area->name . ' ' . $part->part .' menu';
$setting->title = $part->area_name . ' ' . $part->part .' menu';
$setting->save();
}
public static function onRemove(Part $part = null)
{
Setting::where('key',$part->area->name . '_' . $part->part.'_menu')->first()?->delete();
Setting::where('key',$part->area_name . '_' . $part->part.'_menu')->first()?->delete();
}
public static function onMount(Part $part = null)
{

@ -1,7 +1,7 @@
<nav id='DeebaMenu'>
<div class="{{gfx()['container']}}">
<ul>
@php($items = getMenuBySetting($data->area->name.'_'.$data->part.'_menu')->items)
@php($items = getMenuBySetting($data->area_name.'_'.$data->part.'_menu')->items)
@php($menuShow = false)
@foreach($items as $i => $item)
{{-- find center --}}
@ -28,7 +28,7 @@
</ul>
</div>
<ul id="deeba-sided">
@foreach(getMenuBySetting($data->area->name.'_'.$data->part.'_menu')->items as $item)
@foreach(getMenuBySetting($data->area_name.'_'.$data->part.'_menu')->items as $item)
<li>
<a href="{{$item->webUrl()}}">
{{$item->title}}

@ -12,16 +12,16 @@ class DeebaMenu
{
$setting = new Setting();
$setting->section = 'theme';
$setting->key = $part->area->name . '_' . $part->part.'_menu';
$setting->key = $part->area_name . '_' . $part->part.'_menu';
$setting->value = Menu::first()->id;
$setting->type = 'MENU';
$setting->size = 12;
$setting->title = $part->area->name . ' ' . $part->part .' menu';
$setting->title = $part->area_name . ' ' . $part->part .' menu';
$setting->save();
}
public static function onRemove(Part $part = null)
{
Setting::where('key',$part->area->name . '_' . $part->part.'_menu')->first()?->delete();
Setting::where('key',$part->area_name . '_' . $part->part.'_menu')->first()?->delete();
}
public static function onMount(Part $part = null)

@ -5,7 +5,7 @@
<i class="ri-menu-line"></i>
</a>
</li>
@foreach(getMenuBySettingItems($data->area->name.'_'.$data->part.'_menu') as $item)
@foreach(getMenuBySettingItems($data->area_name.'_'.$data->part.'_menu') as $item)
<li>
<a href="{{$item->webUrl()}}">
{{$item->title}}

@ -13,16 +13,16 @@ class RecetMenu
$setting = new Setting();
$setting->section = 'theme';
$setting->key = $part->area->name . '_' . $part->part.'_menu';
$setting->key = $part->area_name . '_' . $part->part.'_menu';
$setting->value = Menu::first()->id;
$setting->type = 'MENU';
$setting->size = 12;
$setting->title = $part->area->name . ' ' . $part->part .' menu';
$setting->title = $part->area_name . ' ' . $part->part .' menu';
$setting->save();
}
public static function onRemove(Part $part = null)
{
Setting::where('key',$part->area->name . '_' . $part->part.'_menu')->first()?->delete();
Setting::where('key',$part->area_name . '_' . $part->part.'_menu')->first()?->delete();
}
public static function onMount(Part $part = null)
{

@ -9,7 +9,7 @@
<i class="ri-menu-line"></i>
</div>
<ul>
@foreach(getMenuBySetting($data->area->name.'_'.$data->part.'_menu')->items as $item)
@foreach(getMenuBySetting($data->area_name.'_'.$data->part.'_menu')->items as $item)
<li>
@if($item->meta == null)
<a href="{{$item->dest->webUrl()}}">
@ -24,6 +24,6 @@
@endforeach
</ul>
<div class="p-2" id="side-menu-content">
{!! getSetting($data->area->name.'_'.$data->part.'_text') !!}
{!! getSetting($data->area_name.'_'.$data->part.'_text') !!}
</div>
</nav>

@ -13,38 +13,38 @@ class SideMenu
$setting = new Setting();
$setting->section = 'theme';
$setting->key = $part->area->name . '_' . $part->part.'_menu';
$setting->key = $part->area_name . '_' . $part->part.'_menu';
$setting->value = Menu::first()->id;
$setting->type = 'MENU';
$setting->size = 12;
$setting->title = $part->area->name . ' ' . $part->part .' menu';
$setting->title = $part->area_name . ' ' . $part->part .' menu';
$setting->save();
$setting = new Setting();
$setting->section = 'theme';
$setting->key = $part->area->name . '_' . $part->part.'_text';
$setting->key = $part->area_name . '_' . $part->part.'_text';
$setting->value = 'lorem ipsum';
$setting->type = 'EDITOR';
$setting->size = 12;
$setting->title = $part->area->name . ' ' . $part->part .' text';
$setting->title = $part->area_name . ' ' . $part->part .' text';
$setting->save();
$setting = new Setting();
$setting->section = 'theme';
$setting->key = $part->area->name . '_' . $part->part.'_bg';
$setting->key = $part->area_name . '_' . $part->part.'_bg';
$setting->value = '#ececec';
$setting->type = 'COLOR';
$setting->size = 3;
$setting->data = json_encode(['name' => 'side-menu-bg-color']);
$setting->title = $part->area->name . ' ' . $part->part .' background';
$setting->title = $part->area_name . ' ' . $part->part .' background';
$setting->save();
}
public static function onRemove(Part $part = null)
{
Setting::where('key',$part->area->name . '_' . $part->part.'_menu')->first()?->delete();
Setting::where('key',$part->area->name . '_' . $part->part.'_text')->first()?->delete();
Setting::where('key',$part->area->name . '_' . $part->part.'_bg')->first()?->delete();
Setting::where('key',$part->area_name . '_' . $part->part.'_menu')->first()?->delete();
Setting::where('key',$part->area_name . '_' . $part->part.'_text')->first()?->delete();
Setting::where('key',$part->area_name . '_' . $part->part.'_bg')->first()?->delete();
}
public static function onMount(Part $part = null)
{

@ -1,10 +1,10 @@
<section class='ParallaxShort' style="background-image: url('{{asset('upload/images/'.$data->area->name.'.'.$data->part.'.jpg')}}')">
<section class='ParallaxShort' style="background-image: url('{{asset('upload/images/'.$data->area_name.'.'.$data->part.'.jpg')}}')">
<div class="{{gfx()['container']}} pt-5">
<h1 class="pt-5">
{{getSetting($data->area->name.'_'.$data->part.'_title')}}
{{getSetting($data->area_name.'_'.$data->part.'_title')}}
</h1>
<h2>
{{getSetting($data->area->name.'_'.$data->part.'_subtitle')}}
{{getSetting($data->area_name.'_'.$data->part.'_subtitle')}}
</h2>
</div>
</section>

@ -13,39 +13,39 @@ class ParallaxShort
$setting = new Setting();
$setting->section = 'theme';
$setting->key = $part->area->name . '_' . $part->part.'_jpg';
$setting->key = $part->area_name . '_' . $part->part.'_jpg';
$setting->value = null;
$setting->type = 'FILE';
$setting->size = 6;
$setting->title = $part->area->name . ' ' . $part->part.' Image';
$setting->title = $part->area_name . ' ' . $part->part.' 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');
$setting = new Setting();
$setting->section = 'theme';
$setting->key = $part->area->name . '_' . $part->part.'_title';
$setting->key = $part->area_name . '_' . $part->part.'_title';
$setting->value = 'Title of the parallax';
$setting->type = 'TEXT';
$setting->size = 6;
$setting->title = $part->area->name . ' ' . $part->part .' title';
$setting->title = $part->area_name . ' ' . $part->part .' title';
$setting->save();
$setting = new Setting();
$setting->section = 'theme';
$setting->key = $part->area->name . '_' . $part->part.'_subtitle';
$setting->key = $part->area_name . '_' . $part->part.'_subtitle';
$setting->value = 'Lorem ipsum dolor sit amet, consectetur adipisicing elit. Corporis dolor enim reprehenderit.';
$setting->type = 'TEXT';
$setting->size = 12;
$setting->title = $part->area->name . ' ' . $part->part .' subtitle';
$setting->title = $part->area_name . ' ' . $part->part .' subtitle';
$setting->save();
}
public static function onRemove(Part $part = null)
{
Setting::where('key',$part->area->name . '_' . $part->part.'_jpg')->first()?->delete();
Setting::where('key',$part->area->name . '_' . $part->part.'_title')->first()?->delete();
Setting::where('key',$part->area->name . '_' . $part->part.'_subtitle')->first()?->delete();
File::delete(public_path('upload/images/').$part->area->name . '.' . $part->part.'.jpg');
Setting::where('key',$part->area_name . '_' . $part->part.'_jpg')->first()?->delete();
Setting::where('key',$part->area_name . '_' . $part->part.'_title')->first()?->delete();
Setting::where('key',$part->area_name . '_' . $part->part.'_subtitle')->first()?->delete();
File::delete(public_path('upload/images/').$part->area_name . '.' . $part->part.'.jpg');
}
public static function onMount(Part $part = null)
{

@ -1,7 +1,7 @@
<section class='PostSidebar content'>
<div class="{{gfx()['container']}}">
<dov class="row">
@if(!getSetting($data->area->name.'_'.$data->part.'_invert'))
@if(!getSetting($data->area_name.'_'.$data->part.'_invert'))
<div class="col-lg-3 p-0">
@include('segments.post.PostSidebar.inc.sidebar')
</div>
@ -69,7 +69,7 @@
</div>
</div>
@if(getSetting($data->area->name.'_'.$data->part.'_invert'))
@if(getSetting($data->area_name.'_'.$data->part.'_invert'))
<div class="col-lg-3 p-0">
@include('segments.post.PostSidebar.inc.sidebar')
</div>

@ -11,17 +11,17 @@ class PostSidebar
{
$setting = new Setting();
$setting->section = 'theme';
$setting->key = $part->area->name . '_' . $part->part.'_invert';
$setting->key = $part->area_name . '_' . $part->part.'_invert';
$setting->value = 0;
$setting->size = 12;
$setting->type = 'CHECKBOX';
// $setting->data = json_encode(['xmin' => 2, 'xmax' => 90]);
$setting->title = $part->area->name . ' ' . $part->part. ' invert sidebar position';
$setting->title = $part->area_name . ' ' . $part->part. ' invert sidebar position';
$setting->save();
}
public static function onRemove(Part $part = null)
{
Setting::where('key',$part->area->name . '_' . $part->part.'_invert')->first()?->delete();
Setting::where('key',$part->area_name . '_' . $part->part.'_invert')->first()?->delete();
}
public static function onMount(Part $part = null)
{

@ -1,15 +1,15 @@
<section class='LongHeightPosts'
style="background-image: url('{{asset('upload/images/'.$data->area->name.'.'.$data->part.'.jpg')}}')">
style="background-image: url('{{asset('upload/images/'.$data->area_name.'.'.$data->part.'.jpg')}}')">
<div class="{{gfx()['container']}}">
<h1>
<a href="{{getGroupBySetting($data->area->name.'_'.$data->part.'_group')->webUrl()}}">
{{getGroupBySetting($data->area->name.'_'.$data->part.'_group')->name}}
<a href="{{getGroupBySetting($data->area_name.'_'.$data->part.'_group')->webUrl()}}">
{{getGroupBySetting($data->area_name.'_'.$data->part.'_group')->name}}
</a>
</h1>
<div class="row">
@foreach( getGroupPostsBySetting($data->area->name.'_'.$data->part.'_group',4) as $post )
@foreach( getGroupPostsBySetting($data->area_name.'_'.$data->part.'_group',4) as $post )
<div class="col-lg-3 col-md-6">
<div class="post-height-img-item" style="background-image: url('{{$post->imgUrl()}}')">
<a class="post-height-img-detail" href="{{$post->webUrl()}}">
@ -30,9 +30,9 @@
<h3>
<a href="" class="btn btn-outline-primary float-end">
{{getSetting($data->area->name.'_'.$data->part.'_btn')}}
{{getSetting($data->area_name.'_'.$data->part.'_btn')}}
</a>
{{getGroupBySetting($data->area->name.'_'.$data->part.'_group')->subtitle}}
{{getGroupBySetting($data->area_name.'_'.$data->part.'_group')->subtitle}}
</h3>
</div>
</section>

@ -13,41 +13,41 @@ class LongHeightPosts
{
$setting = new Setting();
$setting->section = 'theme';
$setting->key = $part->area->name . '_' . $part->part.'_group';
$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->title = $part->area_name . ' ' . $part->part. ' group';
$setting->save();
$setting = new Setting();
$setting->section = 'theme';
$setting->key = $part->area->name . '_' . $part->part.'_btn';
$setting->key = $part->area_name . '_' . $part->part.'_btn';
$setting->value = __("Find more");
$setting->size = 6;
$setting->type = 'TEXT';
// $setting->data = json_encode(['xmin' => 2, 'xmax' => 90]);
$setting->title = $part->area->name . ' ' . $part->part. ' button text';
$setting->title = $part->area_name . ' ' . $part->part. ' button text';
$setting->save();
$setting = new Setting();
$setting->section = 'theme';
$setting->key = $part->area->name . '_' . $part->part.'_jpg';
$setting->key = $part->area_name . '_' . $part->part.'_jpg';
$setting->value = null;
$setting->type = 'FILE';
$setting->size = 12;
$setting->title = $part->area->name . ' ' . $part->part.' Image';
$setting->title = $part->area_name . ' ' . $part->part.' Image';
$setting->save();
File::copy(__DIR__.'/../../default-assets/bg-girl.jpg',public_path('upload/images/').$part->area->name . '.' . $part->part.'.jpg');
File::copy(__DIR__.'/../../default-assets/bg-girl.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.'_group')->first()?->delete();
Setting::where('key',$part->area->name . '_' . $part->part.'_btn')->first()?->delete();
Setting::where('key',$part->area->name . '_' . $part->part.'_jpg')->first()?->delete();
Setting::where('key',$part->area_name . '_' . $part->part.'_group')->first()?->delete();
Setting::where('key',$part->area_name . '_' . $part->part.'_btn')->first()?->delete();
Setting::where('key',$part->area_name . '_' . $part->part.'_jpg')->first()?->delete();
}
public static function onMount(Part $part = null)
{

@ -1,8 +1,8 @@
<section class='NoLinkImage @if(getSetting($data->area->name.'_'.$data->part.'_dark')) dark-mode @endif'>
<section class='NoLinkImage @if(getSetting($data->area_name.'_'.$data->part.'_dark')) dark-mode @endif'>
<div class="{{gfx()['container']}}">
<div class="row">
@foreach( getGroupPostsBySetting($data->area->name.'_'.$data->part.'_group',5) as $post )
@foreach( getGroupPostsBySetting($data->area_name.'_'.$data->part.'_group',5) as $post )
<div class="col-lg-3 col-md-6">
<div class=" no-link-item mb-4">

@ -13,29 +13,29 @@ class NoLinkImage
$setting = new Setting();
$setting->section = 'theme';
$setting->key = $part->area->name . '_' . $part->part.'_group';
$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->title = $part->area_name . ' ' . $part->part. ' group';
$setting->save();
$setting = new Setting();
$setting->section = 'theme';
$setting->key = $part->area->name . '_' . $part->part.'_dark';
$setting->key = $part->area_name . '_' . $part->part.'_dark';
$setting->value = 0;
$setting->size = 6;
$setting->type = 'CHECKBOX';
// $setting->data = json_encode(['xmin' => 2, 'xmax' => 90]);
$setting->title = $part->area->name . ' ' . $part->part. ' dark mode';
$setting->title = $part->area_name . ' ' . $part->part. ' dark mode';
$setting->save();
}
public static function onRemove(Part $part = null)
{
Setting::where('key',$part->area->name . '_' . $part->part.'_group')->first()?->delete();
Setting::where('key',$part->area->name . '_' . $part->part.'_dark')->first()?->delete();
Setting::where('key',$part->area_name . '_' . $part->part.'_group')->first()?->delete();
Setting::where('key',$part->area_name . '_' . $part->part.'_dark')->first()?->delete();
}
public static function onMount(Part $part = null)
{

@ -1,15 +1,15 @@
<section class='PostIndexImage'>
<div class="{{gfx()['container']}}">
<h1>
<a href="{{getGroupBySetting($data->area->name.'_'.$data->part.'_group')?->webUrl()}}">
{{getGroupBySetting($data->area->name.'_'.$data->part.'_group')?->name}}
<a href="{{getGroupBySetting($data->area_name.'_'.$data->part.'_group')?->webUrl()}}">
{{getGroupBySetting($data->area_name.'_'.$data->part.'_group')?->name}}
</a>
</h1>
<p class="text-muted">
{{getGroupBySetting($data->area->name.'_'.$data->part.'_group')?->description}}
{{getGroupBySetting($data->area_name.'_'.$data->part.'_group')?->description}}
</p>
<div class="row">
@foreach( getGroupPostsBySetting($data->area->name.'_'.$data->part.'_group',4) as $post )
@foreach( getGroupPostsBySetting($data->area_name.'_'.$data->part.'_group',4) as $post )
<div class="col-lg-3 col-md-6">
<div class="post-img-index">
<img src="{{$post->imgUrl()}}" alt="{{$post->title}}" class="img-fluid">
@ -28,8 +28,8 @@
@endforeach
</div>
<div class="py-5 text-center">
<a href="{{getGroupBySetting($data->area->name.'_'.$data->part.'_group')?->webUrl()}}" class="btn btn-outline-primary">
{{getSetting($data->area->name.'_'.$data->part.'_btn')}}
<a href="{{getGroupBySetting($data->area_name.'_'.$data->part.'_group')?->webUrl()}}" class="btn btn-outline-primary">
{{getSetting($data->area_name.'_'.$data->part.'_btn')}}
</a>
</div>
</div>

@ -13,28 +13,28 @@ class PostIndexImage
$setting = new Setting();
$setting->section = 'theme';
$setting->key = $part->area->name . '_' . $part->part.'_group';
$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->title = $part->area_name . ' ' . $part->part. ' group';
$setting->save();
$setting = new Setting();
$setting->section = 'theme';
$setting->key = $part->area->name . '_' . $part->part.'_btn';
$setting->key = $part->area_name . '_' . $part->part.'_btn';
$setting->value = __("Find more");
$setting->size = 6;
$setting->type = 'TEXT';
// $setting->data = json_encode(['xmin' => 2, 'xmax' => 90]);
$setting->title = $part->area->name . ' ' . $part->part. ' button text';
$setting->title = $part->area_name . ' ' . $part->part. ' button text';
$setting->save();
}
public static function onRemove(Part $part = null)
{
Setting::where('key',$part->area->name . '_' . $part->part.'_group')->first()?->delete();
Setting::where('key',$part->area->name . '_' . $part->part.'_btn')->first()?->delete();
Setting::where('key',$part->area_name . '_' . $part->part.'_group')->first()?->delete();
Setting::where('key',$part->area_name . '_' . $part->part.'_btn')->first()?->delete();
}
public static function onMount(Part $part = null)
{

@ -1,15 +1,15 @@
<section class='PostsIconSimple py-4'>
<div class="{{gfx()['container']}}">
<h1>
<a href="{{getGroupBySetting($data->area->name.'_'.$data->part)?->webUrl()}}">
{{getGroupBySetting($data->area->name.'_'.$data->part)?->name}}
<a href="{{getGroupBySetting($data->area_name.'_'.$data->part)?->webUrl()}}">
{{getGroupBySetting($data->area_name.'_'.$data->part)?->name}}
</a>
</h1>
<p>
{{getGroupBySetting($data->area->name.'_'.$data->part)?->description}}
{{getGroupBySetting($data->area_name.'_'.$data->part)?->description}}
</p>
<div class="row">
@foreach(getGroupPostsBySetting($data->area->name.'_'.$data->part, getSetting($data->area->name.'_'.$data->part.'_limit')) as $post)
@foreach(getGroupPostsBySetting($data->area_name.'_'.$data->part, getSetting($data->area_name.'_'.$data->part.'_limit')) as $post)
<div class="col-md-4">
<i class="{{$post->icon}}"></i>
<h3>

@ -13,30 +13,30 @@ class PostsIconSimple
$setting = new Setting();
$setting->section = 'theme';
$setting->key = $part->area->name . '_' . $part->part;
$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->title = $part->area_name . ' ' . $part->part;
$setting->save();
$setting = new Setting();
$setting->section = 'theme';
$setting->key = $part->area->name . '_' . $part->part.'_limit';
$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->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);
// \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();
// 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)

@ -1,7 +1,7 @@
<section class='PostsSlider'>
<div class="{{gfx()['container']}}">
<h1>
{{getSetting($data->area->name.'_'.$data->part.'_title')}}
{{getSetting($data->area_name.'_'.$data->part.'_title')}}
</h1>
</div>
@ -9,7 +9,7 @@
<div id="posts-slider">
@foreach( getGroupPostsBySetting($data->area->name.'_'.$data->part.'_group',10) as $post )
@foreach( getGroupPostsBySetting($data->area_name.'_'.$data->part.'_group',10) as $post )
<div class="item slider-content">
<div class="post-slider">

@ -12,41 +12,41 @@ class PostsSlider
{
$setting = new Setting();
$setting->section = 'theme';
$setting->key = $part->area->name . '_' . $part->part.'_title';
$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->title = $part->area_name . ' ' . $part->part .' title';
$setting->save();
$setting = new Setting();
$setting->section = 'theme';
$setting->key = $part->area->name . '_' . $part->part.'_group';
$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->title = $part->area_name . ' ' . $part->part. ' group';
$setting->save();
$setting = new Setting();
$setting->section = 'theme';
$setting->key = $part->area->name . '_' . $part->part.'_color';
$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->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();
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)
{

@ -27,7 +27,7 @@
<hr>
@endif
<div class="row">
@if(!getSetting($data->area->name.'_'.$data->part.'_invert'))
@if(!getSetting($data->area_name.'_'.$data->part.'_invert'))
<div class="col-lg-3 p-0">
@include('segments.posts_page.GridPostListSidebar.inc.sidebar')
</div>
@ -67,7 +67,7 @@
</div>
{{$posts->links()}}
</div>
@if(getSetting($data->area->name.'_'.$data->part.'_invert'))
@if(getSetting($data->area_name.'_'.$data->part.'_invert'))
<div class="col-lg-3 p-0">
@include('segments.posts_page.GridPostListSidebar.inc.sidebar')
</div>

@ -11,17 +11,17 @@ class GridPostListSidebar
{
$setting = new Setting();
$setting->section = 'theme';
$setting->key = $part->area->name . '_' . $part->part.'_invert';
$setting->key = $part->area_name . '_' . $part->part.'_invert';
$setting->value = 0;
$setting->size = 12;
$setting->type = 'CHECKBOX';
// $setting->data = json_encode(['xmin' => 2, 'xmax' => 90]);
$setting->title = $part->area->name . ' ' . $part->part. ' invert sidebar position';
$setting->title = $part->area_name . ' ' . $part->part. ' invert sidebar position';
$setting->save();
}
public static function onRemove(Part $part = null)
{
Setting::where('key',$part->area->name . '_' . $part->part.'_invert')->first()?->delete();
Setting::where('key',$part->area_name . '_' . $part->part.'_invert')->first()?->delete();
}
public static function onMount(Part $part = null)
{

@ -27,7 +27,7 @@
</div>
<hr>
<div class="row">
@if(!getSetting($data->area->name.'_'.$data->part.'_invert'))
@if(!getSetting($data->area_name.'_'.$data->part.'_invert'))
<div class="col-lg-3 p-0">
@include('segments.posts_page.SimplePostListSideBar.inc.sidebar')
</div>
@ -53,7 +53,7 @@
@endforeach
{{$posts->links()}}
</div>
@if(getSetting($data->area->name.'_'.$data->part.'_invert'))
@if(getSetting($data->area_name.'_'.$data->part.'_invert'))
<div class="col-lg-3 p-0">
@include('segments.posts_page.SimplePostListSideBar.inc.sidebar')
</div>

@ -11,17 +11,17 @@ class SimplePostListSideBar
{
$setting = new Setting();
$setting->section = 'theme';
$setting->key = $part->area->name . '_' . $part->part.'_invert';
$setting->key = $part->area_name . '_' . $part->part.'_invert';
$setting->value = 0;
$setting->size = 12;
$setting->type = 'CHECKBOX';
// $setting->data = json_encode(['xmin' => 2, 'xmax' => 90]);
$setting->title = $part->area->name . ' ' . $part->part. ' invert sidebar position';
$setting->title = $part->area_name . ' ' . $part->part. ' invert sidebar position';
$setting->save();
}
public static function onRemove(Part $part = null)
{
Setting::where('key',$part->area->name . '_' . $part->part.'_invert')->first()?->delete();
Setting::where('key',$part->area_name . '_' . $part->part.'_invert')->first()?->delete();
}
public static function onMount(Part $part = null)
{

@ -11,17 +11,17 @@ class ProductKaren
{
$setting = new Setting();
$setting->section = 'theme';
$setting->key = $part->area->name . '_' . $part->part.'_bg';
$setting->key = $part->area_name . '_' . $part->part.'_bg';
$setting->value = '#ffffff';
$setting->type = 'COLOR';
$setting->data = json_encode(['name' => 'karen-tab-bg-color']);
$setting->size = 12;
$setting->title = $part->area->name . ' ' . $part->part .' tab background color';
$setting->title = $part->area_name . ' ' . $part->part .' tab background color';
$setting->save();
}
public static function onRemove(Part $part = null)
{
Setting::where('key',$part->area->name . '_' . $part->part.'_bg')->first()?->delete();
Setting::where('key',$part->area_name . '_' . $part->part.'_bg')->first()?->delete();
}
public static function onMount(Part $part = null)
{

@ -5,12 +5,12 @@
<div class="tree-grid-item">
<div>
<h1>
{{getSetting($data->area->name.'_'.$data->part.'_title')}}
{{getSetting($data->area_name.'_'.$data->part.'_title')}}
</h1>
<div class="w100 overflow-hidden">
<div class="section-main">
@foreach(getCategoryProductBySetting($part->area->name . '_' . $part->part.'_category') as $product)
@foreach(getCategoryProductBySetting($part->area_name . '_' . $part->part.'_category') as $product)
<div class="item slider-content">
<div class="tree-product-box">
<a href="{{$product->webUrl()}}">
@ -41,11 +41,11 @@
</div>
<div class="tree-grid-item">
<span class="badge bg-secondary discount">
{{getSetting($data->area->name.'_'.$data->part.'_badgex')}}
{{getSetting($data->area_name.'_'.$data->part.'_badgex')}}
</span>
<div class="section-second">
@foreach(getCategoryProductBySetting($part->area->name . '_' . $part->part.'_categoryx') as $product)
@foreach(getCategoryProductBySetting($part->area_name . '_' . $part->part.'_categoryx') as $product)
<div class="item text-center slider-content">
<a href="{{$product->webUrl()}}">
<img src="{{$product->imgUrl()}}" class="img-fluid" alt="{{$product->name}}">
@ -56,11 +56,11 @@
</div>
<div class="tree-grid-item">
<span class="badge bg-secondary discount">
{{getSetting($data->area->name.'_'.$data->part.'_badgey')}}
{{getSetting($data->area_name.'_'.$data->part.'_badgey')}}
</span>
<div class="section-third">
@foreach(getCategoryProductBySetting($part->area->name . '_' . $part->part.'_categoryy') as $product)
@foreach(getCategoryProductBySetting($part->area_name . '_' . $part->part.'_categoryy') as $product)
<div class="item text-center slider-content">
<a href="{{$product->webUrl()}}">
<img src="{{$product->imgUrl()}}" class="img-fluid" alt="{{$product->name}}">

@ -13,122 +13,122 @@ class TreeGridProducts
$setting = new Setting();
$setting->section = 'theme';
$setting->key = $part->area->name . '_' . $part->part.'_title';
$setting->key = $part->area_name . '_' . $part->part.'_title';
$setting->value = 'Favorite products';
$setting->type = 'TEXT';
$setting->size = 4;
$setting->title = $part->area->name . ' ' . $part->part .' main title';
$setting->title = $part->area_name . ' ' . $part->part .' main title';
$setting->save();
$setting = new Setting();
$setting->section = 'theme';
$setting->key = $part->area->name . '_' . $part->part.'_color';
$setting->key = $part->area_name . '_' . $part->part.'_color';
$setting->value = '#273763';
$setting->type = 'COLOR';
$setting->data = json_encode(['name' => 'three-main-bg-color']);
$setting->size = 4;
$setting->title = $part->area->name . ' ' . $part->part .' main color';
$setting->title = $part->area_name . ' ' . $part->part .' main color';
$setting->save();
$setting = new Setting();
$setting->section = 'theme';
$setting->key = $part->area->name . '_' . $part->part.'_category';
$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 .' main category';
$setting->title = $part->area_name . ' ' . $part->part .' main category';
$setting->save();
$setting = new Setting();
$setting->section = 'theme';
$setting->key = $part->area->name . '_' . $part->part.'_badgex';
$setting->key = $part->area_name . '_' . $part->part.'_badgex';
$setting->value = '22%';
$setting->type = 'TEXT';
$setting->size = 3;
$setting->title = $part->area->name . ' ' . $part->part .' Second badge text';
$setting->title = $part->area_name . ' ' . $part->part .' Second badge text';
$setting->save();
$setting = new Setting();
$setting->section = 'theme';
$setting->key = $part->area->name . '_' . $part->part.'_gradx1';
$setting->key = $part->area_name . '_' . $part->part.'_gradx1';
$setting->value = '#FF7D33';
$setting->type = 'COLOR';
$setting->data = json_encode(['name' => 'three-main-bg-gx1']);
$setting->size = 3;
$setting->title = $part->area->name . ' ' . $part->part .' second gradiant color 1';
$setting->title = $part->area_name . ' ' . $part->part .' second gradiant color 1';
$setting->save();
$setting = new Setting();
$setting->section = 'theme';
$setting->key = $part->area->name . '_' . $part->part.'_gradx2';
$setting->key = $part->area_name . '_' . $part->part.'_gradx2';
$setting->value = '#FF971D';
$setting->data = json_encode(['name' => 'three-main-bg-gx2']);
$setting->type = 'COLOR';
$setting->size = 3;
$setting->title = $part->area->name . ' ' . $part->part .' second gradiant color 2';
$setting->title = $part->area_name . ' ' . $part->part .' second gradiant color 2';
$setting->save();
$setting = new Setting();
$setting->section = 'theme';
$setting->key = $part->area->name . '_' . $part->part.'_categoryx';
$setting->key = $part->area_name . '_' . $part->part.'_categoryx';
$setting->value = Category::first()->id;
$setting->type = 'CATEGORY';
$setting->size = 3;
$setting->title = $part->area->name . ' ' . $part->part .' second category';
$setting->title = $part->area_name . ' ' . $part->part .' second category';
$setting->save();
$setting = new Setting();
$setting->section = 'theme';
$setting->key = $part->area->name . '_' . $part->part.'_badgey';
$setting->key = $part->area_name . '_' . $part->part.'_badgey';
$setting->value = 'Sale';
$setting->type = 'TEXT';
$setting->size = 3;
$setting->title = $part->area->name . ' ' . $part->part .' third badge text';
$setting->title = $part->area_name . ' ' . $part->part .' third badge text';
$setting->save();
$setting = new Setting();
$setting->section = 'theme';
$setting->key = $part->area->name . '_' . $part->part.'_grady1';
$setting->key = $part->area_name . '_' . $part->part.'_grady1';
$setting->value = '#3368ff';
$setting->type = 'COLOR';
$setting->data = json_encode(['name' => 'three-main-bg-gy1']);
$setting->size = 3;
$setting->title = $part->area->name . ' ' . $part->part .' third gradiant color 1';
$setting->title = $part->area_name . ' ' . $part->part .' third gradiant color 1';
$setting->save();
$setting = new Setting();
$setting->section = 'theme';
$setting->key = $part->area->name . '_' . $part->part.'_grady2';
$setting->key = $part->area_name . '_' . $part->part.'_grady2';
$setting->value = '#430392';
$setting->type = 'COLOR';
$setting->data = json_encode(['name' => 'three-main-bg-gy2']);
$setting->size = 3;
$setting->title = $part->area->name . ' ' . $part->part .' third gradiant color 2';
$setting->title = $part->area_name . ' ' . $part->part .' third gradiant color 2';
$setting->save();
$setting = new Setting();
$setting->section = 'theme';
$setting->key = $part->area->name . '_' . $part->part.'_categoryy';
$setting->key = $part->area_name . '_' . $part->part.'_categoryy';
$setting->value = Category::first()->id;
$setting->type = 'CATEGORY';
$setting->size = 3;
$setting->title = $part->area->name . ' ' . $part->part .' third category';
$setting->title = $part->area_name . ' ' . $part->part .' third 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.'_category')->first()?->delete();
Setting::where('key',$part->area->name . '_' . $part->part.'_color')->first()?->delete();
Setting::where('key',$part->area->name . '_' . $part->part.'_badgex')->first()?->delete();
Setting::where('key',$part->area->name . '_' . $part->part.'_gradx1')->first()?->delete();
Setting::where('key',$part->area->name . '_' . $part->part.'_gradx2')->first()?->delete();
Setting::where('key',$part->area->name . '_' . $part->part.'_categoryx')->first()?->delete();
Setting::where('key',$part->area->name . '_' . $part->part.'_badgey')->first()?->delete();
Setting::where('key',$part->area->name . '_' . $part->part.'_grady1')->first()?->delete();
Setting::where('key',$part->area->name . '_' . $part->part.'_grady2')->first()?->delete();
Setting::where('key',$part->area->name . '_' . $part->part.'_categoryy')->first()?->delete();
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')->first()?->delete();
Setting::where('key',$part->area_name . '_' . $part->part.'_badgex')->first()?->delete();
Setting::where('key',$part->area_name . '_' . $part->part.'_gradx1')->first()?->delete();
Setting::where('key',$part->area_name . '_' . $part->part.'_gradx2')->first()?->delete();
Setting::where('key',$part->area_name . '_' . $part->part.'_categoryx')->first()?->delete();
Setting::where('key',$part->area_name . '_' . $part->part.'_badgey')->first()?->delete();
Setting::where('key',$part->area_name . '_' . $part->part.'_grady1')->first()?->delete();
Setting::where('key',$part->area_name . '_' . $part->part.'_grady2')->first()?->delete();
Setting::where('key',$part->area_name . '_' . $part->part.'_categoryy')->first()?->delete();
}
public static function onMount(Part $part = null)
{

@ -4,7 +4,7 @@
{{$title}}
</h1>
<div class="row">
@if(!getSetting($data->area->name.'_'.$data->part.'_invert'))
@if(!getSetting($data->area_name.'_'.$data->part.'_invert'))
<div class="col-lg-3 p-lg-1 pt-lg-0">
@include('segments.products_page.ProductGridSidebar.inc.product-sidebar')
</div>
@ -56,7 +56,7 @@
{{$products->withQueryString()->links()}}
</div>
@if(getSetting($data->area->name.'_'.$data->part.'_invert'))
@if(getSetting($data->area_name.'_'.$data->part.'_invert'))
<div class="col-lg-3">
@include('segments.products_page.ProductGridSidebar.inc.product-sidebar')
</div>

@ -11,17 +11,17 @@ class ProductGridSidebar
{
$setting = new Setting();
$setting->section = 'theme';
$setting->key = $part->area->name . '_' . $part->part.'_invert';
$setting->key = $part->area_name . '_' . $part->part.'_invert';
$setting->value = 0;
$setting->size = 12;
$setting->type = 'CHECKBOX';
// $setting->data = json_encode(['xmin' => 2, 'xmax' => 90]);
$setting->title = $part->area->name . ' ' . $part->part. ' invert sidebar position';
$setting->title = $part->area_name . ' ' . $part->part. ' invert sidebar position';
$setting->save();
}
public static function onRemove(Part $part = null)
{
Setting::where('key',$part->area->name . '_' . $part->part.'_invert')->first()?->delete();
Setting::where('key',$part->area_name . '_' . $part->part.'_invert')->first()?->delete();
}
public static function onMount(Part $part = null)

@ -9,15 +9,15 @@ class ParallaxSlider
{
public static function onAdd(Part $part = null)
{
Slider::addData($part->area->name . '_' . $part->part . '_btn','View offer');
Slider::addData($part->area->name . '_' . $part->part . '_link','/');
Slider::addData($part->area->name . '_' . $part->part . '_subtitle','Lorem ipsum dolor sit amet, consectetur adipisicing elit. A adipisci aliquid aspernatur, commodi corporis cupiditate');
Slider::addData($part->area_name . '_' . $part->part . '_btn','View offer');
Slider::addData($part->area_name . '_' . $part->part . '_link','/');
Slider::addData($part->area_name . '_' . $part->part . '_subtitle','Lorem ipsum dolor sit amet, consectetur adipisicing elit. A adipisci aliquid aspernatur, commodi corporis cupiditate');
}
public static function onRemove(Part $part = null)
{
Slider::remData($part->area->name . '_' . $part->part . '_btn');
Slider::remData($part->area->name . '_' . $part->part . '_link');
Slider::remData($part->area->name . '_' . $part->part . '_subtitle');
Slider::remData($part->area_name . '_' . $part->part . '_btn');
Slider::remData($part->area_name . '_' . $part->part . '_link');
Slider::remData($part->area_name . '_' . $part->part . '_subtitle');
}
public static function onMount(Part $part = null)
{

@ -352,10 +352,12 @@ Route::prefix(config('app.panel.prefix'))->name('admin.')->group(
Route::prefix('area')->name('area.')->group(
function () {
Route::get('index', [\App\Http\Controllers\Admin\AreaController::class, "index"])->name('index');
Route::get('design/{area}', [\App\Http\Controllers\Admin\AreaController::class, "desgin"])->name('design');
Route::get('design/{area}', [\App\Http\Controllers\Admin\AreaController::class, "design"])->name('design');
Route::get('design/model/{area}/{model}/{id}', [\App\Http\Controllers\Admin\AreaController::class, "designModel"])->name('design.model');
Route::get('image/{segment}/{part}', [\App\Http\Controllers\Admin\AreaController::class, "image"])->name('image');
// Route::post('store', [\App\Http\Controllers\Admin\SettingController::class, "store"])->name('store');
Route::post('update/{area}', [\App\Http\Controllers\Admin\AreaController::class, "update"])->name('update');
Route::post('update/model/{model}/{id}', [\App\Http\Controllers\Admin\AreaController::class, "updateModel"])->name('update.model');
Route::get('sort/{area}', [\App\Http\Controllers\Admin\AreaController::class, "sort"])->name('sort');
Route::post('sort-save/{area}', [\App\Http\Controllers\Admin\AreaController::class, "sortSave"])->name('sort-save');
}

Loading…
Cancel
Save