mirror of https://github.com/4xmen/xshop.git
added text splitter
parent
122f89b881
commit
c44e3cc03e
@ -0,0 +1,3 @@
|
|||||||
|
<section class='SpliterText'>
|
||||||
|
{!! getSetting($data->area_name.'_'.$data->part.'_text') !!}
|
||||||
|
</section>
|
@ -0,0 +1,10 @@
|
|||||||
|
{
|
||||||
|
"name": "SpliterText",
|
||||||
|
"version": "1.0",
|
||||||
|
"author": "xStack",
|
||||||
|
"email": "xshop@xstack.ir",
|
||||||
|
"license": "GPL-3.0-or-later",
|
||||||
|
"url": "https:\/\/xstack.ir",
|
||||||
|
"author_url": "https:\/\/4xmen.ir",
|
||||||
|
"packages": []
|
||||||
|
}
|
@ -0,0 +1,30 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace Resources\Views\Segments;
|
||||||
|
|
||||||
|
use App\Models\Part;
|
||||||
|
use App\Models\Setting;
|
||||||
|
|
||||||
|
class SpliterText
|
||||||
|
{
|
||||||
|
public static function onAdd(Part $part = null)
|
||||||
|
{
|
||||||
|
$setting = new Setting();
|
||||||
|
$setting->section = 'theme';
|
||||||
|
$setting->key = $part->area_name . '_' . $part->part.'_text';
|
||||||
|
$setting->value = 'A usually green, flattened, lateral structure attached to a stem and functioning as a principal organ of photosynthesis and transpiration in most plants.';
|
||||||
|
$setting->type = 'EDITOR';
|
||||||
|
$setting->size = 12;
|
||||||
|
$setting->title = $part->area_name . ' ' . $part->part .' text';
|
||||||
|
$setting->save();
|
||||||
|
}
|
||||||
|
public static function onRemove(Part $part = null)
|
||||||
|
{
|
||||||
|
Setting::where('key',$part->area_name . '_' . $part->part.'_text')->first()?->delete();
|
||||||
|
|
||||||
|
}
|
||||||
|
public static function onMount(Part $part = null)
|
||||||
|
{
|
||||||
|
return $part;
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,17 @@
|
|||||||
|
.SpliterText {
|
||||||
|
// scss
|
||||||
|
padding: 1rem;
|
||||||
|
background: var(--xshop-background);
|
||||||
|
width: 700px;
|
||||||
|
max-width: 95%;
|
||||||
|
margin: -3.5rem auto;
|
||||||
|
height: 7rem;
|
||||||
|
border-radius: var(--xshop-border-radius);
|
||||||
|
border: 1px solid rgba(0, 0, 0, 0.1);
|
||||||
|
position: relative;
|
||||||
|
z-index: 7;
|
||||||
|
|
||||||
|
}
|
||||||
|
.SpliterText + section{
|
||||||
|
padding-top: 5rem;
|
||||||
|
}
|
Binary file not shown.
After Width: | Height: | Size: 39 KiB |
Loading…
Reference in New Issue