blue-twilight/resources/views/themes/base/gallery/album_default.blade.php

73 lines
3.2 KiB
PHP
Raw Normal View History

@extends('themes.base.layout')
@section('title', $album->name)
@php ($hasChildren = $album->children()->count() > 0)
@section('content')
<div class="container-fluid">
<div class="row">
<div class="col">
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="{{ route('home') }}"><i class="fa fa-fw fa-home"></i></a></li>
@include(Theme::viewName('partials.album_breadcrumb'))
</ol>
</div>
</div>
</div>
<div class="container-fluid album-container">
<div class="row">
<div class="col">
<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>
<div class="clearfix"><!-- --></div>
<hr/>
</div>
</div>
<div class="row">
<div class="{{ $hasChildren ? 'col-md-8' : 'col-md-10 offset-md-1' }}">
<div class="row">
@foreach ($photos as $photo)
<div class="{{ $hasChildren ? 'col-sm-6 col-md-6 col-lg-4' : 'col-sm-6 col-md-4 col-lg-3' }} photo mb-3">
<div class="card">
<img src="{{ $photo->thumbnailUrl('preview') }}" alt="" class="card-img-top"/>
<div class="card-block">
<h4 class="card-title"><a href="{{ $photo->url() }}">{{ $photo->name }}</a></h4>
</div>
<div class="card-footer">
<small class="text-muted"><i class="fa fa-fw fa-calendar"></i> {{ date('Y-m-d H:i', strtotime(!is_null($photo->taken_at) ? $photo->taken_at : $photo->created_at)) }}</small>
</div>
</div>
</div>
@endforeach
</div>
</div>
@if ($hasChildren)
<div class="col-md-2 offset-md-1">
@foreach ($album->children as $childAlbum)
<div class="card mb-3">
<img class="card-img-top" src="{{ $childAlbum->thumbnailUrl('preview') }}" style="height: 150px;"/>
<div class="card-block">
<h4 class="card-title"><a href="{{ $childAlbum->url() }}">{{ $childAlbum->name }}</a></h4>
</div>
<div class="card-footer">
<small class="text-muted"><i class="fa fa-fw fa-photo"></i> {{ $childAlbum->photos_count }} photos</small>
</div>
</div>
@endforeach
</div>
@endif
</div>
<div class="row" style="margin-top: 15px;">
<div class="col text-center">
{{ $photos->links() }}
</div>
</div>
</div>
@endsection