added galleries list theme part

pull/49/head
A1Gard 5 months ago
parent f73fa0921f
commit fc5a288067

@ -48,7 +48,16 @@ class ClientController extends Controller
$title = __("Posts list");
$subtitle = '';
$posts = Post::where('status', 1)->orderByDesc('id')->paginate($this->paginate);
return view('client.posts', compact('area', 'posts', 'title', 'subtitle'));
return view('client.default-list', compact('area', 'posts', 'title', 'subtitle'));
}
public function galleries()
{
$area = 'galleries-list';
$title = __("Galleries list");
$subtitle = '';
$galleries = Gallery::where('status', 1)->orderByDesc('id')->paginate($this->paginate);
return view('client.default-list', compact('area', 'galleries', 'title', 'subtitle'));
}
public function tag($slug)

@ -176,7 +176,7 @@ class SettingSeeder extends Seeder
'title' => __('Gallery thumbnail size'),
'key' => 'gallery_thumb',
'type' => 'TEXT',
'value' => '500x500',
'value' => '900x900',
'size' => '6',
],
]

@ -3,6 +3,9 @@
<h1>
{{ getSetting($data->area->name.'_'.$data->part.'_title')}}
</h1>
<p>
{{$gallery->description}}
</p>
<div class="row">
@foreach(\App\Models\Gallery::where('status',1)->orderBy('id')->limit( getSetting($data->area->name.'_'.$data->part.'_limit'))->get() as $gallery)
<div class="col-md p-1">

@ -0,0 +1,23 @@
<section class='GalleriesList'>
<div class="{{gfx()['container']}}">
<h1>
{{$title}}
</h1>
<div class="row">
@foreach($galleries as $gallery)
<div class="col-md-6 p-1">
<div class="gallrey-item">
<a href="{{$gallery->webUrl()}}">
<img src="{{$gallery->imgUrl()}}" alt="{{$gallery->title}}">
</a>
<h4 class="text-center">
{{$gallery->title}}
</h4>
</div>
</div>
@endforeach
</div>
{{$galleries->links()}}
</div>
</section>

@ -0,0 +1,10 @@
{
"name": "GalleriesList",
"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,21 @@
<?php
namespace Resources\Views\Segments;
use App\Models\Part;
class GalleriesList
{
public static function onAdd(Part $part = null)
{
}
public static function onRemove(Part $part = null)
{
}
public static function onMount(Part $part = null)
{
return $part;
}
}

@ -0,0 +1,40 @@
.GalleriesList {
margin-top: 2rem;
.gallrey-item{
height: 350px;
width: 100%;
position: relative;
overflow: hidden;
border-radius: var(--xshop-border-radius);
img,h4{
position: absolute;
left: 0;
right: 0;
transition: 400ms;
}
img{
top: 0;
height: 100%;
width: 100%;
object-fit: cover;
}
h4{
bottom: -60px;
background: var(--xshop-primary);
color: var(--xshop-diff);
padding: 11px 0;
}
&:hover{
img{
transform: scale(1.4);
}
h4{
bottom: 0;
}
}
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 387 KiB

@ -7,7 +7,7 @@
<div class="aparat-item">
<a class="gallery-image aparat-link"
href="{{$image->imgOriginalUrl()}}">
<img src="{{$image->imgurl()}}" class="img-fluid" alt="">
<img src="{{$image->imgurl()}}" class="img-fluid" alt="{{$image->title}}" title="{{$image->title}}">
</a>
</div>
@endforeach

@ -5,7 +5,7 @@
@foreach($gallery->images as $image)
<div class="col-lg-3 col-md-6 mb-4">
<a class="gallery-image light-box" data-toggle="lightbox" data-gallery="{{$gallery->slug}}" href="{{$image->imgOriginalUrl()}}">
<img src="{{$image->imgurl()}}" class="img-fluid" alt="">
<img src="{{$image->imgurl()}}" class="img-fluid" alt="{{$image->title}}" title="{{$image->title}}">
</a>
</div>
@endforeach

@ -359,6 +359,7 @@ Route::name('client.')->group(function (){
// index
Route::get('/', [\App\Http\Controllers\ClientController::class,'welcome'])->name('welcome');
Route::get('/posts', [\App\Http\Controllers\ClientController::class,'posts'])->name('posts');
Route::get('/galleries', [\App\Http\Controllers\ClientController::class,'galleries'])->name('galleries');
Route::get('/tag/{post}', [\App\Http\Controllers\ClientController::class,'tag'])->name('tag'); // wip
Route::get('/group/{group}', [\App\Http\Controllers\ClientController::class,'group'])->name('group');
Route::get('/gallery/{gallery}', [\App\Http\Controllers\ClientController::class,'gallery'])->name('gallery');

Loading…
Cancel
Save