added simple part

added slider
pull/49/head
A1Gard 4 months ago
parent 86d77c031b
commit cbb392e7be

@ -29,6 +29,7 @@ class Area extends Model
'group',
'groups',
'groups_page',
'header',
'index',
'invoice',
'login',

Binary file not shown.

After

Width:  |  Height:  |  Size: 474 KiB

@ -0,0 +1,10 @@
<header class='ParallaxHeader' style="background-image: url('{{$bg??asset('upload/images/'.$data->area->name.'.'.$data->part.'.jpg')}}')">
<div class="{{gfx()['container']}}">
<h1>
{{$title}}
</h1>
<h2>
{{$subtitle}}
</h2>
</div>
</header>

@ -0,0 +1,10 @@
{
"name": "ParallaxHeader",
"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,33 @@
<?php
namespace Resources\Views\Segments;
use App\Models\Part;
use App\Models\Setting;
use Illuminate\Support\Facades\File;
class ParallaxHeader
{
public static function onAdd(Part $part = null)
{
$setting = new Setting();
$setting->section = 'theme';
$setting->key = $part->area->name . '_' . $part->part.'_jpg';
$setting->value = null;
$setting->type = 'FILE';
$setting->size = 6;
$setting->title = $part->area->name . ' ' . $part->part.' default image';
$setting->save();
File::copy(__DIR__.'/../../default-assets/bg.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.'_jpg')->first()?->delete();
}
public static function onMount(Part $part = null)
{
return $part;
}
}

@ -0,0 +1,13 @@
.ParallaxHeader {
background-size: cover;
background-attachment: fixed;
height: 250px;
color: var(--xshop-diff);
display: flex;
align-items: center;
justify-content: center;
h2{
opacity: .4;
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 37 KiB

@ -0,0 +1,10 @@
<header class='SimpleHeader'>
<div class="{{gfx()['container']}}">
<h1>
{{$title}}
</h1>
<h2>
{{$subtitle}}
</h2>
</div>
</header>

@ -0,0 +1,10 @@
{
"name": "SimpleHeader",
"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,21 @@
<?php
namespace Resources\Views\Segments;
use App\Models\Part;
class SimpleHeader
{
public static function onAdd(Part $part = null)
{
}
public static function onRemove(Part $part = null)
{
}
public static function onMount(Part $part = null)
{
return $part;
}
}

@ -0,0 +1,48 @@
.SimpleHeader {
overflow: hidden;
position: relative;
background: var(--xshop-background);
border-bottom: 2px solid var(--xshop-primary);;
.container, .container-fluid {
padding: 3rem;
position: relative;
h1{
color: var(--xshop-primary);
font-weight: 200;
}
h2{
opacity: .3;
position: absolute;
top: 35%;
inset-inline-end: 10%;
font-weight: 300;
}
}
&:after {
content:' ';
width: 25vw;
height: 25vw;
background: var(--xshop-primary);
position: absolute;
top: -10vw;
border-radius: 50%;
inset-inline-end: 10%;
opacity: .3;
}
}
/*-1000px width*/
@media (max-width: 1000px) {
.SimpleHeader{
&:after{
height: 24vh;
width: 25vh;
}
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

@ -2,6 +2,7 @@ import L from 'leaflet';
var map,marker ;
window.addEventListener('load',function () {
const lat = parseFloat(document.querySelector('#maplat').value);
const lng = parseFloat(document.querySelector('#maplng').value);
const zoom = parseInt(document.querySelector('#mapzoom').value);

@ -1,9 +1,12 @@
main{
padding-top: 47px;
}
#AplMenu {
position: fixed;
left: 0;
top: 0;
right: 0;
z-index: 99;
z-index: 9999;
background: #434344;
transition: 200ms;

@ -3,9 +3,12 @@
use Illuminate\Support\Facades\Artisan;
use Illuminate\Support\Facades\Route;
Route::get('/', function () {
$area = 'index';
return view('welcome',compact('area'));
$title = config('app.name');
$subtitle = getSetting('subtitle');
return view('welcome',compact('area','title','subtitle'));
})->name('welcome')->middleware(\App\Http\Middleware\VisitorCounter::class);
Auth::routes(['register' => false]);

Loading…
Cancel
Save