<?php $_shouldextend[1]=1; ?>

<?php $this->startSection('content'); ?>
 <div class="gallery-page"<?php echo \htmlentities(isset($res->galleryBackground) ? ' style=background:'.$res->galleryBackground : ''??'', ENT_QUOTES, 'UTF-8', false); ?>>
 <div class="back-link">
 <a href="<?php echo \htmlentities(resUrl()??'', ENT_QUOTES, 'UTF-8', false); ?>">
 <?php echo \htmlentities(__('site.back_home')??'', ENT_QUOTES, 'UTF-8', false); ?>

 </a>
 </div>
 
 <h1>
 <?php echo \htmlentities($res->pagetitle??'', ENT_QUOTES, 'UTF-8', false); ?>

 </h1>
 
 <div class="list">
 <?php $__currentLoopData = $res->gallery; $this->addLoop($__currentLoopData);$this->getFirstLoop();
 foreach($__currentLoopData as $item): $loop = $this->incrementLoopIndices();  ?>
 <a href="<?php echo \htmlentities(assetsUserfiles($item['img'])??'', ENT_QUOTES, 'UTF-8', false); ?>" class="item gallery-item">
 <img src="<?php echo \htmlentities(assetsUserfiles($item['img'])??'', ENT_QUOTES, 'UTF-8', false); ?>" alt="<?php echo \htmlentities($item['title']??'', ENT_QUOTES, 'UTF-8', false); ?>">
 </a>
 <?php endforeach; $this->popLoop(); $loop = $this->getFirstLoop(); ?>
 </div>

 <div class="bottom flex">
 <div>
 <?php ($prevLinkRes = getRes(['alias' => $res->galleryPrevAlias])); ?>

 <?php if($prevLinkRes): ?>
 <a href="<?php echo \htmlentities(resUrl($res->galleryPrevAlias)??'', ENT_QUOTES, 'UTF-8', false); ?>">
 <?php echo \htmlentities($prevLinkRes->pagetitle??'', ENT_QUOTES, 'UTF-8', false); ?>

 </a>
 <?php endif; ?>
 </div>
 
 <div>
 <?php ($nextLinkRes = getRes(['alias' => $res->galleryNextAlias])); ?>

 <?php if($nextLinkRes): ?>
 <a href="<?php echo \htmlentities(resUrl($res->galleryNextAlias)??'', ENT_QUOTES, 'UTF-8', false); ?>">
 <?php echo \htmlentities($nextLinkRes->pagetitle??'', ENT_QUOTES, 'UTF-8', false); ?>

 </a>
 <?php endif; ?>
 </div>
 </div>
 </div>
<?php $this->stopSection(); ?>

<?php if (isset($_shouldextend[1])) { echo $this->runChild('layouts.main'); } ?>