Home page and news page are finished
This commit is contained in:
4
resources/views/partial/home_newslist_small.blade.php
Normal file
4
resources/views/partial/home_newslist_small.blade.php
Normal file
@@ -0,0 +1,4 @@
|
||||
<div>
|
||||
@include('partial/newslist_small', ['id' => 'items-more-news', 'news' => $news])
|
||||
@include('partial/newslist_small', ['id' => 'items-most-read', 'news' => $populair])
|
||||
</div>
|
||||
@@ -1,39 +1,35 @@
|
||||
@foreach($news as $item)
|
||||
@if($loop->index % 3 == 0)
|
||||
<div class="row grid">
|
||||
<ul>
|
||||
@endif
|
||||
<li class="post column column_1_3">
|
||||
<a href="{{url($item->url)}}" title="{{$item->title}}">
|
||||
@if($item->video)
|
||||
<span class="icon video"></span>
|
||||
@elseif($item->images && count($item->images) > 1)
|
||||
<span class="icon gallery"></span>
|
||||
@endif
|
||||
<img src='{{$item->images && count($item->images) ? $imgBase . $item->images[0]->url : '/images/noimage.png'}}' alt='{{$item->images && count($item->images) ? $item->images[0]->title : $item->title}}'>
|
||||
</a>
|
||||
<div class="post_content">
|
||||
<h5>
|
||||
<a href="{{url($item->url)}}" title="{{$item->title}}">{!! $item->title !!}</a>
|
||||
</h5>
|
||||
<ul class="post_details simple">
|
||||
<li class="category">
|
||||
<a title="Regio: {{$item->region->title}}" href="{{url('nieuws/regio/' . $item->region->slug)}}">{{$item->region->title}}</a>
|
||||
</li>
|
||||
@if($item->edited && ($item->edited != $item->published))
|
||||
<li class="date edited">
|
||||
{{Formatter::relativeDate($item->edited)}} bijgewerkt om {{$item->published->format('H:i')}}
|
||||
</li>
|
||||
@else
|
||||
<li class="date">
|
||||
{{Formatter::relativeDate($item->published)}} om {{$item->published->format('H:i')}}
|
||||
</li>
|
||||
@endif
|
||||
</ul>
|
||||
</div>
|
||||
</li>
|
||||
@if($loop->index % 3 == 2 || $loop->last)
|
||||
</ul>
|
||||
</div>
|
||||
@endif
|
||||
@endforeach
|
||||
<ul id="{{$id}}" class="blog">
|
||||
@foreach($news as $item)
|
||||
<li class="post">
|
||||
<div class="row">
|
||||
<div class="col-4">
|
||||
<a href="{{url($item->url)}}" title="{{$item->title}}">
|
||||
@if($item->video)
|
||||
<span class="icon video"></span>
|
||||
@elseif($item->images && count($item->images) > 1)
|
||||
<span class="icon gallery"></span>
|
||||
@endif
|
||||
<img src='{{$item->images && count($item->images) ? $imgBase . $item->images[0]->url : '/images/noimage.png'}}'
|
||||
alt='img'>
|
||||
</a>
|
||||
</div>
|
||||
<div class="col-8">
|
||||
<h2><a href="{{url($item->url)}}"
|
||||
title="{{$item->title}}">{!!$item->title!!}</a></h2>
|
||||
<?php
|
||||
$time = Formatter::relativeDate($item->published) . ' om ' . $item->published->format('H:i');
|
||||
if ($item->edited && ($item->edited->format('d m H i') != $item->published->format('d m H i'))) {
|
||||
$time .= ' | bijgewerkt: '
|
||||
. ($item->edited->format('d m') != $item->published->format('d m') ? strtolower(Formatter::relativeDate($item->edited)) : '')
|
||||
. $item->edited->format('H:i') . ' uur';
|
||||
}
|
||||
$time = str_replace(' ', ' ', $time);
|
||||
?>
|
||||
<span class="post_date" title="{{$time}}">
|
||||
<i class="fa-regular fa-clock"></i> {{$time}}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
@endforeach
|
||||
</ul>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
@foreach($content as $block)
|
||||
@foreach($content as $block)
|
||||
@if($block->type == "headerRichA")
|
||||
@php($block->image->url = isset($block->image->crops)
|
||||
? $block->image->crops->{'16:9'}->{'1600'}
|
||||
@@ -23,11 +23,11 @@
|
||||
@elseif($block->type == "quote")
|
||||
<blockquote>
|
||||
{!!$block->text!!}
|
||||
<div class="author">{{$block->name}}</div>
|
||||
<div class="author">{{$block->name}}</div>
|
||||
</blockquote>
|
||||
@elseif($block->type == "image")
|
||||
@elseif($block->type == "image")
|
||||
<?php
|
||||
if(isset($block->image->imageWide))
|
||||
if(isset($block->image->imageWide))
|
||||
$image = $block->image->imageWide;
|
||||
else if(isset($block->image->crop))
|
||||
$image = $block->image->crop;
|
||||
@@ -42,30 +42,43 @@
|
||||
<img src="{{$image}}" class="attachment-small-slider-thumb size-small-slider-thumb wp-post-image" alt="{{$block->image->title}}" title="" style="display: block;">
|
||||
</a>
|
||||
<div class="sentence">
|
||||
@if(isset($block->image->caption))
|
||||
<span class="text">{{$block->image->caption}}</span>
|
||||
@elseif(isset($block->image->title))
|
||||
<span class="text">{{$block->image->title}}</span>
|
||||
@endif
|
||||
@if(isset($block->image->author))
|
||||
<span class="author">{{$block->image->author}}</span>
|
||||
@endif
|
||||
<?php
|
||||
$sentence = [];
|
||||
if (isset($block->image->caption) && $block->image->caption) {
|
||||
$sentence[] = '<span class="text">' . $block->image->caption . '</span>';
|
||||
} elseif (isset($block->image->title) && $block->image->title) {
|
||||
$sentence[] = '<span class="text">' . $block->image->title . '</span>';
|
||||
}
|
||||
if (isset($block->image->author) && $block->image->author) {
|
||||
$sentence[] = '<span class="author">' . $block->image->author . '</span>';
|
||||
}
|
||||
$sentence = join('<span class="separator">|</span>', $sentence);
|
||||
?>
|
||||
{!!$sentence!!}
|
||||
</div>
|
||||
@endif
|
||||
@elseif($block->type == "video" || $block->type == "headerVideo")
|
||||
@include('widgets/mediaplayer')
|
||||
<video controls>
|
||||
<?php
|
||||
$attr = '';
|
||||
if (isset($block->video->images[0]->imageMedia) && $block->video->images[0]->imageMedia) {
|
||||
$attr = ' poster="' . $block->video->images[0]->imageMedia . '"';
|
||||
}
|
||||
?>
|
||||
<video controls{!!$attr!!}>
|
||||
@foreach($block->video->streams as $stream)
|
||||
<source src="{!!$stream->stream_url!!}" type="application/x-mpegurl" />
|
||||
<source src="{!!$stream->stream_url!!}" type="application/x-mpegurl" />
|
||||
@endforeach
|
||||
</video>
|
||||
<span class="author">{{$block->video->author}}</span>
|
||||
<div class="sentence">
|
||||
<span class="author">{{$block->video->author}}</span>
|
||||
</div>
|
||||
@elseif($block->type == "carousel")
|
||||
<div class="horizontal_carousel_container gallery">
|
||||
<ul class="horizontal_carousel visible-5 autoplay-1 scroll-1 navigation-1 easing-easeInOutQuint duration-750">
|
||||
@foreach($block->items as $image)
|
||||
<?php
|
||||
if(isset($image->image->imageWide))
|
||||
if(isset($image->image->imageWide))
|
||||
$img = $image->image->imageWide;
|
||||
else if(isset($block->image->crop))
|
||||
$image = $block->image->crop;
|
||||
|
||||
@@ -1,38 +1,27 @@
|
||||
@php($i = 0)
|
||||
@foreach($podcasts as $podcast)
|
||||
@if($i % 2 == 0)
|
||||
@if($i > 0) </ul><!--/.row--> @endif
|
||||
<ul class='blog row grid'>
|
||||
@endif
|
||||
<?php $url = route('gemist.fragment') . $podcast->url; ?>
|
||||
<li class="post card column column_1_2">
|
||||
<div class="post_content">
|
||||
<h2><a href="{{$url}}" title="{{$podcast->title}}">{!!$podcast->titleWithoutProgram()!!}</a></h2>
|
||||
<ul class="post_details">
|
||||
@if($podcast->program)
|
||||
<li class="category">
|
||||
<a href="{{ route('programma') . $podcast->program->url }}" title="{{$podcast->program->name}}">{{$podcast->program->name}}</a>
|
||||
</li>
|
||||
@endif
|
||||
<li class="date">
|
||||
{{ Formatter::relativeDate($podcast->created) }}
|
||||
</li>
|
||||
</ul>
|
||||
<div class="clearfix"></div>
|
||||
@if($podcast->image)
|
||||
<a href="{{$url}}" title="{{$podcast->title}}" class="fixed-height">
|
||||
<img src='{{$imgBase . $podcast->image->url}}' alt='{{$podcast->image->title}}'>
|
||||
</a>
|
||||
@endif
|
||||
<p>{!! Formatter::excerpt($podcast->content, 200) !!}</p>
|
||||
<a class="read_more" href="{{route('gemist.fragment') . $podcast->url}}" title="Luister fragment"><span class="arrow"></span><span>Luister fragment</span></a>
|
||||
<span class="clearfix"></span>
|
||||
</div>
|
||||
</li>
|
||||
<ul>
|
||||
@foreach($podcasts as $podcast)
|
||||
<?php $url = route('gemist.fragment') . $podcast->url; ?>
|
||||
<li class="post">
|
||||
<div class="post_content">
|
||||
<h2><a href="{{$url}}" title="{{$podcast->title}}">{!!$podcast->titleWithoutProgram()!!}</a></h2>
|
||||
<div class="sub_title">
|
||||
@if ($podcast->program)
|
||||
<a class="program_name" href="{{ route('programma') . $podcast->program->url }}"
|
||||
title="{{$podcast->program->name}}">{{$podcast->program->name}}</a>
|
||||
@endif
|
||||
<?php /** @var boolean $showTime **/ $time = Formatter::relativeDate($podcast->created) . ($showTime ? ' om ' . $podcast->published->format('H:i') : ''); ?>
|
||||
<span class="post_date"
|
||||
title="{{$time}}">
|
||||
<i class="fa-regular fa-clock"></i> {{$time}}
|
||||
</span>
|
||||
</div>
|
||||
@if($showImage && $podcast->image)
|
||||
<a href="{{$url}}" title="{{$podcast->title}}" class="fixed-height">
|
||||
<img src='{{$imgBase . $podcast->image->url}}' alt='{{$podcast->image->title}}'>
|
||||
</a>
|
||||
@endif
|
||||
</div>
|
||||
</li>
|
||||
|
||||
@php($i++)
|
||||
@endforeach
|
||||
|
||||
@if($i)
|
||||
</ul><!--/.row-->
|
||||
@endif
|
||||
@endforeach
|
||||
</ul>
|
||||
|
||||
Reference in New Issue
Block a user