This commit is contained in:
Kekskurse 2021-01-12 23:14:38 +01:00
parent 6b13595b96
commit 580735a7b4
2 changed files with 37 additions and 1 deletions

View file

@ -28,7 +28,7 @@ class PublicController extends BaseController
public function listGalleriesView($name) { public function listGalleriesView($name) {
$tenant = Tenant::query()->where("url", "=", $name)->firstOrFail(); $tenant = Tenant::query()->where("url", "=", $name)->firstOrFail();
$galleries = Gallery::query()->where("tenant", "=", $tenant->id)->get(); $galleries = Gallery::query()->where("tenant", "=", $tenant->id)->get();
return view("themes.tenant.kuvia-gallery.list", ["galleries" => $galleries, "tenant" => $tenant]); return view("themes.tenant.kuvia-blog.list", ["galleries" => $galleries, "tenant" => $tenant]);
} }
public function listGalleryImagesView($tenant, $gallery) { public function listGalleryImagesView($tenant, $gallery) {

View file

@ -0,0 +1,36 @@
@extends('layout/template')
@section('content')
<div class="row">
<div class="col-md-12">
<h1>Galleries</h1>
@foreach($galleries as $gallery)
<div class="row" style="margin-bottom: 20px;border-bottom: 1px solid grey;padding-bottom: 10px;">
<div class="col-md-4">
<h3>{{ $gallery->name }}</h3>
<p>publishd {{ $gallery->gallery_create_time }}</p>
<p>{{ $gallery->description }}</p>
<a href="/{{ $tenant->url }}/{{ $gallery->url }}/" class="btn btn-outline-primary">More</a>
</div>
<div class="col-md-8" style="text-align: center;">
<img src="/{{$tenant->url}}/{{$gallery->url}}/{{$gallery->main_image}}/file?size=big">
</div>
</div>
@endforeach
</div>
</div>
@endsection
@section('js')
<link rel="stylesheet" href="/css/justifiedGallery.css" />
<script src="/js/jquery.justifiedGallery.js"></script>
<script>
$("#mygallery").justifiedGallery({
rowHeight: 250,
});
</script>
@endsection