added ParallaxHeaderPin theme part

fixed some ui bugs
pull/49/head
A1Gard 5 months ago
parent cbb392e7be
commit c902d89da7

Binary file not shown.

Before

Width:  |  Height:  |  Size: 37 KiB

After

Width:  |  Height:  |  Size: 260 KiB

@ -0,0 +1,13 @@
<header class='ParallaxHeaderPin' 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 class="fake-container">
&nbsp;
</div>
</div>
</header>

@ -0,0 +1,10 @@
{
"name": "ParallaxHeaderPin",
"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,34 @@
<?php
namespace Resources\Views\Segments;
use App\Models\Part;
use App\Models\Setting;
use Illuminate\Support\Facades\File;
class ParallaxHeaderPin
{
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,21 @@
.ParallaxHeaderPin {
background-size: cover;
background-attachment: fixed;
height: 270px;
color: var(--xshop-diff);
padding-top: 3rem;
overflow: hidden;
h2{
opacity: .4;
margin-bottom: 3rem;
}
.fake-container{
background: var(--xshop-background);
border-radius: var(--xshop-border-radius);
border-bottom-right-radius: 0;
border-bottom-left-radius: 0;
height: 100px;
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 187 KiB

@ -9,5 +9,4 @@
margin-top: 2rem;
}
margin-bottom: 1rem;
}

@ -10,5 +10,4 @@
margin-top: 2rem;
}
margin-bottom: 1rem;
}

@ -3,5 +3,5 @@
background-size: cover;
background-attachment: fixed;
height: 350px;
color: invert($xshop-text);
color: var(--xshop-diff);
}

Loading…
Cancel
Save