<?php $__env->startSection('metatags'); ?>
<meta name="description" content="<?php echo $album->descricao; ?>">
<meta property="og:title" content="<?php echo $album->titulo; ?> | Soares Cardoso">
<meta property="og:description" content="<?php echo $album->descricao; ?>">

<?php if($album->cover): ?>
<meta property="og:image" content="<?php echo asset($album->cover->getLarge()); ?>">
<?php else: ?>
<meta property="og:image" content="<?php echo asset($album->photos->first()->getLarge()); ?>">
<?php endif; ?>

<?php $__env->stopSection(); ?>

<?php $__env->startSection('title'); ?>
<?php echo $album->titulo; ?> |
<?php $__env->stopSection(); ?>

<?php $__env->startSection('content'); ?>

<?php if($album->cover): ?>
<section id="inner-headline" style="background-image: url('<?php echo $album->cover->getLarge(); ?>');">
<?php else: ?>
<section id="inner-headline" style="background-image: url('<?php echo $album->photos->first()->getLarge(); ?>');">
<?php endif; ?>
    <div class="container">
        <div class="row">
            <div class="col-lg-12">
                <h1><?php echo trans('global.word.portfolio'); ?></h1>
                <ul class="breadcrumb hidden-xs">
                    <li>
                        <a href="<?php echo route('home'); ?>"><?php echo trans('global.word.home'); ?></a>
                        <i class="icon-angle-right"></i>
                    </li>
                    <li>
                        <a href="<?php echo route('portfolio.index'); ?>"><?php echo trans('global.word.portfolio'); ?></a>
                        <i class="icon-angle-right"></i>
                    </li>
                    <li class="active"><?php echo $album->titulo; ?></li>
                </ul>
            </div>
        </div>
    </div>
</section>

<section id="content">
    <div class="container">
        <div class="row">
            <div class="col-md-8 col-md-offset-2">
                <div class="text-center margin-bottom-30">
                    <h3><?php echo $album->titulo; ?></h3>
                    <?php if($album->descricao): ?>
                    <p><?php echo $album->descricao; ?></p>
                    <?php endif; ?>
                </div>
            </div>
        </div>
    </div>
</section>

<div id="freewall">
    <?php foreach($album->photos as $photo): ?>
    <?php if($photo->legenda || $photo->autor): ?>
    <a href="<?php echo asset($photo->caminho); ?>" class="item item-img" data-sub-html="<b><?php echo e($photo->legenda); ?></b><br/><i>by <?php echo e($photo->autor); ?></i>">
    <?php else: ?>
    <a href="<?php echo asset($photo->caminho); ?>" class="item item-img">
    <?php endif; ?>
        <img src="<?php echo asset($photo->getCroppa(370, 250)); ?>" />
        <?php if($photo->legenda || $photo->autor): ?>
        <div class="freewall-caption">
            <h1><?php echo $photo->legenda; ?></h1>
            <p>by <?php echo $photo->autor; ?></p>
        </div>
        <?php endif; ?>
    </a>
    <?php endforeach; ?>
</div>
<?php $__env->stopSection(); ?>

<?php $__env->startSection('scripts'); ?>
<script>
    $(window).load(function () {
        var wall = new freewall("#freewall");

        wall.reset({
            selector: '.item',
            animate: false,
            cellW: 300,
            cellH: 190,
            gutterX: 0,
            gutterY: 0,
            onResize: function () {
                wall.fitWidth();
            }
        });

        wall.fitWidth();

        var images = wall.container.find('.item');
        images.find('img').load(function () {
            wall.fitWidth();
        });


        $('#freewall').lightGallery({
            selector: '.item-img',
            showThumbByDefault: true,
            download: false
        });

    });
</script>
<?php $__env->stopSection(); ?>