added simple text

added invert outline btn
pull/44/head
A1Gard 6 months ago
parent b99a6b420a
commit b9944a2e2d

@ -28,7 +28,7 @@ class AreaSeeder extends Seeder
'valid_segments' => json_encode(
["top","slider","header","footer","menu",
"parallax","other","posts","products","attachments"
,"groups","categories","category","group"]
,"groups","categories","category","group","index"]
),
'max' => 10,
'icon' => 'ri-layout-top-2-line',

@ -6,3 +6,4 @@ import "../views/segments/preloader/PreloaderCircle/PreloaderCircle.js";
import "../views/segments/top/TopSimple/TopSimple.js";
import "../views/segments/slider/SliderSimple/SliderSimple.js";
import "../views/segments/posts/PostsIconSimple/PostsIconSimple.js";
import "../views/segments/index/GradientTextLink/GradientTextLink.js";

@ -66,3 +66,13 @@ a,a:visited{
background: darken($xshop-secondary,10); ;
}
}
.btn-outline-invert{
border-color: $xshop-diff;
color: $xshop-diff;
&:hover{
background: $xshop-diff;
color: $xshop-primary;
}
}

@ -1,19 +1,19 @@
// PLEASE DO NOT EDIT THIS FILE,
// IF YOU WANT ADD ANY CODE CREATE NEW SCSS INTO client-custom
$xshop-background:#eeeeee;
$xshop-background:#ffffff;
$xshop-primary:#6e0000;
$xshop-diff:#ffffff;
$xshop-secondary:#ff0000;
$xshop-text:#111111;
$xshop-border-radius:7px;
$xshop-border-radius:6px;
$xshop-shadow:2px 2px 4px #777777;
:root{
--xshop-background:#eeeeee;
--xshop-background:#ffffff;
--xshop-primary:#6e0000;
--xshop-diff:#ffffff;
--xshop-secondary:#ff0000;
--xshop-text:#111111;
--xshop-border-radius:7px;
--xshop-border-radius:6px;
--xshop-shadow:2px 2px 4px #777777;
}
@ -24,3 +24,4 @@ $xshop-shadow:2px 2px 4px #777777;
@import "../views/segments/top/TopSimple/TopSimple";
@import "../views/segments/slider/SliderSimple/SliderSimple";
@import "../views/segments/posts/PostsIconSimple/PostsIconSimple";
@import "../views/segments/index/GradientTextLink/GradientTextLink";

@ -0,0 +1,10 @@
<section class='SimpleTextLink py-4'>
<div class="{{gfx()['container']}} py-4 text-center">
<h1>
{{getSetting($data->area->name.'_'.$data->part.'_title')}}
</h1>
<a class="btn btn-outline-invert" href="{{getSetting($data->area->name.'_'.$data->part.'_link')}}">
{{getSetting($data->area->name.'_'.$data->part.'_btn')}}
</a>
</div>
</section>

@ -0,0 +1,10 @@
{
"name": "SimpleTextLink",
"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,50 @@
<?php
namespace Resources\Views\Segments;
use App\Models\Part;
use App\Models\Setting;
class SimpleTextLink
{
public static function onAdd(Part $part = null)
{
$setting = new Setting();
$setting->section = 'theme';
$setting->key = $part->area->name . '_' . $part->part.'_title';
$setting->value = 'Lorem ipsum dolor sit amet, consectetur adipisicing elit. A adipisci aliquid aspernatur, commodi corporis cupiditate';
$setting->type = 'TEXT';
$setting->size = 4;
$setting->title = $part->area->name . ' ' . $part->part .' title';
$setting->save();
$setting = new Setting();
$setting->section = 'theme';
$setting->key = $part->area->name . '_' . $part->part.'_btn';
$setting->value = 'Shop';
$setting->type = 'TEXT';
$setting->size = 4;
$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 = 4;
$setting->title = $part->area->name . ' ' . $part->part .' button link';
$setting->save();
}
public static function onRemove(Part $part = null)
{
Setting::where('key',$part->area->name . '_' . $part->part.'_btn')->first()?->delete();
Setting::where('key',$part->area->name . '_' . $part->part.'_title')->first()?->delete();
Setting::where('key',$part->area->name . '_' . $part->part.'_link')->first()?->delete();
}
public static function onMount(Part $part = null)
{
return $part;
}
}

@ -0,0 +1,14 @@
.SimpleTextLink {
// scss
background: $xshop-primary;
color: $xshop-diff;
h1{
font-size: 24px;
margin-bottom: 2rem;
margin-top: 2rem;
}
margin-bottom: 1rem;
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

Loading…
Cancel
Save