-
Notifications
You must be signed in to change notification settings - Fork 163
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
146 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 22 additions & 0 deletions
22
resources/views/segments/index/SinaTextBg/SinaTextBg.blade.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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> |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{ | ||
"name": "SinaTextBg", | ||
"version": "1.0", | ||
"author": "xStack", | ||
"email": "[email protected]", | ||
"license": "GPL-3.0-or-later", | ||
"url": "https:\/\/xstack.ir", | ||
"author_url": "https:\/\/4xmen.ir", | ||
"packages": [] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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; | ||
} | ||
} | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.