124 lines
5.1 KiB
PHP
124 lines
5.1 KiB
PHP
<?php $__env->startSection('title'); ?>
|
|
Regioagenda
|
|
<?php $__env->stopSection(); ?>
|
|
|
|
<?php $__env->startSection('content'); ?>
|
|
<h1>Regioagenda</h1>
|
|
|
|
<?php if(!count($events)): ?>
|
|
<p>Er zijn geen items in de regioagenda. Iets te melden? Mail het naar <?php echo e(Html::mailto("info@6fm.nl")); ?>.</p>
|
|
<?php else: ?>
|
|
|
|
<nav>
|
|
<ul class="pager">
|
|
<li class="previous-month"><a href="#">← Eerder</a></li>
|
|
<li class="current-month"><a href="#">Komende week</a></li>
|
|
<li class="everything"><a href="#">Toon alles</a></li>
|
|
<li class="next-month"><a href="#">Later →</a></li>
|
|
</ul>
|
|
</nav>
|
|
|
|
<div class="month" data-month="0">
|
|
<h2>Komende week</h2>
|
|
|
|
<?php ($nextWeek = new \DateTimeImmutable('midnight +7 days')); ?>
|
|
<?php ($heading = null); ?>
|
|
<?php ($month = 0); ?>
|
|
|
|
<?php $__currentLoopData = $events; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $event): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
|
|
<?php if($event->starts >= ($heading ? $heading : $nextWeek)): ?>
|
|
</div>
|
|
<div class="month" data-month="<?php echo e(++$month); ?>">
|
|
<h2><?php echo e($heading ? "De agenda van" : "De rest van"); ?> <?php echo e(Formatter::fullDate($event->starts, 'm y?')); ?></h2>
|
|
<?php ($heading = new \DateTimeImmutable('first day of next month ' . $event->starts->format('Y-m-d'))); ?>
|
|
<?php endif; ?>
|
|
<div class='row details' data-index="<?php echo e($month); ?>">
|
|
<?php ($image = count($event->images) ? $event->images[0] : null); ?>
|
|
<div class='col-lg-3 <?php if(!$image): ?> hidden-sm hidden-xs <?php endif; ?>'>
|
|
<div class="news-item news-item-small wow fadeInDown">
|
|
<div class="thumb">
|
|
<a href="<?php echo e($event->url); ?>" rel="bookmark" title="<?php echo e($event->title); ?>">
|
|
<img style="width: 100%;" src="<?php echo e($image ? url( $image->url ) : url( 'images/noimage.png')); ?>" alt="<?php echo e($image ? $image->title : $event->title); ?>" title="<?php echo e($image ? $image->title : $event->title); ?>"/>
|
|
</a>
|
|
</div><!--/.thumb-->
|
|
</div><!--/.wow-->
|
|
</div><!--/.col-->
|
|
<div class='col-lg-9'>
|
|
<h2><a href="<?php echo e($event->url); ?>"><?php echo e($event->title); ?></a></h2>
|
|
<div class="event-date">
|
|
<?php echo e(Formatter::relativeDate($event->starts, 'W d m y?')); ?> <?php if($event->ends && $event->starts != $event->ends): ?> t/m <?php echo e(Formatter::relativeDate($event->ends, 'd m y?')); ?> <?php endif; ?>
|
|
</div>
|
|
<b><?php echo e($event->region); ?>.</b> <?php echo Formatter::excerpt($event->content, 250); ?>
|
|
|
|
<p><a href="<?php echo e($event->url); ?>" class="btn btn-info">Lees verder</a>
|
|
</div><!--/.col-->
|
|
</div><!--/.row-->
|
|
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
|
|
</div>
|
|
|
|
<nav>
|
|
<ul class="pager">
|
|
<li class="previous-month"><a href="#">← Eerder</a></li>
|
|
<li class="current-month"><a href="#">Komende week</a></li>
|
|
<li class="everything"><a href="#">Toon alles</a></li>
|
|
<li class="next-month"><a href="#">Later →</a></li>
|
|
</ul>
|
|
</nav>
|
|
|
|
<script type="text/javascript">
|
|
var month = 0;
|
|
var months = <?php echo e($month); ?>;
|
|
var $current = null;
|
|
|
|
function gotoPage(month) {
|
|
$new = (month === null) ? $(".month") : $(".month[data-month=" + month + "]");
|
|
if($current == null) {
|
|
$(".month").hide("fast");
|
|
$new.fadeIn("fast");
|
|
} else {
|
|
($container = $("#contentSection")).css('height', $container.height() + "px").css('overflow', 'hidden');
|
|
animations = $current.length;
|
|
$current.fadeOut("fast", function() {
|
|
$new.fadeIn("fast", function() {
|
|
if(--animations > 0) { return; }
|
|
curHeight = $container.height();
|
|
autoHeight = $container.css('height', 'auto').height();
|
|
$container.height(curHeight).animate({ height: autoHeight }, 250, function() {
|
|
$container.css('height', 'auto');
|
|
});
|
|
});
|
|
});
|
|
}
|
|
|
|
$current = $new;
|
|
window.location.hash = (month === null) ? "alles" : ("page-" + month);
|
|
|
|
$previous = $(".pager .previous-month, .pager .current-month");
|
|
if(month == 0) { $previous.addClass('disabled'); } else { $previous.removeClass('disabled'); }
|
|
|
|
$next = $(".pager .next-month");
|
|
if(month == months) { $next.addClass('disabled'); } else { $next.removeClass('disabled'); }
|
|
}
|
|
|
|
$(".pager .previous-month").click(function(e) { if(month > 0) gotoPage(--month); e.preventDefault(); });
|
|
$(".pager .current-month").click(function(e) { if(month != 0) gotoPage(month = 0); e.preventDefault(); });
|
|
$(".pager .next-month").click(function(e) { if(month < months) gotoPage(++month); e.preventDefault(); });
|
|
$(".pager .everything").click(function(e) { gotoPage(null); e.preventDefault(); });
|
|
gotoPage(0);
|
|
|
|
window.onhashchange = function() {
|
|
if(window.location.hash == "#alles") {
|
|
gotoPage(null);
|
|
} else {
|
|
newMonth = window.location.hash.substr(6);
|
|
if(newMonth != month) {
|
|
gotoPage(newMonth);
|
|
}
|
|
}
|
|
}
|
|
</script>
|
|
|
|
<?php endif; ?>
|
|
<?php $__env->stopSection(); ?>
|
|
|
|
<?php echo $__env->make('page', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>
|