Nieuws layout
This commit is contained in:
38
website/resources/views/partial/newslist_small.blade.php
Normal file
38
website/resources/views/partial/newslist_small.blade.php
Normal file
@@ -0,0 +1,38 @@
|
||||
@php($imgBase = 'https://nhgooi.nl')
|
||||
@foreach($news as $item)
|
||||
@if($loop->index % 3 == 0)
|
||||
<ul class="blog medium clearfix">
|
||||
@endif
|
||||
<li class="post">
|
||||
<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 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)
|
||||
</ul>
|
||||
@endif
|
||||
@endforeach
|
||||
30
website/resources/views/partial/newslistitems.blade.php
Normal file
30
website/resources/views/partial/newslistitems.blade.php
Normal file
@@ -0,0 +1,30 @@
|
||||
<div class="row blocks blocks-large" data-displayswitch="blocksContainer">
|
||||
@php($i = 0)
|
||||
@foreach($news as $newsItem)
|
||||
@php($image = isset($newsItem->images) && count($newsItem->images) ? $newsItem->images[0] : null)
|
||||
|
||||
<div class="block block-news col-md-4 col-sm-6 col-xs-12">
|
||||
<a href="{{url($newsItem->url)}}" title="{{$image ? $image->title : $newsItem->title}}" alt="{{$image ? $image->title : $newsItem->title}}">
|
||||
<figure>
|
||||
<div class="image-box">
|
||||
@if($newsItem->video) <span class="item-type icon-video"></span> @endif
|
||||
<img alt="{{$image ? $image->title : $newsItem->title}}" src="{{ $image ? url( $image->url ) : url( $newsItem->video ? 'images/video.png' : 'images/noimage.png') }}" title="{{ strip_tags($image ? $image->title : $newsItem->title) }}" @if(!$image) class="hidden-xs" @endif>
|
||||
</div>
|
||||
<figcaption>
|
||||
<h3 class="block-title">{{$newsItem->title}}</h3>
|
||||
<p class="block-lead hidden-xs">
|
||||
{!!Formatter::excerpt($newsItem->content, 250)!!}
|
||||
</p>
|
||||
</figcaption>
|
||||
</figure>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
@php($i++)
|
||||
@if($i % 3 == 0 && $i != count($news) - 1)
|
||||
</div>
|
||||
<div class="row blocks blocks-large" data-displayswitch="blocksContainer">
|
||||
@endif
|
||||
@endforeach
|
||||
|
||||
</div>
|
||||
37
website/resources/views/partial/nh_story.blade.php
Normal file
37
website/resources/views/partial/nh_story.blade.php
Normal file
@@ -0,0 +1,37 @@
|
||||
@foreach($content as $block)
|
||||
@if($block->type == "headerRichA")
|
||||
@php($block->image->url = $block->image->crops->{'16:9'}->{'1600'})
|
||||
<a href="{{$block->image->url}}" class="post_image page_margin_top prettyPhoto" title="{{$block->image->title}}">
|
||||
<img src="{{$block->image->url}}" alt="{{$block->image->title}}">
|
||||
</a>
|
||||
<div class="sentence margin_top_10">
|
||||
<span class="text">{{$block->image->title}}</span>
|
||||
@if($block->image->author)
|
||||
<span class="author">{{$block->image->author}}</span>
|
||||
@endif
|
||||
</div>
|
||||
@elseif($block->type == "text")
|
||||
<div class="text">{!!$block->text!!}</div>
|
||||
@elseif($block->type == "intro")
|
||||
<h3 class="excerpt">{{strip_tags($block->text)}}</h3>
|
||||
@elseif($block->type == "quote")
|
||||
<blockquote>
|
||||
{!!$block->text!!}
|
||||
<div class="author">{{$block->name}}</div>
|
||||
</blockquote>
|
||||
@elseif($block->type == "image")
|
||||
<div class="mediabox-image">
|
||||
<img src="{{$block->image->imageWide}}" alt="{{$block->image->title}}" title="{{$block->image->title}} ©{{$block->image->author}}"/>
|
||||
<span class="mediabox-image-title">{{$block->image->imageWide}}</span>
|
||||
</div>
|
||||
@elseif($block->type == "video")
|
||||
@include('widgets/mediaplayer')
|
||||
<video controls>
|
||||
@foreach($block->video->streams as $stream)
|
||||
<source src="{!!$stream->stream_url!!}" type="application/x-mpegurl" />
|
||||
@endforeach
|
||||
</video>
|
||||
<span class="author">{{$block->video->author}}</span>
|
||||
@endif
|
||||
@endforeach
|
||||
|
||||
102
website/resources/views/partial/radioscheduleweek.blade.php
Normal file
102
website/resources/views/partial/radioscheduleweek.blade.php
Normal file
@@ -0,0 +1,102 @@
|
||||
<?php
|
||||
$dates = array();
|
||||
$byStartTime = array();
|
||||
|
||||
foreach($schedule as $item):
|
||||
$date = $item['starttime'];
|
||||
$time = $item['starttime']->format('H:i');
|
||||
$item['enddate'] = Formatter::fullDate($item['endtime'], 'W d m');
|
||||
while(true) {
|
||||
$formattedDate = Formatter::fullDate($date, 'W d m');
|
||||
$dates[$formattedDate] = null;
|
||||
|
||||
if(array_key_exists($time, $byStartTime)) {
|
||||
$byStartTime[$time][$formattedDate] = $item;
|
||||
} else {
|
||||
$byStartTime[$time] = array($formattedDate => $item);
|
||||
}
|
||||
|
||||
if($formattedDate == $item['enddate']) { break; }
|
||||
|
||||
$date->add(new DateInterval('P1D'));
|
||||
$time = '00:00';
|
||||
}
|
||||
endforeach;
|
||||
|
||||
$dates = array_keys($dates);
|
||||
$now = new \DateTime("now");
|
||||
?>
|
||||
|
||||
<table class="tt_timetable">
|
||||
<thead>
|
||||
<tr class="row_gray" style="background-color: #F0F0F0 !important;">
|
||||
<th></th>
|
||||
@for($d = 0; $d < 7; ++$d)
|
||||
<th>{{$dates[$d]}}</th>
|
||||
@endfor
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@for($h = 0; $h < 24; $h += 0.5)
|
||||
<tr class="{{$h == (int)$h ? "" : "row_gray"}}">
|
||||
<td class="tt_hours_column">
|
||||
{{$time = gmdate("H:i", $h * 3600)}} uur
|
||||
</td>
|
||||
@for($d = 0; $d < 7; ++$d)
|
||||
@php($date = $dates[$d])
|
||||
@if(isset($byStartTime[$time][$date]))
|
||||
<?php
|
||||
$item = $byStartTime[$time][$date];
|
||||
$duration = ($date == $item['enddate'])
|
||||
? ($item['endtime']->format('H') - $h)
|
||||
: (24 - $h);
|
||||
$slots = 2 * $duration;
|
||||
?>
|
||||
<td class="event" rowspan="{{$slots}}">
|
||||
<div class="event_container tt_tooltip" style="height: {{$slots * 20}}px;">
|
||||
<a class="event_header" href="#" title="{{$item['program']->name}}">{{$item['program']->name}}</a>
|
||||
<div>{!!Formatter::excerpt($item['program']->description, 200)!!}</div>
|
||||
<!-- <div class="tt_tooltip_text" style="width: 400px; height: 300px; top: -116px; left: 0px;">
|
||||
<div class="tt_tooltip_content">
|
||||
<b>{{$item['program']->name}}</b> <br/>
|
||||
{!!Formatter::excerpt($item['program']->description, 200)!!}
|
||||
</div>
|
||||
<div class="tt_tooltip_arrow"></div>
|
||||
</div> -->
|
||||
</div>
|
||||
|
||||
</td>
|
||||
@endif
|
||||
@endfor
|
||||
</tr>
|
||||
@endfor
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<div class="responsive">
|
||||
@php($date = null)
|
||||
@foreach($schedule as $item)
|
||||
@if(($formattedDate = Formatter::fullDate($item['starttime'], 'W d m')) != $date)
|
||||
@php($date = $formattedDate)
|
||||
@if($date != null) </ul> @endif
|
||||
<h5>{{$formattedDate}}</h2>
|
||||
<ul class="tt_items_list thin page_margin_top timetable_clearfix">
|
||||
@endif
|
||||
@php($isCurrent = ($now >= $item['starttime']) && ($now <= $item['endtime']))
|
||||
@php($class =( $item['program']->priority < 2 ? 'bg-primary'
|
||||
:( $item['program']->nonstop || $item['program']->rerun ? 'text-muted'
|
||||
:( $isCurrent ? 'bg-info active text-primary'
|
||||
:( ''
|
||||
)))))
|
||||
|
||||
<li class="timetable_clearfix">
|
||||
<div class="event_container">
|
||||
<a href="#" title="{{$item['program']->name}}" class="event_header">{{$item['program']->name}} </a>
|
||||
@if($isCurrent) <span class="bg-primary current-marker">Nu op NH Gooi</span> @endif
|
||||
<p>
|
||||
<p>{{Formatter::excerpt(strip_tags($item['program']->description), 200)}}</p>
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</ul>
|
||||
|
||||
Reference in New Issue
Block a user