mirror of https://github.com/4xmen/xshop.git
added parallax footer part
parent
6841e087ba
commit
c51d84abae
@ -0,0 +1,46 @@
|
||||
<footer class='ParallaxFooter' style="background-image: url('{{asset('upload/images/'.$data->area->name.'.'.$data->part.'.jpg')}}')">
|
||||
<div class="{{gfx()['container']}}">
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-5">
|
||||
<h3>
|
||||
{{config('app.name')}}
|
||||
</h3>
|
||||
<p class="px-4">
|
||||
{{getSetting($data->area->name.'_'.$data->part.'_text')}}
|
||||
</p>
|
||||
</div>
|
||||
<div class="col-md-5">
|
||||
<h3>
|
||||
{{getSetting($data->area->name.'_'.$data->part.'_title2')}}
|
||||
</h3>
|
||||
<ul class="ps-5">
|
||||
@foreach( getGroupPostsBySetting($data->area->name.'_'.$data->part.'_group',5) as $post )
|
||||
<li>
|
||||
<a href="{{$post->webUrl()}}">
|
||||
{{Str::limit($post->title,40)}}
|
||||
</a>
|
||||
</li>
|
||||
@endforeach
|
||||
</ul>
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
{!! getSetting($data->area->name.'_'.$data->part.'_last') !!}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="p2 text-center">
|
||||
<ul class="social text-center">
|
||||
@foreach(getSettingsGroup('social_')??[] as $k => $social)
|
||||
<li class="d-inline-block mx-2">
|
||||
<a href="{{$social}}">
|
||||
<i class="ri-{{$k}}-line"></i>
|
||||
</a>
|
||||
</li>
|
||||
@endforeach
|
||||
</ul>
|
||||
</div>
|
||||
<p class="text-center">
|
||||
{{getSetting('copyright')}}
|
||||
</p>
|
||||
</footer>
|
@ -0,0 +1,10 @@
|
||||
{
|
||||
"name": "ParallaxFooter",
|
||||
"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,77 @@
|
||||
<?php
|
||||
|
||||
namespace Resources\Views\Segments;
|
||||
|
||||
use App\Models\Group;
|
||||
use App\Models\Part;
|
||||
use App\Models\Setting;
|
||||
use Illuminate\Support\Facades\File;
|
||||
|
||||
class ParallaxFooter
|
||||
{
|
||||
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 = 'LONGTEXT';
|
||||
// $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.'_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->save();
|
||||
|
||||
|
||||
$setting = new Setting();
|
||||
$setting->section = 'theme';
|
||||
$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->save();
|
||||
|
||||
$setting = new Setting();
|
||||
$setting->section = 'theme';
|
||||
$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->type = 'EDITOR';
|
||||
$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();
|
||||
|
||||
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();
|
||||
}
|
||||
public static function onMount(Part $part = null)
|
||||
{
|
||||
return $part;
|
||||
}
|
||||
}
|
@ -0,0 +1,71 @@
|
||||
.ParallaxFooter {
|
||||
padding: 3rem 0;
|
||||
background-size: cover;
|
||||
background-position: center;
|
||||
background-attachment: fixed;
|
||||
h3{
|
||||
color: var(--xshop-primary);
|
||||
text-align: center;
|
||||
position: relative;
|
||||
font-weight: 200;
|
||||
&:before,&:after{
|
||||
position: absolute;
|
||||
content: ' ';
|
||||
height: 1px;
|
||||
width: 10%;
|
||||
top: 48%;
|
||||
}
|
||||
|
||||
&:before{
|
||||
inset-inline-start: 0;
|
||||
background: linear-gradient(90deg, var(--xshop-primary) 0%, #ffffff00 100%);
|
||||
}
|
||||
&:after{
|
||||
inset-inline-end: 0;
|
||||
background: linear-gradient(-90deg, var(--xshop-primary) 0%, #ffffff00 100%);
|
||||
}
|
||||
}
|
||||
|
||||
.row{
|
||||
ul{
|
||||
list-style: none;
|
||||
padding: 0;
|
||||
|
||||
|
||||
li{
|
||||
position: relative;
|
||||
|
||||
&:before{
|
||||
position: absolute;
|
||||
inset-inline-start: -24px;
|
||||
top: 40%;
|
||||
height: 1px;
|
||||
content: ' ';
|
||||
width: 14px;
|
||||
background: linear-gradient(90deg, var(--xshop-primary) 0%, #ffffff00 100%);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.social{
|
||||
position: relative;
|
||||
padding: 1rem;
|
||||
margin: 1rem;
|
||||
&:before,&:after{
|
||||
position: absolute;
|
||||
content: ' ';
|
||||
height: 1px;
|
||||
width: 70%;
|
||||
top: 0;
|
||||
left: 15%;
|
||||
right: 15%;
|
||||
background: linear-gradient(90deg,#ffffff00 0%, var(--xshop-primary) 50%, #ffffff00 100%);
|
||||
}
|
||||
|
||||
&:after{
|
||||
top: auto;
|
||||
bottom: 0;
|
||||
}
|
||||
}
|
||||
}
|
Binary file not shown.
After Width: | Height: | Size: 583 KiB |
Loading…
Reference in New Issue