fixed some problem

optimize default theme
pull/22/head
A1Gard 11 months ago
parent 11bcfe5d5a
commit 9bcfb990e6

@ -9,6 +9,7 @@ use App\Models\Setting;
use Conner\Tagging\Model\Tag; use Conner\Tagging\Model\Tag;
use Illuminate\Http\Request; use Illuminate\Http\Request;
use Xmen\StarterKit\Models\Category; use Xmen\StarterKit\Models\Category;
use Xmen\StarterKit\Models\MenuItem;
use Xmen\StarterKit\Models\Post; use Xmen\StarterKit\Models\Post;
class SettingController extends Controller class SettingController extends Controller
@ -124,4 +125,9 @@ class SettingController extends Controller
$query = trim($query); $query = trim($query);
return Post::where('title', 'LIKE', "%$query%")->limit(5)->get(['id', 'title'])->toArray(); return Post::where('title', 'LIKE', "%$query%")->limit(5)->get(['id', 'title'])->toArray();
} }
public function remMenu($id){
MenuItem::where('menuable_id',$id)->delete();
return true;
}
} }

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 MiB

After

Width:  |  Height:  |  Size: 3.2 MiB

@ -10643,7 +10643,7 @@ tr.border-bottom td {
.long-box .item { .long-box .item {
padding: 25px; /*padding: 25px;*/
} }
.fa-bg { .fa-bg {
@ -10893,6 +10893,24 @@ tr.border-bottom td {
color: white ; color: white ;
} }
#blog{
padding: 2em 0;
background: #282c34;
color:white;
}
.img-vh100-full-width img {
height: 100vh;
width: 100%;
-o-object-fit: cover;
object-fit: cover;
}
h3.textt{
font-size: 22px;
font-weight: 200;
}
@charset "UTF-8"; @charset "UTF-8";
:root { :root {
--bg: hsl(223deg, 10%, 90%); --bg: hsl(223deg, 10%, 90%);
@ -11878,3 +11896,9 @@ a {
display: none; display: none;
} }
} }
.img-vh100-full-width img {
height: 100vh;
width: 100%;
-o-object-fit: cover;
object-fit: cover;
}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

@ -1,20 +1,23 @@
jQuery(function () { jQuery(function () {
$("nav [href='" + window.location.href + "']").closest('li').addClass('current'); $("nav [href='" + window.location.href + "']").closest('li').addClass('current');
// console.log( // console.log(
setTimeout(function () { setTimeout(function () {
if ($("nav .current").closest('.main-nav').find('> a').attr('href') == undefined){ if ($("nav .current").closest('.main-nav').find('> a').attr('href') == undefined) {
$("nav .current").closest('.main-nav').find('> a').click(); $("nav .current").closest('.main-nav').find('> a').click();
} }
if ($("nav .current").parent().parent().hasClass('rvnm-expandable')){ if ($("nav .current").parent().parent().hasClass('rvnm-expandable')) {
$("nav .current").parent().parent().find('> a').click(); $("nav .current").parent().parent().find('> a').click();
} }
},500); }, 500);
$("#menu-manage li").bind('dblclick',function () { $("#menu-manage li").bind('dblclick', function () {
if (confirm('Are sure?')){ if (confirm('Are sure?')) {
$(this).remove(); let self = this;
} axios.post($("#rem-menu").val() + '/' + $(this).data('menuableid')).then(function () {
}); $(self).slideUp();
});
}
});
// ); // );
// $("nav .current").closest('li').click(); // $("nav .current").closest('li').click();
}); });

@ -9,9 +9,24 @@
" minutes ago": "دقیقه پیش", " minutes ago": "دقیقه پیش",
" seconds ago": "ثانیه پیش", " seconds ago": "ثانیه پیش",
" لطفا درگاه بانک را تعویض نمایید.": "", " لطفا درگاه بانک را تعویض نمایید.": "",
"!": "",
"!bulk": "کار گروهی",
"!delete": "حذف",
"!destroy": "حذف",
"!manage": "مدیریت",
"!reply": "پاسخ",
"!show": "نمایش",
"!sort": "دیدن ترتیب",
"!sortStore": "ذخیره ترتیب",
"!statue": "تغییر وضعیت",
"!store": "ایجاد کردن",
"!update": "ویرایش کردن",
"!updatetitle": "ویرایش عنوان",
"!user": "کاربر",
"$log->action": "", "$log->action": "",
":app Dear customer Your :product signed for you.": ":app\nکاربر گرامی محصول «:product» برای شما ثبت شد.", ":app Dear customer Your :product signed for you.": ":app\nکاربر گرامی محصول «:product» برای شما ثبت شد.",
"A fresh verification link has been sent to your email address.": "یک لینک تاییده برای شما ایمیل شد", "A fresh verification link has been sent to your email address.": "یک لینک تاییده برای شما ایمیل شد",
"ACL": "سطح دسترسی",
"ANSWERED": "پاسخ‌ داده شده", "ANSWERED": "پاسخ‌ داده شده",
"Action": "عملیات", "Action": "عملیات",
"Actions": "عملیات", "Actions": "عملیات",
@ -150,6 +165,7 @@
"Discounts list": "فهرست تخفیف‌ها", "Discounts list": "فهرست تخفیف‌ها",
"Do": "انجام", "Do": "انجام",
"Double click on image to change index image": "دوبار کلیک کنید تا عکس اصلی انتخاب شود", "Double click on image to change index image": "دوبار کلیک کنید تا عکس اصلی انتخاب شود",
"Double click to remove": "برای حذف دابل کلیک کنید",
"Draft": "پیش‌نویس", "Draft": "پیش‌نویس",
"Draft now": "پیش‌نویس کن", "Draft now": "پیش‌نویس کن",
"Drafted": "پیش‌نویس شده", "Drafted": "پیش‌نویس شده",
@ -428,6 +444,7 @@
"Shopping card": "سبد خرید", "Shopping card": "سبد خرید",
"Short text": "متن کوتاه", "Short text": "متن کوتاه",
"Show": "نمایش", "Show": "نمایش",
"Show list": "دیدن فهرست",
"Signup or Login": "ورود یا ثبت‌نام", "Signup or Login": "ورود یا ثبت‌نام",
"Single Select & multi search": "انتخاب تک و جستجوی چندگانه", "Single Select & multi search": "انتخاب تک و جستجوی چندگانه",
"Single multi select type": "نوع انتخاب تکی سرچ چندگانه", "Single multi select type": "نوع انتخاب تکی سرچ چندگانه",
@ -460,6 +477,7 @@
"Text": "متن", "Text": "متن",
"Text type": "نوع نوشته", "Text type": "نوع نوشته",
"The first and\/or second image will be index image": "اولی ویا دومین عکس به عنوان شاخص در نظر گرفته می‌شوند", "The first and\/or second image will be index image": "اولی ویا دومین عکس به عنوان شاخص در نظر گرفته می‌شوند",
"The order is duplicate please check invoices list": "سفارش تکاری است لطفا لیست سفارشات خود را چک کنید",
"Thumbnail": "بند انگشتی", "Thumbnail": "بند انگشتی",
"Thursday": "پنجشنبه", "Thursday": "پنجشنبه",
"Ticket": "پشتیبانی", "Ticket": "پشتیبانی",
@ -511,6 +529,7 @@
"You can choose one or more image together": "شما می‌توانید چندین عکس را با هم انتخاب کنید", "You can choose one or more image together": "شما می‌توانید چندین عکس را با هم انتخاب کنید",
"You disliked ": "شما نپسندید اید", "You disliked ": "شما نپسندید اید",
"You don't have any credit": "شما اعتباری برای پرداخت ندارید", "You don't have any credit": "شما اعتباری برای پرداخت ندارید",
"You dont't have acccess this acction": "شما تا زمان ورود امکان دسترسی به این بخش را ندارید",
"You have got :count products in your basket, Could you complete your purchase?": " شما در سبد خد محصولاتی دارید آیا مایل به پرداخت و پایان خرید هستید؟", "You have got :count products in your basket, Could you complete your purchase?": " شما در سبد خد محصولاتی دارید آیا مایل به پرداخت و پایان خرید هستید؟",
"You liked ": "شما پسند کرده", "You liked ": "شما پسند کرده",
"You liked ago ": "شما قبلا پسند کرده اید", "You liked ago ": "شما قبلا پسند کرده اید",
@ -530,6 +549,7 @@
"action": "عمل", "action": "عمل",
"adv": "تبلیغ", "adv": "تبلیغ",
"an hour ago": "یک ساعت پیش", "an hour ago": "یک ساعت پیش",
"attachment": "پیوست",
"body": "متن", "body": "متن",
"by percent": "با درصد", "by percent": "با درصد",
"by price": "با قیمت", "by price": "با قیمت",
@ -539,16 +559,21 @@
"click here to request another": "کلیک برای ثبت درخواست دیگیر", "click here to request another": "کلیک برای ثبت درخواست دیگیر",
"clip": "کلیپ", "clip": "کلیپ",
"clip or cover not uploaded...": "کلیپ یا کاور آن بارگزاری نشده", "clip or cover not uploaded...": "کلیپ یا کاور آن بارگزاری نشده",
"comment": "دیدگاه‌ها",
"contact": "تماس با ما",
"created successfully": "با موفقیت ساخته شد", "created successfully": "با موفقیت ساخته شد",
"customer": "مشتری", "customer": "مشتری",
"deleted successfully": "با موفقیت حذف شد", "deleted successfully": "با موفقیت حذف شد",
"discount": "تخفیف", "discount": "تخفیف",
"gallery": "گالری تصاویر", "gallery": "گالری تصاویر",
"id": "آی‌دی", "id": "آی‌دی",
"image": "تصاویر",
"image deleted successfully": "تصاویر حذف شدند", "image deleted successfully": "تصاویر حذف شدند",
"images uploaded successfully": "تصاویر بارگزاری دشند", "images uploaded successfully": "تصاویر بارگزاری دشند",
"invoice": "صورتحساب", "invoice": "صورتحساب",
"invoice created successfully": "فاکتور شما با موفقیت اضافه شد", "invoice created successfully": "فاکتور شما با موفقیت اضافه شد",
"logs": "لاگ کاربران",
"menu": "منو",
"minute": "دقیقه", "minute": "دقیقه",
"name \/ email": "نام | ایمیل", "name \/ email": "نام | ایمیل",
"not Required": "غیر ضروری", "not Required": "غیر ضروری",
@ -563,36 +588,16 @@
"preview": "پیش نمایش", "preview": "پیش نمایش",
"product": "محصول", "product": "محصول",
"props": "ویژگی متا", "props": "ویژگی متا",
"question": "پرسش‌ها",
"reply": "پاسخ", "reply": "پاسخ",
"setting": "تنظیمات",
"slider": "اسلایدر", "slider": "اسلایدر",
"slider or cover not uploaded...": "تصاویر اسلایدر بارگزاری نشده...", "slider or cover not uploaded...": "تصاویر اسلایدر بارگزاری نشده...",
"ticket": "پشتیبانی",
"user": "کاربر",
"transport": "شیوه ارسال",
"transports deleted successfully": "روش ارسال با موفقیت حذف شد", "transports deleted successfully": "روش ارسال با موفقیت حذف شد",
"updated successfully": "به روز شد", "updated successfully": "به روز شد",
"weight": "وزن", "weight": "وزن",
"!show": "نمایش",
"!sortStore": "ذخیره ترتیب",
"!sort": "دیدن ترتیب",
"!delete": "حذف",
"!destroy": "حذف",
"!bulk": "کار گروهی",
"!store": "ایجاد کردن",
"!update": "ویرایش کردن",
"!manage": "مدیریت",
"!user": "کاربر",
"!statue": "تغییر وضعیت",
"!reply": "پاسخ",
"!updatetitle": "ویرایش عنوان",
"Show list": "دیدن فهرست",
"ACL": "سطح دسترسی",
"image": "تصاویر",
"menu": "منو",
"comment": "دیدگاه‌ها",
"logs": "لاگ کاربران",
"transport": "شیوه ارسال",
"question": "پرسش‌ها",
"ticket": "پشتیبانی",
"attachment": "پیوست",
"contact": "تماس با ما",
"setting": "تنظیمات",
"yesterday": "دیروز" "yesterday": "دیروز"
} }

@ -674,7 +674,7 @@ tr.border-bottom td {
.long-box .item { .long-box .item {
padding: 25px; /*padding: 25px;*/
} }
.fa-bg { .fa-bg {
@ -913,3 +913,21 @@ tr.border-bottom td {
.btn-outline-primary:hover a{ .btn-outline-primary:hover a{
color: white ; color: white ;
} }
#blog{
padding: 2em 0;
background: #282c34;
color:white;
}
.img-vh100-full-width img {
height: 100vh;
width: 100%;
-o-object-fit: cover;
object-fit: cover;
}
h3.textt{
font-size: 22px;
font-weight: 200;
}

@ -157,6 +157,16 @@ jQuery(function ($) {
items: 4, items: 4,
// nav: true, // nav: true,
}); });
$('.owl-single-item').owlCarousel({
loop: true,
margin: 0,
responsiveClass: true,
autoplay: true,
autoplayTimeout: 5000,
autoplayHoverPause: true,
items: 1,
// nav: true,
});
$('#owlx1').owlCarousel({ $('#owlx1').owlCarousel({
loop: true, loop: true,

@ -210,3 +210,11 @@ a{
} }
} }
.img-vh100-full-width{
img{
height: 100vh;
width: 100%;
object-fit: cover;
}
}

@ -5,159 +5,166 @@
@endsection @endsection
@section('content') @section('content')
@include('starter-kit::component.err') <div class="container">
<form action="{{route('admin.setting.update')}}" method="post" enctype="multipart/form-data"> @include('starter-kit::component.err')
@csrf
<ul class="list-group"> <form action="{{route('admin.setting.update')}}" method="post" enctype="multipart/form-data">
@foreach($settings as $set) @csrf
<li class="list-group-item"> <ul class="list-group">
<div class="row"> @foreach($settings as $set)
<div class="col-md-10"> <li class="list-group-item">
<div class="form-group"> <div class="row">
<label for="{{$set->key}}"> <div class="col-md-10">
{{$set->title}} <div class="form-group">
</label> <label for="{{$set->key}}">
@switch($set->type) {{$set->title}}
@case('longtext') </label>
<textarea name="{{$set->key}}" id="{{$set->key}}" class="form-control" @switch($set->type)
rows="5">{{$set->value}}</textarea> @case('longtext')
@break <textarea name="{{$set->key}}" id="{{$set->key}}" class="form-control"
@case('checkbox') rows="5">{{$set->value}}</textarea>
<div class="row"> @break
<div class="col-md"> @case('checkbox')
</div> <div class="row">
<div class="col-md"> <div class="col-md">
<label> </div>
<input type="radio" name="{{$set->key}}" <div class="col-md">
@if($set->value == 'yes') checked @endif value="yes"> <label>
{{__("Yes")}} <input type="radio" name="{{$set->key}}"
</label> @if($set->value == 'yes') checked @endif value="yes">
</div> {{__("Yes")}}
<div class="col-md"> </label>
<label> </div>
<input type="radio" name="{{$set->key}}" value="no" <div class="col-md">
@if($set->value == 'no') checked @endif> <label>
{{__("No")}} <input type="radio" name="{{$set->key}}" value="no"
</label> @if($set->value == 'no') checked @endif>
{{__("No")}}
</label>
</div>
</div> </div>
</div> @break
@break @case('code')
@case('code') <textarea dir="ltr" name="{{$set->key}}" id="{{$set->key}}"
<textarea dir="ltr" name="{{$set->key}}" id="{{$set->key}}" class="form-control" class="form-control"
rows="5">{{$set->value}}</textarea> rows="5">{{$set->value}}</textarea>
@break @break
@case('editor') @case('editor')
<textarea name="{{$set->key}}" id="{{$set->key}}" class="ckeditor form-control" <textarea name="{{$set->key}}" id="{{$set->key}}"
rows="5">{{$set->value}}</textarea> class="ckeditor form-control"
@break rows="5">{{$set->value}}</textarea>
@case('category') @break
<select name="{{$set->key}}" id="{{$set->key}}" class="form-control"> @case('category')
@foreach($cats as $cat ) <select name="{{$set->key}}" id="{{$set->key}}" class="form-control">
<option @if (old($set->key,$set->value??null) == $cat->id ) selected @foreach($cats as $cat )
@endif value="{{$cat->id }}"> {{$cat->name}} </option> <option @if (old($set->key,$set->value??null) == $cat->id ) selected
@endforeach @endif value="{{$cat->id }}"> {{$cat->name}} </option>
</select> @endforeach
@break </select>
@case('cat') @break
<select name="{{$set->key}}" id="{{$set->key}}" class="form-control"> @case('cat')
@foreach($pcats as $cat ) <select name="{{$set->key}}" id="{{$set->key}}" class="form-control">
<option @if (old($set->key,$set->value??null) == $cat->id ) selected @foreach($pcats as $cat )
@endif value="{{$cat->id }}"> {{$cat->name}} </option> <option @if (old($set->key,$set->value??null) == $cat->id ) selected
@endforeach @endif value="{{$cat->id }}"> {{$cat->name}} </option>
</select> @endforeach
@break </select>
@case('image') @break
<img src="{{asset('images/'.str_replace('_','.',$set->key))}}?{{time()}}" @case('image')
class="img-fluid" style="max-height: 150px;max-width: 45%" alt="cover"> <img src="{{asset('images/'.str_replace('_','.',$set->key))}}?{{time()}}"
<input type="file" name="pic[{{$set->key}}]" id="{{$set->key}}" class="img-fluid" style="max-height: 150px;max-width: 45%" alt="cover">
accept="image/*" <input type="file" name="pic[{{$set->key}}]" id="{{$set->key}}"
class="form-control-file"/> accept="image/*"
@break class="form-control-file"/>
@default @break
<input type="{{$set->type}}" name="{{$set->key}}" id="{{$set->key}}" @default
class="form-control" value="{{$set->value}}"/> <input type="{{$set->type}}" name="{{$set->key}}" id="{{$set->key}}"
@endswitch class="form-control" value="{{$set->value}}"/>
@endswitch
</div>
</div> </div>
<div class="col-md-2"></div>
</div> </div>
<div class="col-md-2"></div> </li>
</div> @endforeach
<li class="list-group-item">
<input type="submit" value="{{__("Save")}}" class="btn btn-primary"/>
<input type="reset" value="{{__("Reset")}}" class="btn btn-secondary"/>
</li> </li>
@endforeach </ul>
<li class="list-group-item"> </form>
<input type="submit" value="{{__("Save")}}" class="btn btn-primary"/>
<input type="reset" value="{{__("Reset")}}" class="btn btn-secondary"/>
</li>
</ul>
</form>
@if(auth()->user()->hasRole('super-admin')) @if(auth()->user()->hasRole('super-admin'))
<form class="border p-3 m-3" method="post" action="{{route('admin.setting.store')}}"> <form class="border p-3 m-3" method="post" action="{{route('admin.setting.store')}}">
<h3> <h3>
{{__("Add new setting")}} {{__("Add new setting")}}
</h3> </h3>
@csrf @csrf
<div class="row"> <div class="row">
<div class="col-md-6 mt-3"> <div class="col-md-6 mt-3">
<div class="form-group"> <div class="form-group">
<label for="section"> <label for="section">
{{__('Section')}} {{__('Section')}}
</label> </label>
<input name="section" type="text" class="form-control @error('section') is-invalid @enderror" <input name="section" type="text"
placeholder="{{__('Section')}}" value="{{old('section',$setting->section??null)}}"/> class="form-control @error('section') is-invalid @enderror"
placeholder="{{__('Section')}}" value="{{old('section',$setting->section??null)}}"/>
</div>
</div> </div>
</div> <div class="col-md-6 mt-3">
<div class="col-md-6 mt-3"> <div class="form-group">
<div class="form-group"> <label for="type">
<label for="type"> {{__('Type')}}
{{__('Type')}} </label>
</label> <select name="type" id="type" class="form-control @error('type') is-invalid @enderror">
<select name="type" id="type" class="form-control @error('type') is-invalid @enderror"> <option value="text"
<option value="text" @if (old('type') == 'text' ) selected @endif >{{__("Short text")}} </option>
@if (old('type') == 'text' ) selected @endif >{{__("Short text")}} </option> <option value="longtext"
<option value="longtext" @if (old('longtext') == 'long' ) selected @endif >{{__("Long text")}} </option>
@if (old('longtext') == 'long' ) selected @endif >{{__("Long text")}} </option> <option value="code"
<option value="code" @if (old('code') == 'code' ) selected @endif >{{__("Code")}} </option>
@if (old('code') == 'code' ) selected @endif >{{__("Code")}} </option> <option value="editor"
<option value="editor" @if (old('editor') == 'editor' ) selected @endif >{{__("Editor text")}} </option>
@if (old('editor') == 'editor' ) selected @endif >{{__("Editor text")}} </option> <option value="category"
<option value="category" @if (old('type') == 'category' ) selected @endif >{{__("Category")}} </option>
@if (old('type') == 'category' ) selected @endif >{{__("Category")}} </option> <option value="cat"
<option value="cat" @if (old('type') == 'cat' ) selected @endif >{{__("Product category")}} </option>
@if (old('type') == 'cat' ) selected @endif >{{__("Product category")}} </option> <option value="checkbox"
<option value="checkbox" @if (old('type') == 'checkbox' ) selected @endif >{{__("Checkbox")}} </option>
@if (old('type') == 'checkbox' ) selected @endif >{{__("Checkbox")}} </option> <option value="image"
<option value="image" @if (old('type') == 'image' ) selected @endif >{{__("Image")}} </option>
@if (old('type') == 'image' ) selected @endif >{{__("Image")}} </option>
</select> </select>
</div>
</div> </div>
</div> <div class="col-md-6 mt-3">
<div class="col-md-6 mt-3"> <div class="form-group">
<div class="form-group"> <label for="title">
<label for="title"> {{__('Title')}}
{{__('Title')}} </label>
</label> <input name="title" type="text" class="form-control @error('title') is-invalid @enderror"
<input name="title" type="text" class="form-control @error('title') is-invalid @enderror" placeholder="{{__('Title')}}" value="{{old('title',$setting->title??null)}}"/>
placeholder="{{__('Title')}}" value="{{old('title',$setting->title??null)}}"/> </div>
</div> </div>
</div> <div class="col-md-6 mt-3">
<div class="col-md-6 mt-3"> <div class="form-group">
<div class="form-group"> <label for="key">
<label for="key"> {{__('Key')}}
{{__('Key')}} </label>
</label> <input name="key" type="text" class="form-control @error('key') is-invalid @enderror"
<input name="key" type="text" class="form-control @error('key') is-invalid @enderror" placeholder="{{__('Key')}}" value="{{old('key',$setting->key??null)}}"/>
placeholder="{{__('Key')}}" value="{{old('key',$setting->key??null)}}"/> </div>
</div>
<div class="col-md-12">
<label> &nbsp;</label>
<input name="" type="submit" class="btn btn-primary mt-2" value="{{__('Add to setting')}}"/>
</div> </div>
</div> </div>
<div class="col-md-12"> </form>
<label> &nbsp;</label> </div>
<input name="" type="submit" class="btn btn-primary mt-2" value="{{__('Add to setting')}}"/>
</div>
</div>
</form>
@endif @endif
@endsection @endsection
@section('js-content') @section('js-content')

@ -119,6 +119,9 @@
</ol> </ol>
</div> </div>
<div class="col-md-6 p-3"> <div class="col-md-6 p-3">
<div class="alert alert-info">
{{__("Double click to remove")}}
</div>
<form class="" method="post" <form class="" method="post"
enctype="multipart/form-data" enctype="multipart/form-data"
@if (isset($menu)) @if (isset($menu))
@ -139,6 +142,7 @@
</div> </div>
<input type="hidden" id="tag-search" value="{{route('admin.ckeditor.tagsearch','')}}"/> <input type="hidden" id="tag-search" value="{{route('admin.ckeditor.tagsearch','')}}"/>
<input type="hidden" id="news-search" value="{{route('admin.ckeditor.newssearch','')}}"/> <input type="hidden" id="news-search" value="{{route('admin.ckeditor.newssearch','')}}"/>
<input type="hidden" id="rem-menu" value="{{route('admin.setting.remMenu','')}}">
</div> </div>
@endsection @endsection

@ -1,5 +1,14 @@
@extends('website.layout.layout') @extends('website.layout.layout')
@section('content') @section('content')
<section>
<div class="owl-carousel owl-theme owl-single-item">
@foreach(\Xmen\StarterKit\Models\Slider::where('active',1)->limit(5)->get() as $sld)
<a class="item img-vh100-full-width" href="{{strip_tags($sld->body)}}">
<img src="{{$sld->imgUrl()}}" alt="">
</a>
@endforeach
</div>
</section>
<section id="index-top"> <section id="index-top">
<div class="container"> <div class="container">
<div class="grid"> <div class="grid">
@ -14,7 +23,8 @@
<div class="item"> <div class="item">
<div class="box"> <div class="box">
<a href="{{route('product',$p->slug)}}"> <a href="{{route('product',$p->slug)}}">
<img src="{{$p->thumbUrl()}}" class="img-fluid" alt="{{$p->name}}" title="{{$p->name}}"> <img src="{{$p->thumbUrl()}}" class="img-fluid" alt="{{$p->name}}"
title="{{$p->name}}">
<h4> <h4>
{{$p->name}} {{$p->name}}
</h4> </h4>
@ -22,7 +32,8 @@
<span> <span>
{{$p->getPrice()}} {{$p->getPrice()}}
</span> </span>
<a href="{{route('card.add',$p->slug)}}" class="add-to-card btn btn-primary btn-block mt-2 mb-2"> <a href="{{route('card.add',$p->slug)}}"
class="add-to-card btn btn-primary btn-block mt-2 mb-2">
<img src="{{asset('images/basket.svg')}}" class="basket-icon" alt=""> &nbsp; <img src="{{asset('images/basket.svg')}}" class="basket-icon" alt=""> &nbsp;
افزودن به سبد خرید افزودن به سبد خرید
</a> </a>
@ -76,7 +87,7 @@
<h1 class="mb-4"> <h1 class="mb-4">
{{\App\Helpers\getSetting('sectext')}} {{\App\Helpers\getSetting('sectext')}}
</h1> </h1>
<div id="owl1" class="owl-carousel owl-theme"> <div id="owl1" class="owl-carousel owl-theme owl1">
@foreach(\App\Helpers\getProductByCat(\App\Helpers\getSetting('seccat'),'id','desc',10) as $p) @foreach(\App\Helpers\getProductByCat(\App\Helpers\getSetting('seccat'),'id','desc',10) as $p)
<div class="item "> <div class="item ">
<div class="box"> <div class="box">
@ -92,7 +103,8 @@
</span> </span>
</a> </a>
<div> <div>
<a href="{{route('card.add',$p->slug)}}" class="add-to-card btn btn-primary btn-block mt-2 mb-2 corner"> <a href="{{route('card.add',$p->slug)}}"
class="add-to-card btn btn-primary btn-block mt-2 mb-2 corner">
<img src="{{asset('images/basket.svg')}}" class="basket-icon" alt=""> &nbsp; <img src="{{asset('images/basket.svg')}}" class="basket-icon" alt=""> &nbsp;
افزودن به سبد خرید افزودن به سبد خرید
</a> </a>
@ -124,10 +136,11 @@
</div> </div>
<div id="da-thumbs" class="da-thumbs"> <div id="da-thumbs" class="da-thumbs">
@foreach(\App\Helpers\getProductByCat(\App\Helpers\getSetting('3cat'),'stock_quantity','desc',12) as $p) @foreach(\App\Helpers\getProductByCat(\App\Helpers\getSetting('3cat'),'stock_quantity','desc',12) as $p)
<div class="item custom @foreach($p->categories()->pluck('id')->toArray() as $c) cat{{$c}} @endforeach shad pad"> <div
class="item custom @foreach($p->categories()->pluck('id')->toArray() as $c) cat{{$c}} @endforeach shad pad">
<div class="box"> <div class="box">
<a href="{{route('product',$p->slug)}}"> <a href="{{route('product',$p->slug)}}">
<img src="{{$p->thumbUrl()}}" class="img-fluid" alt="{{$p->name}}" title="{{$p->name}}" > <img src="{{$p->thumbUrl()}}" class="img-fluid" alt="{{$p->name}}" title="{{$p->name}}">
<h4> <h4>
{{$p->name}} {{$p->name}}
</h4> </h4>
@ -144,6 +157,51 @@
</div> </div>
</div> </div>
</section> </section>
<section id="blog">
<div class="container">
<h1>
واپسین مطالب
</h1>
<hr>
<div class="row">
@foreach(\Xmen\StarterKit\Models\Post::where('status',1)->limit(4)->get() as $p)
<div class="col-md-3">
<a href="{{route('n.show',$p->slug)}}" class="text-dark text-decoration-none">
<div class="mb-4 card post-card">
<img src="{{$p->imgurl()}}" class="img-fluid" alt="{{$p->title}}" title="{{$p->title}}">
<div class="card-body">
<h3 class="textt">{{$p->title}}</h3>
<div class="mb-2">
@foreach($p->tags as $tag)
<a class="post-tag ms-2" href="{{route('n.tag',$tag->slug)}}">
{{$tag->name}}
</a>
@endforeach
</div>
<div class="mb-1 text-muted">
{{\App\Helpers\time2persian($p->created_at)}}
</div>
<p>
{{$p->subtitle}}
</p>
<div class="text-muted text-end text-xsmall">
<i class="fa fa-comments"></i>
دیدگاه‌:
{{$p->comments()->count()}}
</div>
</div>
</div>
</a>
</div>
@endforeach
</div>
<a href="{{route('posts')}}" class="btn btn-outline-light float-end">
همه مطالب
</a>
<br>
</div>
</section>
<section id="brand" class="pt-4 pb-4"> <section id="brand" class="pt-4 pb-4">
<div class="container"> <div class="container">
<h1> <h1>
@ -153,7 +211,7 @@
@foreach(\App\Helpers\getSubCats(\App\Helpers\getSetting('4cat')) as $cat) @foreach(\App\Helpers\getSubCats(\App\Helpers\getSetting('4cat')) as $cat)
<div class="col-md-2 col-sm-3 col-4"> <div class="col-md-2 col-sm-3 col-4">
<a href="{{route('cat',$cat->slug)}}"> <a href="{{route('cat',$cat->slug)}}">
<img src="{{$cat->thumbUrl()}}" title="{{$cat->name}}" alt="{{$cat->name}}"> <img src="{{$cat->thumbUrl()}}" title="{{$cat->name}}" alt="{{$cat->name}}">
</a> </a>
</div> </div>
@endforeach @endforeach

@ -155,6 +155,7 @@ Route::prefix(config('starter-kit.uri'))->name('admin.')->group(
Route::get('index', [\App\Http\Controllers\Admin\SettingController::class, "index"])->name('index'); Route::get('index', [\App\Http\Controllers\Admin\SettingController::class, "index"])->name('index');
Route::post('store', [\App\Http\Controllers\Admin\SettingController::class, "store"])->name('store'); Route::post('store', [\App\Http\Controllers\Admin\SettingController::class, "store"])->name('store');
Route::post('update', [\App\Http\Controllers\Admin\SettingController::class, "update"])->name('update'); Route::post('update', [\App\Http\Controllers\Admin\SettingController::class, "update"])->name('update');
Route::post('remMenu/{id}', [\App\Http\Controllers\Admin\SettingController::class, "remMenu"])->name('remMenu');
} }
); );

Loading…
Cancel
Save