Sidebar widgets
This commit is contained in:
@@ -1,18 +1,3 @@
|
||||
<?php
|
||||
/*
|
||||
$latest_news = json_decode(file_get_contents('http://api-dev.6fm.nl/nieuws/overzicht?pagina=1&aantal=3'))->news;
|
||||
|
||||
$news = [];
|
||||
foreach($latest_news as $raw)
|
||||
{
|
||||
$news[] = new \Model\NewsItem($raw);
|
||||
}
|
||||
Storage::disk('local')->put('laatste_nieuws.json', json_encode($news));
|
||||
*/
|
||||
|
||||
$latest_news = json_decode(Storage::disk('local')->get('laatste_nieuws.json'));
|
||||
?>
|
||||
|
||||
<div class="latest_news_scrolling_list_container">
|
||||
<ul>
|
||||
<li class="category">Laatste nieuws:</li>
|
||||
@@ -20,10 +5,9 @@ $latest_news = json_decode(Storage::disk('local')->get('laatste_nieuws.json'));
|
||||
<li class="right"><a href="#"></a></li>
|
||||
<li class="posts">
|
||||
<ul class="latest_news_scrolling_list">
|
||||
@foreach($latest_news as $item)
|
||||
@php($item = new \Model\NewsItem($item))
|
||||
@foreach($data as $item)
|
||||
<li>
|
||||
<a href="{{url($item->url)}}" title="{{$item->title}}">{{Formatter::excerpt($item->title, 70)}}</a>
|
||||
<a href="{{url($item->url)}}" title="{{$item->title}}">{{substr($item->title, 0, 60)}}{{strlen($item->title) < 60 ? "" : "..."}}</a>
|
||||
<span class="when">{{Formatter::relativeDate($item->published)}} {{$item->published->format('H:i')}}</span>
|
||||
</li>
|
||||
@endforeach
|
||||
|
||||
Reference in New Issue
Block a user