added natalia theme part

pull/49/head
A1Gard 1 month ago
parent f906151be3
commit 122f89b881

Binary file not shown.

After

Width:  |  Height:  |  Size: 615 KiB

@ -0,0 +1,27 @@
<section class='NataliaCategories'>
<div class="{{gfx()['container']}}">
<div class="row nata-content">
<div class="col-md-6 pt-5 slider-content">
<h1>
{{getSetting($data->area_name.'_'.$data->part.'_title')}}
</h1>
<h2>
{{getSetting($data->area_name.'_'.$data->part.'_subtitle')}}
</h2>
<ul>
@foreach(getCategorySubCatsBySetting($data->area_name.'_'.$data->part.'_category') as $category)
<li>
<a href="{{$category->webUrl()}}">
<img src="{{$category->svgUrl()}}" alt="{{$category->name}}" class="mx-2">
{{$category->name}}
</a>
</li>
@endforeach
</ul>
</div>
<div class="col-md-6 nata-bg"
style="background-image: url('{{$bg??asset('upload/images/'.$part->area_name . '.' . $part->part.'.webp')}}')">
</div>
</div>
</div>
</section>

@ -0,0 +1,10 @@
{
"name": "NataliaCategories",
"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,67 @@
<?php
namespace Resources\Views\Segments;
use App\Models\Category;
use App\Models\Part;
use App\Models\Setting;
use Illuminate\Support\Facades\File;
class NataliaCategories
{
public static function onAdd(Part $part = null)
{
$setting = new Setting();
$setting->section = 'theme';
$setting->key = $part->area_name . '_' . $part->part.'_category';
$setting->value = Category::first()->id;
$setting->type = 'CATEGORY';
$setting->size = 6;
$setting->title = $part->area_name . ' ' . $part->part .' second category';
$setting->save();
$setting = new Setting();
$setting->section = 'theme';
$setting->key = $part->area_name . '_' . $part->part.'_title';
$setting->value = 'Modern categories';
$setting->type = 'TEXT';
$setting->size = 6;
$setting->title = $part->area_name . ' ' . $part->part .' modern categories title';
$setting->save();
$setting = new Setting();
$setting->section = 'theme';
$setting->key = $part->area_name . '_' . $part->part.'_subtitle';
$setting->value = 'Lorem ipsum dolor sit amet, consectetur adipisicing elit';
$setting->type = 'TEXT';
$setting->size = 12;
$setting->title = $part->area_name . ' ' . $part->part .' modern categories subtitle';
$setting->save();
$setting = new Setting();
$setting->section = 'theme';
$setting->key = $part->area_name . '_' . $part->part.'_webp';
$setting->value = null;
$setting->type = 'FILE';
$setting->size = 12;
$setting->title = $part->area_name . ' ' . $part->part.' background pattern image';
$setting->save();
File::copy(__DIR__.'/../../default-assets/woman-transparent.webp',public_path('upload/images/').$part->area_name . '.' . $part->part.'.webp');
}
public static function onRemove(Part $part = null)
{
Setting::where('key',$part->area_name . '_' . $part->part.'_title')->first()?->delete();
Setting::where('key',$part->area_name . '_' . $part->part.'_subtitle')->first()?->delete();
Setting::where('key',$part->area_name . '_' . $part->part.'_webp')->first()?->delete();
Setting::where('key',$part->area_name . '_' . $part->part.'_category')->first()?->delete();
}
public static function onMount(Part $part = null)
{
return $part;
}
}

@ -0,0 +1,44 @@
.NataliaCategories {
// scss
direction: ltr;
.nata-bg{
background-repeat: no-repeat;
background-size: 100% auto;
position: relative;
top: -3rem;
padding-bottom: 5rem;
margin-bottom: -3rem;
*{
opacity: 0;
}
}
h1{
font-size: 29px;
margin-bottom: 2rem;
}
h2{
font-size: 19px;
font-weight: 400;
margin-bottom: 2rem;
}
.nata-content{
ul{
margin-bottom: 4rem;
list-style: none;
li{
padding: .5rem;
img{
width: 35px;
padding: 4px;
display: inline-block;
background: var(--xshop-secondary);
border-radius: 50%;
}
}
}
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 267 KiB

@ -41,7 +41,7 @@ class LoginPatternBg
$setting->title = $part->area_name . ' ' . $part->part.' background pattern image';
$setting->save();
File::copy(__DIR__.'/../../default-assets/pattern.png',public_path('upload/images/').$part->area_name . '.' . $part->part.'.jpg');
File::copy(__DIR__.'/../../default-assets/pattern.png',public_path('upload/images/').$part->area_name . '.' . $part->part.'.png');
}
public static function onRemove(Part $part = null)
{

Loading…
Cancel
Save