added login pattern bg background

added simple pattern
removed card from theme part
master
A1Gard 2 months ago
parent 1edd5b1202
commit daa50de251

@ -184,16 +184,16 @@ class AreaSeeder extends Seeder
// 'preview' => 'client.groups', // 'preview' => 'client.groups',
// 'icon' => 'ri-book-shelf-line', // 'icon' => 'ri-book-shelf-line',
// ], // ],
[ // [
'name' => 'card', // 'name' => 'card',
'valid_segments' => json_encode( // 'valid_segments' => json_encode(
["top", "header", "footer", "menu", // ["top", "header", "footer", "menu",
"parallax", "other", "card", "ads"] // "parallax", "other", "card", "ads"]
), // ),
'max' => 6, // 'max' => 6,
'preview' => 'client.card', // 'preview' => 'client.card',
'icon' => 'ri-shopping-cart-2-line', // 'icon' => 'ri-shopping-cart-2-line',
], // ],
[ [
'name' => 'login', 'name' => 'login',
'valid_segments' => json_encode( 'valid_segments' => json_encode(

@ -5,6 +5,7 @@ function isValidMobile(p) {
return regex.test(p); return regex.test(p);
} }
document.addEventListener('DOMContentLoaded', function () { document.addEventListener('DOMContentLoaded', function () {
document.querySelector('#send-auth-code')?.addEventListener('click', async function () { document.querySelector('#send-auth-code')?.addEventListener('click', async function () {
let url = this.getAttribute('data-route'); let url = this.getAttribute('data-route');

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

@ -0,0 +1,333 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
width="612.23602"
height="361.23599"
viewBox="0 0 161.98714 95.577625"
version="1.1"
id="svg5"
inkscape:export-filename="bitmap.png"
inkscape:export-xdpi="96"
inkscape:export-ydpi="96"
inkscape:version="1.2.2 (b0a8486541, 2022-12-01)"
sodipodi:docname="pattern.svg"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg">
<sodipodi:namedview
id="namedview7"
pagecolor="#ffffff"
bordercolor="#000000"
borderopacity="0.25"
inkscape:showpageshadow="2"
inkscape:pageopacity="0.0"
inkscape:pagecheckerboard="0"
inkscape:deskcolor="#d1d1d1"
inkscape:document-units="mm"
showgrid="false"
showguides="true"
inkscape:zoom="0.70710678"
inkscape:cx="-61.51829"
inkscape:cy="281.4285"
inkscape:window-width="1920"
inkscape:window-height="1020"
inkscape:window-x="1360"
inkscape:window-y="32"
inkscape:window-maximized="1"
inkscape:current-layer="layer1">
<sodipodi:guide
position="88.781269,31.095503"
orientation="0,-1"
id="guide949"
inkscape:locked="false" />
<sodipodi:guide
position="36.512412,237.92395"
orientation="0,-1"
id="guide1849"
inkscape:locked="false" />
</sodipodi:namedview>
<defs
id="defs2" />
<g
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1">
<g
id="g1121"
transform="translate(-0.28127818,-32.853066)">
<g
id="g981">
<path
sodipodi:type="star"
style="fill:none;stroke:#454545;stroke-width:1.8;stroke-dasharray:none;stroke-opacity:1"
id="path117"
inkscape:flatsided="false"
sodipodi:sides="3"
sodipodi:cx="35.548"
sodipodi:cy="36.197144"
sodipodi:r1="31.113907"
sodipodi:r2="31.113907"
sodipodi:arg1="0.52359878"
sodipodi:arg2="1.5707963"
inkscape:rounded="0"
inkscape:randomized="0"
d="M 62.493434,51.754097 35.548001,67.31105 8.6025665,51.754097 8.6025662,20.640191 35.548,5.0832367 62.493434,20.640189 Z"
transform="translate(-7.3829908,-4.0140098)" />
<path
sodipodi:type="star"
style="fill:none;stroke:#454545;stroke-width:1.8;stroke-dasharray:none;stroke-opacity:1"
id="path117-3"
inkscape:flatsided="false"
sodipodi:sides="3"
sodipodi:cx="35.548"
sodipodi:cy="36.197144"
sodipodi:r1="31.113907"
sodipodi:r2="31.113907"
sodipodi:arg1="0.52359878"
sodipodi:arg2="1.5707963"
inkscape:rounded="0"
inkscape:randomized="0"
d="M 62.493434,51.754097 35.548001,67.31105 8.6025665,51.754097 8.6025662,20.640191 35.548,5.0832367 62.493434,20.640189 Z"
transform="translate(46.712312,-3.878481)" />
<path
sodipodi:type="star"
style="fill:none;stroke:#454545;stroke-width:1.8;stroke-dasharray:none;stroke-opacity:1"
id="path117-6"
inkscape:flatsided="false"
sodipodi:sides="3"
sodipodi:cx="35.548"
sodipodi:cy="36.197144"
sodipodi:r1="31.113907"
sodipodi:r2="31.113907"
sodipodi:arg1="0.52359878"
sodipodi:arg2="1.5707963"
inkscape:rounded="0"
inkscape:randomized="0"
d="M 62.493434,51.754097 35.548001,67.31105 8.6025665,51.754097 8.6025662,20.640191 35.548,5.0832367 62.493434,20.640189 Z"
transform="translate(100.5346,-3.8409869)" />
<path
sodipodi:type="star"
style="fill:none;stroke:#454545;stroke-width:1.8;stroke-dasharray:none;stroke-opacity:1"
id="path117-7"
inkscape:flatsided="false"
sodipodi:sides="3"
sodipodi:cx="35.548"
sodipodi:cy="36.197144"
sodipodi:r1="31.113907"
sodipodi:r2="31.113907"
sodipodi:arg1="0.52359878"
sodipodi:arg2="1.5707963"
inkscape:rounded="0"
inkscape:randomized="0"
d="M 62.493434,51.754097 35.548001,67.31105 8.6025665,51.754097 8.6025662,20.640191 35.548,5.0832367 62.493434,20.640189 Z"
transform="translate(154.64223,-3.9981805)" />
</g>
<g
id="g981-5"
transform="translate(-27.189924,46.503533)">
<path
sodipodi:type="star"
style="fill:none;stroke:#454545;stroke-width:1.8;stroke-dasharray:none;stroke-opacity:1"
id="path117-35"
inkscape:flatsided="false"
sodipodi:sides="3"
sodipodi:cx="35.548"
sodipodi:cy="36.197144"
sodipodi:r1="31.113907"
sodipodi:r2="31.113907"
sodipodi:arg1="0.52359878"
sodipodi:arg2="1.5707963"
inkscape:rounded="0"
inkscape:randomized="0"
d="M 62.493434,51.754097 35.548001,67.31105 8.6025665,51.754097 8.6025662,20.640191 35.548,5.0832367 62.493434,20.640189 Z"
transform="translate(-7.3829908,-4.0140098)" />
<path
sodipodi:type="star"
style="fill:none;stroke:#454545;stroke-width:1.8;stroke-dasharray:none;stroke-opacity:1"
id="path117-3-6"
inkscape:flatsided="false"
sodipodi:sides="3"
sodipodi:cx="35.548"
sodipodi:cy="36.197144"
sodipodi:r1="31.113907"
sodipodi:r2="31.113907"
sodipodi:arg1="0.52359878"
sodipodi:arg2="1.5707963"
inkscape:rounded="0"
inkscape:randomized="0"
d="M 62.493434,51.754097 35.548001,67.31105 8.6025665,51.754097 8.6025662,20.640191 35.548,5.0832367 62.493434,20.640189 Z"
transform="translate(46.712312,-3.878481)" />
<path
sodipodi:type="star"
style="fill:none;stroke:#454545;stroke-width:1.8;stroke-dasharray:none;stroke-opacity:1"
id="path117-6-2"
inkscape:flatsided="false"
sodipodi:sides="3"
sodipodi:cx="35.548"
sodipodi:cy="36.197144"
sodipodi:r1="31.113907"
sodipodi:r2="31.113907"
sodipodi:arg1="0.52359878"
sodipodi:arg2="1.5707963"
inkscape:rounded="0"
inkscape:randomized="0"
d="M 62.493434,51.754097 35.548001,67.31105 8.6025665,51.754097 8.6025662,20.640191 35.548,5.0832367 62.493434,20.640189 Z"
transform="translate(100.5346,-3.8409869)" />
<path
sodipodi:type="star"
style="fill:none;stroke:#454545;stroke-width:1.8;stroke-dasharray:none;stroke-opacity:1"
id="path117-7-9"
inkscape:flatsided="false"
sodipodi:sides="3"
sodipodi:cx="35.548"
sodipodi:cy="36.197144"
sodipodi:r1="31.113907"
sodipodi:r2="31.113907"
sodipodi:arg1="0.52359878"
sodipodi:arg2="1.5707963"
inkscape:rounded="0"
inkscape:randomized="0"
d="M 62.493434,51.754097 35.548001,67.31105 8.6025665,51.754097 8.6025662,20.640191 35.548,5.0832367 62.493434,20.640189 Z"
transform="translate(154.64223,-3.9981805)" />
</g>
<g
id="g981-1"
transform="translate(-0.07139972,92.963694)">
<path
sodipodi:type="star"
style="fill:none;stroke:#454545;stroke-width:1.8;stroke-dasharray:none;stroke-opacity:1"
id="path117-2"
inkscape:flatsided="false"
sodipodi:sides="3"
sodipodi:cx="35.548"
sodipodi:cy="36.197144"
sodipodi:r1="31.113907"
sodipodi:r2="31.113907"
sodipodi:arg1="0.52359878"
sodipodi:arg2="1.5707963"
inkscape:rounded="0"
inkscape:randomized="0"
d="M 62.493434,51.754097 35.548001,67.31105 8.6025665,51.754097 8.6025662,20.640191 35.548,5.0832367 62.493434,20.640189 Z"
transform="translate(-7.3829908,-4.0140098)" />
<path
sodipodi:type="star"
style="fill:none;stroke:#454545;stroke-width:1.8;stroke-dasharray:none;stroke-opacity:1"
id="path117-3-7"
inkscape:flatsided="false"
sodipodi:sides="3"
sodipodi:cx="35.548"
sodipodi:cy="36.197144"
sodipodi:r1="31.113907"
sodipodi:r2="31.113907"
sodipodi:arg1="0.52359878"
sodipodi:arg2="1.5707963"
inkscape:rounded="0"
inkscape:randomized="0"
d="M 62.493434,51.754097 35.548001,67.31105 8.6025665,51.754097 8.6025662,20.640191 35.548,5.0832367 62.493434,20.640189 Z"
transform="translate(46.712312,-3.878481)" />
<path
sodipodi:type="star"
style="fill:none;stroke:#454545;stroke-width:1.8;stroke-dasharray:none;stroke-opacity:1"
id="path117-6-0"
inkscape:flatsided="false"
sodipodi:sides="3"
sodipodi:cx="35.548"
sodipodi:cy="36.197144"
sodipodi:r1="31.113907"
sodipodi:r2="31.113907"
sodipodi:arg1="0.52359878"
sodipodi:arg2="1.5707963"
inkscape:rounded="0"
inkscape:randomized="0"
d="M 62.493434,51.754097 35.548001,67.31105 8.6025665,51.754097 8.6025662,20.640191 35.548,5.0832367 62.493434,20.640189 Z"
transform="translate(100.5346,-3.8409869)" />
<path
sodipodi:type="star"
style="fill:none;stroke:#454545;stroke-width:1.8;stroke-dasharray:none;stroke-opacity:1"
id="path117-7-93"
inkscape:flatsided="false"
sodipodi:sides="3"
sodipodi:cx="35.548"
sodipodi:cy="36.197144"
sodipodi:r1="31.113907"
sodipodi:r2="31.113907"
sodipodi:arg1="0.52359878"
sodipodi:arg2="1.5707963"
inkscape:rounded="0"
inkscape:randomized="0"
d="M 62.493434,51.754097 35.548001,67.31105 8.6025665,51.754097 8.6025662,20.640191 35.548,5.0832367 62.493434,20.640189 Z"
transform="translate(154.64223,-3.9981805)" />
</g>
<g
id="g981-6"
transform="translate(-27.292695,139.2849)">
<path
sodipodi:type="star"
style="fill:none;stroke:#454545;stroke-width:1.8;stroke-dasharray:none;stroke-opacity:1"
id="path117-0"
inkscape:flatsided="false"
sodipodi:sides="3"
sodipodi:cx="35.548"
sodipodi:cy="36.197144"
sodipodi:r1="31.113907"
sodipodi:r2="31.113907"
sodipodi:arg1="0.52359878"
sodipodi:arg2="1.5707963"
inkscape:rounded="0"
inkscape:randomized="0"
d="M 62.493434,51.754097 35.548001,67.31105 8.6025665,51.754097 8.6025662,20.640191 35.548,5.0832367 62.493434,20.640189 Z"
transform="translate(-7.3829908,-4.0140098)" />
<path
sodipodi:type="star"
style="fill:none;stroke:#454545;stroke-width:1.8;stroke-dasharray:none;stroke-opacity:1"
id="path117-3-62"
inkscape:flatsided="false"
sodipodi:sides="3"
sodipodi:cx="35.548"
sodipodi:cy="36.197144"
sodipodi:r1="31.113907"
sodipodi:r2="31.113907"
sodipodi:arg1="0.52359878"
sodipodi:arg2="1.5707963"
inkscape:rounded="0"
inkscape:randomized="0"
d="M 62.493434,51.754097 35.548001,67.31105 8.6025665,51.754097 8.6025662,20.640191 35.548,5.0832367 62.493434,20.640189 Z"
transform="translate(46.712312,-3.878481)" />
<path
sodipodi:type="star"
style="fill:none;stroke:#454545;stroke-width:1.8;stroke-dasharray:none;stroke-opacity:1"
id="path117-6-6"
inkscape:flatsided="false"
sodipodi:sides="3"
sodipodi:cx="35.548"
sodipodi:cy="36.197144"
sodipodi:r1="31.113907"
sodipodi:r2="31.113907"
sodipodi:arg1="0.52359878"
sodipodi:arg2="1.5707963"
inkscape:rounded="0"
inkscape:randomized="0"
d="M 62.493434,51.754097 35.548001,67.31105 8.6025665,51.754097 8.6025662,20.640191 35.548,5.0832367 62.493434,20.640189 Z"
transform="translate(100.5346,-3.8409869)" />
<path
sodipodi:type="star"
style="fill:none;stroke:#454545;stroke-width:1.8;stroke-dasharray:none;stroke-opacity:1"
id="path117-7-1"
inkscape:flatsided="false"
sodipodi:sides="3"
sodipodi:cx="35.548"
sodipodi:cy="36.197144"
sodipodi:r1="31.113907"
sodipodi:r2="31.113907"
sodipodi:arg1="0.52359878"
sodipodi:arg2="1.5707963"
inkscape:rounded="0"
inkscape:randomized="0"
d="M 62.493434,51.754097 35.548001,67.31105 8.6025665,51.754097 8.6025662,20.640191 35.548,5.0832367 62.493434,20.640189 Z"
transform="translate(154.64223,-3.9981805)" />
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 13 KiB

@ -1,4 +1,4 @@
<section id='LoginBigBg' <section id='LoginBigBg' class="content"
style="background-image: url('{{asset('upload/images/'.$data->area->name.'.'.$data->part.'.jpg')}}')"> style="background-image: url('{{asset('upload/images/'.$data->area->name.'.'.$data->part.'.jpg')}}')">
<form @if(!config('app.sign.sms')) action="{{route('client.sign-in-do')}}" @endif id="login-form" method="post"> <form @if(!config('app.sign.sms')) action="{{route('client.sign-in-do')}}" @endif id="login-form" method="post">
@csrf @csrf

@ -23,6 +23,7 @@ class LoginBigBg
} }
public static function onRemove(Part $part = null) 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) public static function onMount(Part $part = null)

@ -0,0 +1,59 @@
<section id='LoginPatternBg' class="content"
>
<div id="login-container"
style="background-image: url('{{asset('upload/images/'.$data->area->name.'.'.$data->part.'.jpg')}}')">
<form @if(!config('app.sign.sms')) action="{{route('client.sign-in-do')}}" @endif id="login-form" method="post">
@csrf
<h3>
{{$subtitle}}
</h3>
<div class="text-start">
@include('components.err')
</div>
<div id="login-content">
@if(!config('app.sign.sms'))
<label>
{{__("Email")}}
</label>
<input type="email" class="form-control" placeholder="{{__("Email")}}" name="email"
value="{{old('email')}}">
<label class="mt-2">
{{__("Password")}}
</label>
<input type="password" class="form-control" placeholder="{{__('Password')}}" name="password">
<button class="btn btn-outline-primary w-100 mt-3">
{{__("Sign-in")}}
</button>
@else
<label>
{{__("Mobile")}}
</label>
<input type="tel" maxlength="12" class="form-control text-center"
id="tel" placeholder="{{__("09xxxxxxxx")}}">
<div class="not-send">
<label>
{{__("Auth code")}}
</label>
<input type="tel" maxlength="5" minlength="5" id="auth" class="form-control text-center"
placeholder="xxxxx">
<button type="button" class="btn btn-outline-primary w-100 mt-3"
id="send-auth-check" data-route="{{route('client.check-auth')}}"
data-profile="{{route('client.profile')}}">
{{__("Check authenticate code")}}
</button>
</div>
<div class="sent">
<button type="button" class="btn btn-outline-primary w-100 mt-3"
id="send-auth-code" data-route="{{route('client.send-sms')}}">
{{__("Send authenticate code")}}
</button>
</div>
@endif
</div>
</form>
</div>
</section>

@ -0,0 +1,10 @@
{
"name": "LoginPatternBg",
"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,57 @@
<?php
namespace Resources\Views\Segments;
use App\Models\Part;
use App\Models\Setting;
use Illuminate\Support\Facades\File;
class LoginPatternBg
{
public static function onAdd(Part $part = null)
{
$setting = new Setting();
$setting->section = 'theme';
$setting->key = $part->area->name . '_' . $part->part.'_color1';
$setting->value = gfx()['primary'];
$setting->type = 'COLOR';
$setting->data = json_encode(['name' => 'login-bg-color-1']);
$setting->size = 6;
$setting->title = $part->area->name . ' ' . $part->part .' second gradiant color 1';
$setting->save();
$setting = new Setting();
$setting->section = 'theme';
$setting->key = $part->area->name . '_' . $part->part.'_color2';
$setting->value = gfx()['secondary'];
$setting->data = json_encode(['name' => 'login-bg-color-2']);
$setting->type = 'COLOR';
$setting->size = 6;
$setting->title = $part->area->name . ' ' . $part->part .' second gradiant color 2';
$setting->save();
$setting = new Setting();
$setting->section = 'theme';
$setting->key = $part->area->name . '_' . $part->part.'_png';
$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/pattern.png',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.'_png')->first()?->delete();
Setting::where('key',$part->area->name . '_' . $part->part.'_color1')->first()?->delete();
Setting::where('key',$part->area->name . '_' . $part->part.'_color2')->first()?->delete();
}
public static function onMount(Part $part = null)
{
return $part;
}
}

@ -0,0 +1,31 @@
#LoginPatternBg {
background: linear-gradient(180deg, var(--login-bg-color-1) 0%, var(--login-bg-color-2) 100%);
//background-size: cover;
//background-position: center;
#login-container{
height: 90vh;
display: flex;
align-items: center;
justify-content: center;
text-align: center;
background-position: center;
}
#login-form{
max-width: 90%;
width: 450px;
}
#login-content{
text-align: start;
padding: 1rem;
background: #ffffff99;
backdrop-filter: blur(4px);
border-radius: var(--xshop-border-radius);
}
.not-send{
display: none;
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 201 KiB

Loading…
Cancel
Save