File: //var/www/quadcode-jobs/storage/framework/views/d7e891306f9acbb77c6675e17e3ca99779f586be.php
<script src="https://unpkg.com/masonry-layout@4/dist/masonry.pkgd.min.js"></script>
<?php
$categories = \App\Repositories\CategoryRepository::getPublicData();
?>
<section class="categories">
<div class="container">
<div class="masonry">
<?php $__currentLoopData = $categories; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $category): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
<div href="<?php echo e(route('category.show', [app()->getLocale(), $category->slug])); ?>" class="category">
<div class="category__name"><?php echo e($category->title); ?></div>
<div class="category__count"><?php echo e($category->getVacancyCount()); ?> vacancies</div>
<div class="category__list">
<?php if($category->getVacancyCount() > 0): ?>
<?php
/** @var $category */
$left = $category->getVacancyCount() - 3;
$jobs = array_slice((array)$category->vacancies, 0, 3);
?>
<?php $__currentLoopData = $category->vacancies; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $job): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
<?php
if (app()->getLocale() === DEFAULT_LOCALE) {
$jobShowRoute = route('job.show', [$job->id]);
$categoryRoute = route('category.show', [$job->category->slug]);
} else {
$jobShowRoute = route('job.show.locale', [app()->getLocale(), $job->id]);
$categoryRoute = route('category.show.locale', [app()->getLocale(), $job->category->slug]);
}
?>
<div class="category__item"><a href="<?php echo e($jobShowRoute); ?>" rel="noopener"><?php echo e($job->getTitle()); ?></a></div>
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
<?php if($left > 0): ?>
<div class="category__and-more">
<a href="<?php echo e($categoryRoute); ?>" rel="noopener">
and <?php echo e($left); ?> more
<div class="arrow">
<svg viewBox="0 0 14 9" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M1 1L7 7L13 1" stroke="#F1162F" stroke-width="2"/>
</svg>
</div>
</a>
</div>
<?php endif; ?>
<?php else: ?>
<div class="no-vacancies"><?php echo app('translator')->get('messages.Unfortunately, we don’t have open positions for now. You can send your resume to <a href="#" rel="noopener">jobs@quadcode.com</a> and we\'ll contact you as the position opens'); ?></div>
<?php endif; ?>
</div>
</div>
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
</div>
</div>
</section>
<script>
function getColWidth() {
if (window.innerWidth <= 1439) return 25;
if (window.innerWidth <= 767) return 0;
return 30;
}
new Masonry('.masonry', {
itemSelector: '.category',
gutter: getColWidth()
});
</script>
<?php /**PATH /var/www/quadcode-jobs/resources/views/site/blocks/categories.blade.php ENDPATH**/ ?>