kuvia/resources/views/themes/gallery/gallery-detail/list.blade.php
2021-01-20 01:17:34 +01:00

49 lines
1.9 KiB
PHP

@extends('layout/template')
@section('content')
<div class="row" style="background-color: #607c89;min-height: calc(100vh - 300px);padding-top:20px;">
<div class="col-md-12" style="text-align: center;">
<div>
<div class="fotorama" data-nav="thumbs" data-keyboard="true" data-ratio="800/600" data-width="1200" data-maxheight="80%" data-allowfullscreen="true">
@foreach($images as $image)
<a href="/{{ $tenant->url }}/{{ $gallery->url }}/{{ $image->id }}/file?size=big" data-taken="{{ $image->DateTimeOriginal }}" data-description="{{ $image->description }}" data-name="{{ $image->name }}"><img src="/{{ $tenant->url }}/{{ $gallery->url }}/{{ $image->id }}/file?size=pixel"></a>
@endforeach
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-md-2"></div>
<div class="col-md-4">
<h1>Gallery: <?php echo $gallery->name; ?></h1>
<p><?php echo $gallery->html; ?></p>
</div>
<div class="col-md-4">
<h1 id="filename"></h1>
<i>Picture take <span id="taken"></span></i>
<p id="description"></p>
</div>
</div>
@endsection
@section('js')
<script>
$('.fotorama').on('fotorama:show', function (e, fotorama) {
console.log(e.type, fotorama.activeFrame);
$("#filename").html(fotorama.activeFrame.name);
$("#description").html(fotorama.activeFrame.description);
$("#taken").html(fotorama.activeFrame.taken);
});
</script>
<link href="https://cdnjs.cloudflare.com/ajax/libs/fotorama/4.6.4/fotorama.css" rel="stylesheet">
<script src="https://cdnjs.cloudflare.com/ajax/libs/fotorama/4.6.4/fotorama.js"></script>
<style type="text/css">
.fotorama__wrap {
margin: 0 auto;
}
</style>
@endsection