added live edit setting

master
A1Gard 3 weeks ago
parent 600273e0f6
commit 1d300cd039

@ -99,6 +99,10 @@ class SettingController extends Controller
} }
} }
} }
if ($request->has('build')){
Artisan::call('build');
}
logAdmin(__METHOD__,__CLASS__,null); logAdmin(__METHOD__,__CLASS__,null);
return redirect()->back()->with(['message' => __('Setting of website updated')]); return redirect()->back()->with(['message' => __('Setting of website updated')]);
} }
@ -121,4 +125,14 @@ class SettingController extends Controller
Artisan::call('route:clear'); Artisan::call('route:clear');
return redirect()->back()->with(['message' => __('Cache cleared')]); return redirect()->back()->with(['message' => __('Cache cleared')]);
} }
public function liveEdit($slug){
$settings = Setting::where('active', true)->where('key','LIKE',$slug.'%')
->orderBy('section')->get();
$cats = Category::all(['id','name']);
$menus = Menu::all(['id','name']);
$groups = Group::all(['id','name']);
return view('admin.commons.live',
compact('settings', 'cats','groups','menus'));
}
} }

@ -0,0 +1,48 @@
var onEdit = '';
document.querySelector('#do-edit')?.addEventListener('click', function () {
this.style.display = 'none';
let editable = document.createElement('div');
editable.setAttribute('id', 'customizable');
editable.innerHTML = '<i class="ri-edit-2-line"></i> <b></b>';
document.body.appendChild(editable);
document.querySelectorAll('.live-setting')?.forEach(function (el) {
el.addEventListener('mouseenter', function () {
setTimeout(() => {
let rect = el.getBoundingClientRect();
onEdit = this.getAttribute('data-live');
document.querySelector('#customizable b').innerText = onEdit;
document.querySelector('#customizable').style.top = (window.scrollY + rect.top + 5) + 'px';
}, 50);
});
el.addEventListener('mouseleave', function () {
console.log(this.getAttribute('data-live'));
});
});
editable.addEventListener('click', function () {
if (document.querySelector('#customize-modal') == null) {
let custModal = document.createElement('div');
custModal.setAttribute('id', 'customize-modal');
custModal.innerHTML = '<iframe></iframe>';
document.body.appendChild(custModal);
custModal.addEventListener('click', function (e) {
if (e.target == this) {
window.location.reload();
}
});
} else {
document.querySelector('#customize-modal').style.display = 'block';
}
document.addEventListener('keyup',function (e) {
if (e.code == 'Escape'){
window.location.reload();
}
});
document.querySelector('#customize-modal iframe').setAttribute('src', document.querySelector('#live-url').value + onEdit);
});
});

@ -1,45 +1,51 @@
import ContentSEOAnalyzer from './seo-analyzer.js' import ContentSEOAnalyzer from './seo-analyzer.js'
let timeOut = null; let timeOut = null;
window.addEventListener('load', function () { window.addEventListener('load', function () {
let keywordInput = document.querySelector('#keyword') ; try {
let dirx = document.querySelector('#panel-dir').value;
let editors = {};
document.querySelectorAll('.ckeditorx')?.forEach(function (el) {
const currentDir = el.getAttribute('dir');
let finalDir = dirx;
if (currentDir != null){
finalDir = currentDir;
}
editors[el.getAttribute('name')] = CKEDITOR.replace(el.getAttribute('name'), {
filebrowserUploadUrl: xupload,
filebrowserUploadMethod: 'form',
contentsLangDirection: finalDir,
skin: 'moono-dark',
});
CKEDITOR.addCss('.cke_editable { background-color: ' + website_bg + '; color: ' + website_text_color + ' ; font-family: ' + website_font + ' }'); let keywordInput = document.querySelector('#keyword');
editors[el.getAttribute('name')].on('change', function (evt) { let dirx = document.querySelector('#panel-dir').value;
const content = evt.editor.getData(); let editors = {};
el.value = content; document.querySelectorAll('.ckeditorx')?.forEach(function (el) {
if (el.classList.contains('seo-analyze')){
let keyword = keywordInput?.value;
const analyzer = new ContentSEOAnalyzer(content, keyword); const currentDir = el.getAttribute('dir');
const report = analyzer.generateReport(); let finalDir = dirx;
analyzer.displaySEOReport(report,'seo-hint') if (currentDir != null) {
finalDir = currentDir;
} }
}); editors[el.getAttribute('name')] = CKEDITOR.replace(el.getAttribute('name'), {
filebrowserUploadUrl: xupload,
filebrowserUploadMethod: 'form',
contentsLangDirection: finalDir,
skin: 'moono-dark',
});
if (el.classList.contains('seo-analyze')){ CKEDITOR.addCss('.cke_editable { background-color: ' + website_bg + '; color: ' + website_text_color + ' ; font-family: ' + website_font + ' }');
editors[el.getAttribute('name')].fire('change'); editors[el.getAttribute('name')].on('change', function (evt) {
keywordInput?.addEventListener('input',function () { const content = evt.editor.getData();
editors[el.getAttribute('name')].fire('change'); el.value = content;
if (el.classList.contains('seo-analyze')) {
let keyword = keywordInput?.value;
const analyzer = new ContentSEOAnalyzer(content, keyword);
const report = analyzer.generateReport();
analyzer.displaySEOReport(report, 'seo-hint')
}
}); });
}
});
if (el.classList.contains('seo-analyze')) {
editors[el.getAttribute('name')].fire('change');
keywordInput?.addEventListener('input', function () {
editors[el.getAttribute('name')].fire('change');
});
}
});
} catch {
}
}); });

@ -15,9 +15,13 @@ setTimeout(function () {
} }
},5000); },5000);
const forceLoad = function () { const forceLoad = function () {
const preloader = document.querySelector('#panel-preloader'); try {
preloader.style.height = 0; const preloader = document.querySelector('#panel-preloader');
setTimeout( () => { preloader.style.height = 0;
preloader.style.display = 'none'; setTimeout( () => {
},500); preloader.style.display = 'none';
},500);
} catch {
}
}; };

@ -194,3 +194,39 @@ section {
display: none; display: none;
} }
} }
#customizable{
position: absolute;
background: var(--xshop-primary);
border: var(--xshop-diff) 1px solid;
color: var(--xshop-diff);
top: -300px;
transition: 500ms;
right: 50px;
left: 50px;
text-align: center;
z-index: 99988;
padding: 1rem;
cursor: pointer;
border-radius: 7px;
}
#customize-modal{
z-index: 99999;
position: fixed;
left: 0;
right: 0;
bottom: 0;
top: 0;
background: #ffffff33;
backdrop-filter: blur(14px);
}
#customize-modal iframe{
width: 90%;
height: 90vh;
border: silver 1px solid;
margin: 5vh auto;
border-radius: 7px;
display: block;
}

@ -0,0 +1,49 @@
@include('components.panel-header')
<div id="panel-preloader">
<div class="loader"></div>
</div>
<input type="hidden" id="panel-dir" @if(langIsRTL(config('app.locale'))) value="rtl" @else value="ltr" @endif>
<form action="{{route('admin.setting.update')}}" method="post" enctype="multipart/form-data">
@csrf
<div class="container pt-3" id="app">
@include('components.err')
@if(count($settings) == 0)
<h3 class="text-center pt-2">
{{__("There is nothing to show!")}}
</h3>
@else
<div class="row">
@foreach($settings as $setting)
@include('components.setting-field')
@endforeach
</div>
@endif
</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 all settings")}}"
>
<i class="ri-save-2-line"></i>
</button>
@if(config('app.env') == 'production')
<button
href="{{getRoute('sort')}}"
class="action-btn circle-btn"
data-bs-toggle="tooltip"
data-bs-placement="top"
data-bs-custom-class="custom-tooltip"
data-bs-title="{{__("Save and build")}}"
name="build"
value="1"
style="inset-inline-end: 1.2rem;inset-inline-start: auto;"
>
<i class="ri-hammer-line"></i>
</button>
@endif
</form>
@include('components.panel-footer')

@ -134,6 +134,21 @@
> >
<i class="ri-save-2-line"></i> <i class="ri-save-2-line"></i>
</button> </button>
@if(config('app.env') == 'production')
<button
href="{{getRoute('sort')}}"
class="action-btn circle-btn"
data-bs-toggle="tooltip"
data-bs-placement="top"
data-bs-custom-class="custom-tooltip"
data-bs-title="{{__("Save and build")}}"
name="build"
value="1"
style="inset-inline-end: 1.2rem;inset-inline-start: auto;"
>
<i class="ri-hammer-line"></i>
</button>
@endif
</form> </form>
</div> </div>
<div class="mb-5"> <div class="mb-5">

@ -1,5 +1,5 @@
<section class='AttachmentWithPreview'> <section class='AttachmentWithPreview live-setting' data-live="{{$data->area_name.'_'.$data->part}}">
<div class="{{gfx()['container']}}"> <div class="{{gfx()['container']}}">
<h1> <h1>
{{$attachment->title}} {{$attachment->title}}
</h1> </h1>

@ -1,4 +1,4 @@
<section class='SimpleAttachmentList'> <section class='SimpleAttachmentList live-setting' data-live="{{$data->area_name.'_'.$data->part}}">
<div class="{{gfx()['container']}}"> <div class="{{gfx()['container']}}">
@if(count($data['attachs']) > 0) @if(count($data['attachs']) > 0)
<h2 class="my-3"> <h2 class="my-3">

@ -1,4 +1,4 @@
<section class='DenaAttachList content'> <section class='DenaAttachList content live-setting' data-live="{{$data->area_name.'_'.$data->part}}">
<div class="{{gfx()['container']}}"> <div class="{{gfx()['container']}}">
<h1> <h1>
{{$title}} {{$title}}

@ -1,4 +1,4 @@
<section id='CategoriesFavImageLinks'> <section id='CategoriesFavImageLinks' class='live-setting' data-live="{{$data->area_name.'_'.$data->part}}">
<div class="{{gfx()['container']}}"> <div class="{{gfx()['container']}}">
<h1> <h1>

@ -1,4 +1,4 @@
<section class='CategoriesGrid'> <section class='CategoriesGrid live-setting' data-live="{{$data->area_name.'_'.$data->part}}">
<div class="{{gfx()['container']}}"> <div class="{{gfx()['container']}}">
<h1> <h1>
{{getSetting($data->area_name.'_'.$data->part.'_title')}} {{getSetting($data->area_name.'_'.$data->part.'_title')}}

@ -1,4 +1,4 @@
<section id='CurveCategories'> <section id='CurveCategories' class=' live-setting' data-live="{{$data->area_name.'_'.$data->part}}">
<div id="curve-cat-top"> <div id="curve-cat-top">

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

@ -1,4 +1,4 @@
<section class='ParallelCategoriesGrid'> <section class='ParallelCategoriesGrid live-setting' data-live="{{$data->area_name.'_'.$data->part}}">
<div class="{{gfx()['container']}}"> <div class="{{gfx()['container']}}">
@if(count($category->parallelCategories()) > 0) @if(count($category->parallelCategories()) > 0)
<div> <div>

@ -1,4 +1,4 @@
<section class='SubCategoriesGrid content'> <section class='SubCategoriesGrid content live-setting' data-live="{{$data->area_name.'_'.$data->part}}">
<div class="{{gfx()['container']}}"> <div class="{{gfx()['container']}}">
@if($category->children()->count() > 0) @if($category->children()->count() > 0)
<div> <div>

@ -1,4 +1,4 @@
<section class='DorClip content'> <section class='DorClip content live-setting' data-live="{{$data->area_name.'_'.$data->part}}">
<div class="{{gfx()['container']}}"> <div class="{{gfx()['container']}}">
<h1> <h1>
{{$title}} {{$title}}

@ -1,4 +1,4 @@
<section class='AutoPlayClips'> <section class='AutoPlayClips live-setting' data-live="{{$data->area_name.'_'.$data->part}}">
<div class="{{gfx()['container']}}"> <div class="{{gfx()['container']}}">
<h1> <h1>
{{getSetting($data->area_name.'_'.$data->part.'_title')}} {{getSetting($data->area_name.'_'.$data->part.'_title')}}

@ -1,4 +1,4 @@
<section class='ClipListGrid content'> <section class='ClipListGrid content live-setting' data-live="{{$data->area_name.'_'.$data->part}}">
<div class="{{gfx()['container']}}"> <div class="{{gfx()['container']}}">
<h1> <h1>
{{$title}} {{$title}}

@ -1,4 +1,4 @@
<section class='SimpleComments'> <section class='SimpleComments live-setting' data-live="{{$data->area_name.'_'.$data->part}}">
<div class="{{gfx()['container']}}"> <div class="{{gfx()['container']}}">
<h5> <h5>
{{__("Comments")}} {{__("Comments")}}

@ -1,4 +1,4 @@
<section class='CompareProducts content'> <section class='CompareProducts content live-setting' data-live="{{$data->area_name.'_'.$data->part}}">
<div class="{{gfx()['container']}}"> <div class="{{gfx()['container']}}">
<h1> <h1>
{{$title}} {{$title}}

@ -1,4 +1,4 @@
<section class='MeloContact'> <section class='MeloContact live-setting' data-live="{{$data->area_name.'_'.$data->part}}">
<div class="{{gfx()['container']}}"> <div class="{{gfx()['container']}}">
<h1 class="text-center fw-light mb-3"> <h1 class="text-center fw-light mb-3">

@ -1,5 +1,5 @@
<section id='AvisaCustomer'> <section id='AvisaCustomer' class=' live-setting' data-live="{{$data->area_name.'_'.$data->part}}">
<div class="{{gfx()['container']}}"> <div class="{{gfx()['container']}}">
<div class="row"> <div class="row">
<div class="col-lg-3"> <div class="col-lg-3">
<img src="{{auth('customer')->user()->avatar()}}" alt="[avatar]" class="avisa-avatar" onclick="document.querySelector('#avatar').click();"> <img src="{{auth('customer')->user()->avatar()}}" alt="[avatar]" class="avisa-avatar" onclick="document.querySelector('#avatar').click();">

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 139 KiB

@ -1,5 +1,5 @@
@cache('wave_footer'. cacheNumber(), 90) @cache('wave_footer'. cacheNumber(), 90)
<footer class='FireFooter'> <footer class='FireFooter live-setting' data-live="{{$data->area_name.'_'.$data->part}}">
<div class="footer"> <div class="footer">
<div class="bubbles"> <div class="bubbles">
<div class="bubble" <div class="bubble"

@ -1,4 +1,4 @@
<section class='LittleFooter'> <section class='LittleFooter live-setting' data-live="{{$data->area_name.'_'.$data->part}}" >
<div class="{{gfx()['container']}}"> <div class="{{gfx()['container']}}">
<div class="row"> <div class="row">
<div class="col-md-4"> <div class="col-md-4">

@ -1,4 +1,4 @@
<section class='OtherFooter mt-5'> <section class='OtherFooter mt-5 live-setting' data-live="{{$data->area_name.'_'.$data->part}}">
<footer id="footer" class="footer-1"> <footer id="footer" class="footer-1">

@ -1,5 +1,5 @@
@cache('parallax_footer'. cacheNumber(), 90) @cache('parallax_footer'. cacheNumber(), 90)
<footer class='ParallaxFooter' style="background-image: url('{{asset('upload/images/'.$data->area_name.'.'.$data->part.'.jpg')}}')"> <footer class='ParallaxFooter live-setting' data-live="{{$data->area_name.'_'.$data->part}}" style="background-image: url('{{asset('upload/images/'.$data->area_name.'.'.$data->part.'.jpg')}}')">
<div class="{{gfx()['container']}}"> <div class="{{gfx()['container']}}">
<div class="row"> <div class="row">

@ -1,5 +1,5 @@
@cache('simple_footer'. cacheNumber(), 90) @cache('simple_footer'. cacheNumber(), 90)
<section class='SimpleFooter'> <section class='SimpleFooter live-setting' data-live="{{$data->area_name.'_'.$data->part}}">
<div class="content"> <div class="content">
<div class="{{gfx()['container']}}"> <div class="{{gfx()['container']}}">
<div class="row"> <div class="row">

@ -1,5 +1,5 @@
@cache('wave_footer'. cacheNumber(), 90) @cache('wave_footer'. cacheNumber(), 90)
<footer class='WaveFooter' <footer class='WaveFooter live-setting' data-live="{{$data->area_name.'_'.$data->part}}"
style="--speed: {{getSetting($data->area_name.'_'.$data->part.'_speed')}}s; style="--speed: {{getSetting($data->area_name.'_'.$data->part.'_speed')}}s;
--speed2: {{getSetting($data->area_name.'_'.$data->part.'_speed2')}}s; --speed2: {{getSetting($data->area_name.'_'.$data->part.'_speed2')}}s;
--speed3: {{getSetting($data->area_name.'_'.$data->part.'_speed3')}}s"> --speed3: {{getSetting($data->area_name.'_'.$data->part.'_speed3')}}s">

@ -1,4 +1,4 @@
<section class='GridGallery'> <section class='GridGallery live-setting' data-live="{{$data->area_name.'_'.$data->part}}">
<div class="{{gfx()['container']}}"> <div class="{{gfx()['container']}}">
<h1> <h1>
{{ getSetting($data->area_name.'_'.$data->part.'_title')}} {{ getSetting($data->area_name.'_'.$data->part.'_title')}}

@ -1,4 +1,4 @@
<section class='GalleriesList'> <section class='GalleriesList live-setting' data-live="{{$data->area_name.'_'.$data->part}}">
<div class="{{gfx()['container']}}"> <div class="{{gfx()['container']}}">
<h1> <h1>

@ -1,5 +1,5 @@
<section id='AparatGallery'> <section id='AparatGallery' class=' live-setting' data-live="{{$data->area_name.'_'.$data->part}}">
{{-- <div class="{{gfx()['container']}}">--}} {{-- <div class="{{gfx()['container']}}">--}}
<img src="{{$gallery->images[0]->imgOriginalUrl()}}" id="aparat-main-image" alt=""> <img src="{{$gallery->images[0]->imgOriginalUrl()}}" id="aparat-main-image" alt="">
<div class="aparat-list"> <div class="aparat-list">
@if($gallery->images->count() > 0) @if($gallery->images->count() > 0)

@ -1,4 +1,4 @@
<section class='GallaryGrid'> <section class='GallaryGrid live-setting' data-live="{{$data->area_name.'_'.$data->part}}">
<div class="{{gfx()['container']}}"> <div class="{{gfx()['container']}}">
<div class="row py-4"> <div class="row py-4">
@if($gallery->images->count() > 0) @if($gallery->images->count() > 0)

@ -1,4 +1,4 @@
<section class='SubGroupsGrid content'> <section class='SubGroupsGrid content live-setting' data-live="{{$data->area_name.'_'.$data->part}}">
<div class="{{gfx()['container']}}"> <div class="{{gfx()['container']}}">
@if($group->children()->count() > 0) @if($group->children()->count() > 0)
<div> <div>

@ -1,4 +1,4 @@
<section class='HodHeader'> <section class='HodHeader live-setting' data-live="{{$data->area_name.'_'.$data->part}}">
<div class="{{gfx()['container']}}"> <div class="{{gfx()['container']}}">
<div class="row"> <div class="row">
<div class="col-md"> <div class="col-md">

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

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

@ -1,4 +1,4 @@
<header class='SimpleHeader'> <header class='SimpleHeader live-setting' data-live="{{$data->area_name.'_'.$data->part}}">
<div class="{{gfx()['container']}}"> <div class="{{gfx()['container']}}">
<h1> <h1>
{{$title}} {{$title}}

@ -1,4 +1,4 @@
<section class='AuthorSlider'> <section class='AuthorSlider live-setting' data-live="{{$data->area_name.'_'.$data->part}}">
<div class="{{gfx()['container']}}"> <div class="{{gfx()['container']}}">
<h1> <h1>
{{getSetting($data->area_name.'_'.$data->part.'_title')}} {{getSetting($data->area_name.'_'.$data->part.'_title')}}

@ -1,4 +1,4 @@
<section id='CounterGrid'> <section id='CounterGrid' class=' live-setting' data-live="{{$data->area_name.'_'.$data->part}}">
<div class="{{gfx()['container']}}"> <div class="{{gfx()['container']}}">
<div class="row"> <div class="row">

@ -1,3 +1,3 @@
<section class='GisooVideo'> <section class='GisooVideo live-setting' data-live="{{$data->area_name.'_'.$data->part}}" >
<video src="{{asset('upload/media/'.$data->area_name.'.'.$data->part.'.mp4')}}" autoplay muted ></video> <video src="{{asset('upload/media/'.$data->area_name.'.'.$data->part.'.mp4')}}" autoplay muted ></video>
</section> </section>

@ -1,4 +1,4 @@
<section class='GradientTextLink py-4'> <section class='GradientTextLink py-4 live-setting' data-live="{{$data->area_name.'_'.$data->part}}">
<div class="{{gfx()['container']}} py-4 text-center"> <div class="{{gfx()['container']}} py-4 text-center">
<h1> <h1>
{{getSetting($data->area_name.'_'.$data->part.'_title')}} {{getSetting($data->area_name.'_'.$data->part.'_title')}}

@ -1,4 +1,4 @@
<section id='InlineMap'> <section id='InlineMap' class=' live-setting' data-live="{{$data->area_name.'_'.$data->part}}">
<div class="{{gfx()['container']}}"> <div class="{{gfx()['container']}}">
<h5> <h5>
<a href="{{getSetting($data->area_name.'_'.$data->part.'_link')}}"> <a href="{{getSetting($data->area_name.'_'.$data->part.'_link')}}">

@ -1,4 +1,4 @@
<section class='MainCategoriesIcon'> <section class='MainCategoriesIcon live-setting' data-live="{{$data->area_name.'_'.$data->part}}">
<div class="{{gfx()['container']}}"> <div class="{{gfx()['container']}}">
<h1 class="text-center"> <h1 class="text-center">
{{getSetting($part->area_name . '_' . $part->part.'_title')}} {{getSetting($part->area_name . '_' . $part->part.'_title')}}

@ -1,4 +1,4 @@
<section class='MainCategoriesSlider'> <section class='MainCategoriesSlider live-setting' data-live="{{$data->area_name.'_'.$data->part}}">
<div class="{{gfx()['container']}}"> <div class="{{gfx()['container']}}">
<h1> <h1>
{{getSetting($data->area_name.'_'.$data->part.'_title')}} {{getSetting($data->area_name.'_'.$data->part.'_title')}}

@ -1,4 +1,4 @@
<section class='MaryamCategoryProducts'> <section class='MaryamCategoryProducts live-setting' data-live="{{$data->area_name.'_'.$data->part}}">
<div class="{{gfx()['container']}}"> <div class="{{gfx()['container']}}">
<h1> <h1>
{{getSetting($data->area_name.'_'.$data->part.'_title')}} {{getSetting($data->area_name.'_'.$data->part.'_title')}}

@ -1,4 +1,4 @@
<section class='NataliaCategories'> <section class='NataliaCategories live-setting' data-live="{{$data->area_name.'_'.$data->part}}">
<div class="{{gfx()['container']}}"> <div class="{{gfx()['container']}}">
<div class="row nata-content"> <div class="row nata-content">
<div class="col-md-6 pt-5 slider-content"> <div class="col-md-6 pt-5 slider-content">

@ -1,4 +1,4 @@
<section class='SimpleTextLink py-4'> <section class='SimpleTextLink py-4 live-setting' data-live="{{$data->area_name.'_'.$data->part}}">
<div class="{{gfx()['container']}} py-4 text-center"> <div class="{{gfx()['container']}} py-4 text-center">
<h1> <h1>
{{getSetting($data->area_name.'_'.$data->part.'_title')}} {{getSetting($data->area_name.'_'.$data->part.'_title')}}

@ -1,3 +1,3 @@
<section class='SpliterText'> <section class='SpliterText live-setting' data-live="{{$data->area_name.'_'.$data->part}}">
{!! getSetting($data->area_name.'_'.$data->part.'_text') !!} {!! getSetting($data->area_name.'_'.$data->part.'_text') !!}
</section> </section>

@ -1,4 +1,4 @@
<section class='VickushkaMainCategoriesSlider'> <section class='VickushkaMainCategoriesSlider live-setting' data-live="{{$data->area_name.'_'.$data->part}}">
<div class="{{gfx()['container']}}"> <div class="{{gfx()['container']}}">
<div class="row"> <div class="row">

@ -1,4 +1,4 @@
<section class='LianaInvoice'> <section class='LianaInvoice live-setting' data-live="{{$data->area_name.'_'.$data->part}}">
<div class="p-3"> <div class="p-3">
<div class="row mb-4"> <div class="row mb-4">

@ -1,4 +1,4 @@
<section id='LoginBigBg' class="content" <section id='LoginBigBg' class='content live-setting' data-live="{{$data->area_name.'_'.$data->part}}"
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"> <form @if(!config('app.sms.sign')) action="{{route('client.sign-in-do')}}" @endif id="login-form" method="post">
@csrf @csrf

@ -1,4 +1,4 @@
<section id='LoginPatternBg' class="content" <section id='LoginPatternBg' class='content live-setting' data-live="{{$data->area_name.'_'.$data->part}}"
> >
<div id="login-container" <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')}}')">

@ -1,4 +1,4 @@
<nav id="AplMenu"> <nav id="AplMenu" class=' live-setting' data-live="{{$data->area_name.'_'.$data->part}}">
<ul class="{{gfx()['container']}}"> <ul class="{{gfx()['container']}}">
<li class="icon-menu" id="logo-menu"> <li class="icon-menu" id="logo-menu">
<a href="{{url('/')}}"> <a href="{{url('/')}}">

@ -1,4 +1,4 @@
<nav id='DeebaMenu'> <nav id='DeebaMenu' class=' live-setting' data-live="{{$data->area_name.'_'.$data->part}}">
<div class="{{gfx()['container']}}"> <div class="{{gfx()['container']}}">
<ul> <ul>
@php($items = getMenuBySetting($data->area_name.'_'.$data->part.'_menu')->items) @php($items = getMenuBySetting($data->area_name.'_'.$data->part.'_menu')->items)

@ -1,4 +1,4 @@
<header class='HomayonMenu'> <header class='HomayonMenu live-setting' data-live="{{$data->area_name.'_'.$data->part}}" >
<div class="homayon-logo" <div class="homayon-logo"
style="background-image: url('{{asset('upload/images/'.$data->area_name.'.'.$data->part.'.svg')}}')"> style="background-image: url('{{asset('upload/images/'.$data->area_name.'.'.$data->part.'.svg')}}')">
<div class="logo-container"> <div class="logo-container">

@ -1,4 +1,4 @@
<nav id='RecetMenu'> <nav id='RecetMenu' class=' live-setting' data-live="{{$data->area_name.'_'.$data->part}}">
<ul> <ul>
<li> <li>
<a href="#" id="rect-toggle"> <a href="#" id="rect-toggle">

@ -1,5 +1,5 @@
<nav id='SideMenu'> <nav id='SideMenu' class=' live-setting' data-live="{{$data->area_name.'_'.$data->part}}">
<div class="text-center py-3" id="side-menu-logo"> <div class="text-center py-3" id="side-menu-logo">
<a href="{{url('/')}}"> <a href="{{url('/')}}">
<img src="{{asset('upload/images/logo.svg')}}" alt=""> <img src="{{asset('upload/images/logo.svg')}}" alt="">
{{-- <i class="ri-apple-line "></i>--}} {{-- <i class="ri-apple-line "></i>--}}

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

@ -1,4 +1,4 @@
<section class='PostSidebar content'> <section class='PostSidebar content live-setting' data-live="{{$data->area_name.'_'.$data->part}}">
<div class="{{gfx()['container']}}"> <div class="{{gfx()['container']}}">
<dov class="row"> <dov class="row">
@if(!getSetting($data->area_name.'_'.$data->part.'_invert')) @if(!getSetting($data->area_name.'_'.$data->part.'_invert'))

@ -1,4 +1,4 @@
<section class='SimplePost content'> <section class='SimplePost content live-setting' data-live="{{$data->area_name.'_'.$data->part}}">
<div class="{{gfx()['container']}}"> <div class="{{gfx()['container']}}">
<div class="p-2"> <div class="p-2">
<span class="float-end text-muted"> <span class="float-end text-muted">

@ -1,4 +1,4 @@
<section class='LongHeightPosts' <section class='LongHeightPosts live-setting' data-live="{{$data->area_name.'_'.$data->part}}"
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']}}"> <div class="{{gfx()['container']}}">
<h1> <h1>

@ -1,4 +1,4 @@
<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 live-setting' data-live="{{$data->area_name.'_'.$data->part}}">
<div class="{{gfx()['container']}}"> <div class="{{gfx()['container']}}">
<div class="row"> <div class="row">

@ -1,4 +1,4 @@
<section class='PostIndexImage'> <section class='PostIndexImage live-setting' data-live="{{$data->area_name.'_'.$data->part}}">
<div class="{{gfx()['container']}}"> <div class="{{gfx()['container']}}">
<h1> <h1>
<a href="{{getGroupBySetting($data->area_name.'_'.$data->part.'_group')?->webUrl()}}"> <a href="{{getGroupBySetting($data->area_name.'_'.$data->part.'_group')?->webUrl()}}">

@ -1,4 +1,4 @@
<section class='PostsIconSimple py-4'> <section class='PostsIconSimple py-4 live-setting' data-live="{{$data->area_name.'_'.$data->part}}">
<div class="{{gfx()['container']}}"> <div class="{{gfx()['container']}}">
<h1> <h1>
<a href="{{getGroupBySetting($data->area_name.'_'.$data->part)?->webUrl()}}"> <a href="{{getGroupBySetting($data->area_name.'_'.$data->part)?->webUrl()}}">

@ -1,4 +1,4 @@
<section class='PostsSlider'> <section class='PostsSlider live-setting' data-live="{{$data->area_name.'_'.$data->part}}">
<div class="{{gfx()['container']}}"> <div class="{{gfx()['container']}}">
<h1> <h1>
{{getSetting($data->area_name.'_'.$data->part.'_title')}} {{getSetting($data->area_name.'_'.$data->part.'_title')}}

@ -1,4 +1,4 @@
<section class='GridPostList content'> <section class='GridPostList content live-setting' data-live="{{$data->area_name.'_'.$data->part}}">
<div class="{{gfx()['container']}}"> <div class="{{gfx()['container']}}">
@if(\App\Models\Post::where('status',1)->where('is_pinned',1)->count() < 0 ) @if(\App\Models\Post::where('status',1)->where('is_pinned',1)->count() < 0 )
<div class="row pinned-posts"> <div class="row pinned-posts">

@ -1,4 +1,4 @@
<section class='GridPostListSidebar content'> <section class='GridPostListSidebar content live-setting' data-live="{{$data->area_name.'_'.$data->part}}">
<div class="{{gfx()['container']}}"> <div class="{{gfx()['container']}}">
@if(\App\Models\Post::where('status',1)->where('is_pinned',1)->count() < 0 ) @if(\App\Models\Post::where('status',1)->where('is_pinned',1)->count() < 0 )
<div class="row pinned-posts"> <div class="row pinned-posts">

@ -1,4 +1,4 @@
<section class='SimplePostList content'> <section class='SimplePostList content live-setting' data-live="{{$data->area_name.'_'.$data->part}}">
<div class="{{gfx()['container']}}"> <div class="{{gfx()['container']}}">
@if(\App\Models\Post::where('status',1)->where('is_pinned',1)->count() < 0 ) @if(\App\Models\Post::where('status',1)->where('is_pinned',1)->count() < 0 )
<div class="row pinned-posts"> <div class="row pinned-posts">

@ -1,4 +1,4 @@
<section class='SimplePostListSideBar content'> <section class='SimplePostListSideBar content live-setting' data-live="{{$data->area_name.'_'.$data->part}}">
<div class="{{gfx()['container']}}"> <div class="{{gfx()['container']}}">
<div class="row pinned-posts"> <div class="row pinned-posts">
@if(\App\Models\Post::where('status',1)->where('is_pinned',1)->count() < 0 ) @if(\App\Models\Post::where('status',1)->where('is_pinned',1)->count() < 0 )

@ -1,4 +1,4 @@
<section id='ProductAria' class="content"> <section id='ProductAria' class='content live-setting' data-live="{{$data->area_name.'_'.$data->part}}">
<div class="{{gfx()['container']}}"> <div class="{{gfx()['container']}}">
<nav aria-label="breadcrumb"> <nav aria-label="breadcrumb">

@ -1,4 +1,4 @@
<section id='ProductKaren' class="content"> <section id='ProductKaren' class='content live-setting' data-live="{{$data->area_name.'_'.$data->part}}">
<div class="{{gfx()['container']}}"> <div class="{{gfx()['container']}}">
@include('components.err') @include('components.err')

@ -1,4 +1,4 @@
<section id='ProductYasamin' > <section id='ProductYasamin' class=' live-setting' data-live="{{$data->area_name.'_'.$data->part}}" >
<div class="row"> <div class="row">
<div class="col-lg-5"> <div class="col-lg-5">
<div class="ps-2"> <div class="ps-2">

@ -1,4 +1,4 @@
<section class='LatestProducts'> <section class='LatestProducts live-setting' data-live="{{$data->area_name.'_'.$data->part}}">
<div class="{{gfx()['container']}}"> <div class="{{gfx()['container']}}">
<h1> <h1>
{{__("Latest products")}} {{__("Latest products")}}

@ -1,4 +1,4 @@
<section class='ProductGrid content' id="product-list-view"> <section class='ProductGrid content live-setting' data-live="{{$data->area_name.'_'.$data->part}}" id="product-list-view">
<div class="{{gfx()['container']}}"> <div class="{{gfx()['container']}}">
<h1> <h1>
{{$title}} {{$title}}

@ -1,4 +1,4 @@
<section class='ProductGridHiddenSidebar'> <section class='ProductGridHiddenSidebar live-setting' data-live="{{$data->area_name.'_'.$data->part}}">
<div class="{{gfx()['container']}}"> <div class="{{gfx()['container']}}">
<h1> <h1>
{{$title}} {{$title}}

@ -1,4 +1,4 @@
<section class='ProductGridSidebar content' id="product-list-view"> <section class='ProductGridSidebar content live-setting' data-live="{{$data->area_name.'_'.$data->part}}" id="product-list-view">
<div class="{{gfx()['container']}}"> <div class="{{gfx()['container']}}">
<h1> <h1>
{{$title}} {{$title}}

@ -1,4 +1,4 @@
<section class='SimpleRegister'> <section class='SimpleRegister live-setting' data-live="{{$data->area_name.'_'.$data->part}}">
<div class="{{gfx()['container']}}"> <div class="{{gfx()['container']}}">
<form action="/blah" method="post" class="safe-form" id="email-register"> <form action="/blah" method="post" class="safe-form" id="email-register">
@csrf @csrf

@ -1,4 +1,4 @@
<section id='ParallaxSlider'> <section id='ParallaxSlider' class=' live-setting' data-live="{{$data->area_name.'_'.$data->part}}">
<div id="ParallaxSliderTns"> <div id="ParallaxSliderTns">
@foreach(\App\Models\Slider::where('status',1)->get() as $slider) @foreach(\App\Models\Slider::where('status',1)->get() as $slider)
<div> <div>

@ -1,4 +1,4 @@
<div class="slider-content"> <div class='slider-content live-setting' data-live="{{$data->area_name.'_'.$data->part}}">
<div class='SliderSimple'> <div class='SliderSimple'>
@foreach(\App\Models\Slider::where('status',1)->get() as $slider) @foreach(\App\Models\Slider::where('status',1)->get() as $slider)
<div class="item"> <div class="item">

@ -1,4 +1,4 @@
<div class='TopSimple'> <div class='TopSimple live-setting' data-live="{{$data->area_name.'_'.$data->part}}" >
<div class="{{gfx()['container']}}"> <div class="{{gfx()['container']}}">
<div class="row"> <div class="row">
<div class="col-md-3 pt-2 text-lg-start"> <div class="col-md-3 pt-2 text-lg-start">

@ -4,11 +4,14 @@
<input type="hidden" id="api-fav-toggle" value="{{route('client.product-fav-toggle','')}}/"> <input type="hidden" id="api-fav-toggle" value="{{route('client.product-fav-toggle','')}}/">
<input type="hidden" id="api-compare-toggle" value="{{route('client.product-compare-toggle','')}}/"> <input type="hidden" id="api-compare-toggle" value="{{route('client.product-compare-toggle','')}}/">
{{--@if(auth()->check() && auth()->user()->hasRole('developer') && !request()->has('ediable'))--}} @if(auth()->check() && (auth()->user()->hasRole('developer') || auth()->user()->hasRole('admin')))
{{--<a id="do-edit" href="?ediable">--}} <a id="do-edit" data-bs-custom-class="custom-tooltip"
{{-- <i class="ri-settings-2-line"></i>--}} data-bs-toggle="tooltip" data-bs-placement="auto"
{{--</a>--}} title="{{__("Customize theme")}}">
{{--@endif--}} <i class="ri-settings-2-line"></i>
</a>
<input type="hidden" id="live-url" value="{{route('admin.setting.live','')}}/">
@endif
</body> </body>
</html> </html>

@ -342,6 +342,7 @@ Route::prefix(config('app.panel.prefix'))->name('admin.')->group(
Route::post('store', [\App\Http\Controllers\Admin\SettingController::class, "store"])->name('store'); Route::post('store', [\App\Http\Controllers\Admin\SettingController::class, "store"])->name('store');
Route::post('update', [\App\Http\Controllers\Admin\SettingController::class, "update"])->name('update'); Route::post('update', [\App\Http\Controllers\Admin\SettingController::class, "update"])->name('update');
Route::get('cache/clear', [\App\Http\Controllers\Admin\SettingController::class, "cacheClear"])->name('cache-clear'); Route::get('cache/clear', [\App\Http\Controllers\Admin\SettingController::class, "cacheClear"])->name('cache-clear');
Route::get('live/{slug}', [\App\Http\Controllers\Admin\SettingController::class, "liveEdit"])->name('live');
} }
); );
Route::prefix('gfx')->name('gfx.')->group( Route::prefix('gfx')->name('gfx.')->group(

Loading…
Cancel
Save