added Sina theme part

master
A1Gard 2 days ago
parent ec15cb07dd
commit 2f146029c5

@ -543,6 +543,7 @@
"True": "بلی",
"Type": "نوع",
"Unavailable": "ناموجود",
"Under construction": "در دست ساخت",
"Unit": "واحد",
"Unknown bulk action : :ACTION": "کار دسته جمعی تعریف نشده :ACTION",
"Update": "به روز شدن",

@ -0,0 +1,22 @@
<section class="SinaTextBg live-setting" data-live="{{$data->area_name.'_'.$data->part}}" style="background-image: url('{{asset('upload/images/'.$data->area_name.'.'.$data->part.'.jpg')}}')">
<div class="container">
<div class="row">
<div class="col-md-3">
</div>
<div class="col-md-6">
<div class="sina-box">
<div class="txt">
{!! getSetting($data->area_name.'_'.$data->part.'_text') !!}
</div>
<a class="btn btn-outline-dark" href="{{getSetting($data->area_name.'_'.$data->part.'_link')}}">
{{getSetting($data->area_name.'_'.$data->part.'_btn')}}
</a>
</div>
</div>
<div class="col-md-3">
</div>
</div>
</div>
</section>

@ -0,0 +1,10 @@
{
"name": "SinaTextBg",
"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,65 @@
<?php
namespace Resources\Views\Segments;
use App\Models\Part;
use App\Models\Setting;
use Illuminate\Support\Facades\File;
class SinaTextBg
{
public static function onAdd(Part $part = null)
{
$setting = new Setting();
$setting->section = 'theme';
$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 = 'EDITOR';
// $setting->data = json_encode(['xmin' => 2, 'xmax' => 90]);
$setting->title = $part->area_name . ' ' . $part->part. ' main text';
$setting->save();
$setting = new Setting();
$setting->section = 'theme';
$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->save();
$setting = new Setting();
$setting->section = 'theme';
$setting->key = $part->area_name . '_' . $part->part.'_btn';
$setting->value = 'Shop';
$setting->type = 'TEXT';
$setting->size = 6;
$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->value = config('app.url');
$setting->type = 'TEXT';
$setting->ltr = true;
$setting->size = 6;
$setting->title = $part->area_name . ' ' . $part->part .' button link';
$setting->save();
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.'_jpg')->first()?->delete();
Setting::where('key',$part->area_name . '_' . $part->part.'_btn')->first()?->delete();
Setting::where('key',$part->area_name . '_' . $part->part.'_link')->first()?->delete();
}
public static function onMount(Part $part = null)
{
return $part;
}
}

@ -0,0 +1,48 @@
.SinaTextBg {
// scss
height: 90vh;
background-size: cover;
background-position: center;
.sina-box{
margin-top: 20vh;
background: #ffffff99;
backdrop-filter: blur(7px);
padding: 3rem;
height: 50vh;
border-radius: var(--xshop-border-radius);
position: relative;
padding-bottom: 50px;
.txt{
height: 38vh;
overflow: hidden;
}
.btn{
position: absolute;
bottom: 1rem;
left: 50%;
transform: translateX(-50%);
min-width: 120px;
}
h1,h2,h3,h4{
font-weight: 400;
font-size: 20px;
text-transform: uppercase;
text-align: justify;
}
p{
text-align: justify;
}
}
}
/*-968px width*/
@media (max-width: 968px) {
.sina-box{
h1,h2,h3,h4{
font-size: 20px !important;
}
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 545 KiB

Loading…
Cancel
Save