2016-10-05 11:49:39 +01:00
|
|
|
@extends('themes.base.layout')
|
|
|
|
@section('title', $album->name)
|
|
|
|
|
|
|
|
@section('breadcrumb')
|
2017-04-17 21:31:45 +01:00
|
|
|
<li class="breadcrumb-item"><a href="{{ route('home') }}"><i class="fa fa-fw fa-home"></i></a></li>
|
|
|
|
@include(Theme::viewName('partials.album_breadcrumb'))
|
2016-10-05 11:49:39 +01:00
|
|
|
@endsection
|
|
|
|
|
|
|
|
@section('content')
|
2017-04-18 20:07:03 +01:00
|
|
|
<div class="container album-container album-slideshow-container" id="slideshow-container">
|
2016-10-05 11:49:39 +01:00
|
|
|
<div class="row">
|
2017-04-17 21:53:47 +01:00
|
|
|
<div class="col">
|
2016-10-05 11:49:39 +01:00
|
|
|
<div class="pull-right">
|
|
|
|
@include(\App\Facade\Theme::viewName('partials.album_view_selector'))
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<h1 class="page-title">{{ $album->name }}</h1>
|
|
|
|
<p>{{ $album->description }}</p>
|
2017-04-17 21:53:47 +01:00
|
|
|
<div class="clearfix"><!-- --></div>
|
2016-10-05 11:49:39 +01:00
|
|
|
<hr/>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
2017-04-18 20:07:03 +01:00
|
|
|
<div class="row">
|
2017-04-17 21:53:47 +01:00
|
|
|
<div class="col text-center">
|
2016-10-05 11:49:39 +01:00
|
|
|
<div class="pull-right">
|
|
|
|
<div class="btn btn-group">
|
2017-04-18 20:07:03 +01:00
|
|
|
<button class="btn btn-secondary" v-on:click="pauseSlideshow" v-bind:disabled="isPaused" v-if="isRunning"><i class="fa fa-fw fa-pause"></i></button>
|
|
|
|
<button class="btn btn-secondary" v-on:click="continueSlideshow" v-bind:disabled="!isPaused" v-if="isRunning"><i class="fa fa-fw fa-play"></i></button>
|
2016-10-05 11:49:39 +01:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
2017-04-18 17:25:27 +01:00
|
|
|
<div id="image-preview" v-if="current !== null">
|
|
|
|
<a v-bind:href="current.info_url" v-bind:title="current.description">
|
2017-04-18 20:07:03 +01:00
|
|
|
<img class="rounded thumbnail" v-bind:src="current.original_url" v-bind:alt="current.name" v-bind:title="current.description"/>
|
2016-10-05 11:49:39 +01:00
|
|
|
</a>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="row" style="margin-top: 15px;">
|
2017-04-17 21:53:47 +01:00
|
|
|
<div class="col">
|
2016-10-05 11:49:39 +01:00
|
|
|
<div class="thumbnails">
|
|
|
|
@foreach ($photos as $photo)
|
2017-04-18 20:07:03 +01:00
|
|
|
<a href="{{ $photo->url() }}" v-on:click="changeCurrentImage({{ $photo->id }}); $event.preventDefault();">
|
|
|
|
<img class="ss-thumbnail rounded" src="{{ $photo->thumbnailUrl('slideshow-tiny') }}" alt="{{ $photo->name }}" title="{{ $photo->description }}" data-photo-id="{{ $photo->id }}" data-original-url="{{ $photo->thumbnailUrl('fullsize') }}" data-info-url="{{ $photo->url() }}" />
|
2016-10-05 11:49:39 +01:00
|
|
|
</a>
|
|
|
|
@endforeach
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
2017-04-17 21:53:47 +01:00
|
|
|
|
2017-04-18 17:25:27 +01:00
|
|
|
@if ($album->children()->count() > 0)
|
|
|
|
<h2 style="margin-top: 60px;"><small class="text-muted">@lang('gallery.other_albums_heading', ['album_name' => $album->name])</small></h2>
|
|
|
|
<p class="mb-4">@lang('gallery.other_albums_description')</p>
|
|
|
|
|
|
|
|
<div class="row">
|
|
|
|
@foreach ($album->children as $childAlbum)
|
|
|
|
<div class="col-sm-4 col-md-3" style="max-width: 250px;">
|
2017-04-17 21:53:47 +01:00
|
|
|
<div class="card mb-3">
|
2017-04-18 17:25:27 +01:00
|
|
|
<img class="card-img-top" src="{{ $childAlbum->thumbnailUrl('preview') }}" style="max-height: 120px;"/>
|
2017-04-17 21:53:47 +01:00
|
|
|
<div class="card-block">
|
2017-04-18 17:25:27 +01:00
|
|
|
<h5 class="card-title"><a href="{{ $childAlbum->url() }}">{{ $childAlbum->name }}</a></h5>
|
2017-04-17 21:53:47 +01:00
|
|
|
</div>
|
|
|
|
<div class="card-footer">
|
|
|
|
<small class="text-muted"><i class="fa fa-fw fa-photo"></i> {{ $childAlbum->photos_count }} photos</small>
|
|
|
|
</div>
|
|
|
|
</div>
|
2017-04-18 17:25:27 +01:00
|
|
|
</div>
|
|
|
|
@endforeach
|
|
|
|
</div>
|
|
|
|
@endif
|
2016-10-05 11:49:39 +01:00
|
|
|
</div>
|
|
|
|
@endsection
|
|
|
|
|
|
|
|
@push('scripts')
|
|
|
|
<script type="text/javascript">
|
|
|
|
// TODO make this timeout configurable
|
|
|
|
var viewModel = new SlideShowViewModel(5000);
|
|
|
|
|
|
|
|
$(document).ready(function() {
|
|
|
|
$('img.ss-thumbnail').each(function(index, element)
|
|
|
|
{
|
2017-04-18 17:25:27 +01:00
|
|
|
viewModel.data.images.push({
|
2016-10-05 11:49:39 +01:00
|
|
|
'id': $(element).data('photo-id'),
|
|
|
|
'name': $(element).attr('alt'),
|
|
|
|
'description': $(element).attr('title'),
|
|
|
|
'original_url': $(element).data('original-url'),
|
|
|
|
'info_url': $(element).data('info-url')
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
2017-04-18 17:25:27 +01:00
|
|
|
var app = new Vue(viewModel);
|
|
|
|
app.startSlideshow();
|
2016-10-05 11:49:39 +01:00
|
|
|
});
|
|
|
|
</script>
|
2017-04-18 20:07:03 +01:00
|
|
|
@endpush
|