80 lines
2.3 KiB
PHP
Executable File
80 lines
2.3 KiB
PHP
Executable File
@extends('layouts/sidebar')
|
|
|
|
@section('title')
|
|
@if($blog->titel) {{$blog->titel}} | Live blog @endif
|
|
@endsection
|
|
|
|
@section('page_class')news_post post_container @endsection
|
|
|
|
|
|
{{-- @section('controls')
|
|
<p>
|
|
<a href="{{Request::url()}}" class="action_button"><span class="fa fa-undo"
|
|
class="action_button"></span><span>Verversen (nieuwste)</span></a>
|
|
|
|
@if($pagina > 1)
|
|
<a href="{{Request::url()}}?pagina={{$pagina - 1}}" class="action_button"><span
|
|
class="fa fa-arrow-left"></span><span>Terug (nieuwer)</span></a>
|
|
@else
|
|
<a href="#" class="action_button disabled"><span class="fa fa-arrow-left"></span><span>Terug (nieuwere
|
|
berichten)</span></a>
|
|
@endif
|
|
|
|
@if($hasNext)
|
|
<a href="{{Request::url()}}?pagina={{$pagina + 1}}" class="action_button"><span
|
|
class="fa fa-arrow-right"></span><span>Verder (ouder)</span></a>
|
|
@else
|
|
<a href="#" class="action_button disabled"><span class="fa fa-arrow-right"></span><span>Verder (ouder)</span></a>
|
|
@endif
|
|
</p>
|
|
@endsection --}}
|
|
|
|
@section('content')
|
|
|
|
<div id="updates-box" class="box full-width" style="display: none;">
|
|
<b>Er zijn updates van dit liveblog.</b>
|
|
<a href="{{Request::getPathInfo()}}" class="btn" onclick="$(this).attr('disabled', 'disabled');"><span class="fa fa-undo"
|
|
class="btn"></span><span>Laad de nieuwste berichten.</span></a>
|
|
</div>
|
|
|
|
<h3 class="excerpt">
|
|
@if($blog->is_actief)
|
|
<span style="font-family: sans-serif; padding: 3px; color: white; background-color: #BD0013; border-radius: 5px;"
|
|
titel="Dit blog wordt momenteel actief bijgewerkt.">
|
|
Nu live!
|
|
</span>
|
|
@else
|
|
<span style="font-family: sans-serif; padding: 3px; background-color: #BDBDBD; border-radius: 5px;"
|
|
titel="Dit blog is gesloten en wordt hier getoond als archief.">
|
|
Archief
|
|
</span>
|
|
@endif
|
|
</span>
|
|
</h3>
|
|
|
|
{{-- @yield('controls') --}}
|
|
|
|
<div id="items">
|
|
@include('partial/blogitems', ['items' => $blog->artikelen])
|
|
</div>
|
|
|
|
{{-- @yield('controls')
|
|
<p class="center">(Pagina {{$pagina}})</p> --}}
|
|
|
|
<script>
|
|
var laatste_update = Date.parse("{{ $blog->bijgewerkt }}");
|
|
// alert(laatste_update);
|
|
var auto_update = setInterval(function() {
|
|
$.ajax({
|
|
url: '{{ Request::getPathInfo() }}',
|
|
success: function (data) {
|
|
var nieuwe_update = Date.parse(data.bijgewerkt);
|
|
if( nieuwe_update <= laatste_update) return;
|
|
$('#updates-box').slideDown();
|
|
laatste_update = nieuwe_update;
|
|
}
|
|
});
|
|
}, 1000);
|
|
</script>
|
|
|
|
@endsection |