Uitgelicht podcast [#00028]
This commit is contained in:
@@ -22,13 +22,9 @@ class HomeController extends Controller
|
|||||||
$populair[] = new \Model\NewsItem($newsItem);
|
$populair[] = new \Model\NewsItem($newsItem);
|
||||||
}
|
}
|
||||||
|
|
||||||
$podcasts = [];
|
$apiResult = $this->API('podcast/overzicht?aantal=15');
|
||||||
$apiResult = $this->API('podcast/overzicht?aantal=3');
|
$index = array_rand($apiResult->podcasts);
|
||||||
$podcast = new \Model\Podcast($apiResult->podcasts[0]);
|
$podcast = new \Model\Podcast($apiResult->podcasts[$index]);
|
||||||
foreach ($apiResult->podcasts as $_podcast) {
|
return view('home', ['populair' => $populair, 'podcast' => $podcast, 'title' => 'Home', 'news' => $news, 'searchURL' => 'nieuws/zoeken']);
|
||||||
$podcasts[] = new \Model\Podcast($_podcast);
|
|
||||||
}
|
|
||||||
|
|
||||||
return view('home', ['populair' => $populair, 'podcasts' => $podcasts, 'podcast' => $podcast, 'title' => 'Home', 'news' => $news, 'searchURL' => 'nieuws/zoeken']);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
6
public/css/style.css
vendored
6
public/css/style.css
vendored
@@ -1231,7 +1231,8 @@ div.pp_default .pp_close:hover {
|
|||||||
.post_container .post_body h3 {
|
.post_container .post_body h3 {
|
||||||
font-size: 15px;
|
font-size: 15px;
|
||||||
}
|
}
|
||||||
.post_container .post_body .sentence {
|
.post_container .post_body .sentence,
|
||||||
|
.box.featured .sentence {
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
font-style: italic;
|
font-style: italic;
|
||||||
line-height: 1.3;
|
line-height: 1.3;
|
||||||
@@ -1240,7 +1241,8 @@ div.pp_default .pp_close:hover {
|
|||||||
display: block;
|
display: block;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
.post_container .post_body .sentence span {
|
.post_container .post_body .sentence span,
|
||||||
|
.box.featured .sentence span {
|
||||||
padding: 0 5px;
|
padding: 0 5px;
|
||||||
}
|
}
|
||||||
.post_container .post_body blockquote {
|
.post_container .post_body blockquote {
|
||||||
|
|||||||
@@ -170,12 +170,28 @@
|
|||||||
|
|
||||||
@if ($podcast)
|
@if ($podcast)
|
||||||
<?php $url = route('gemist.fragment') . $podcast->url; ?>
|
<?php $url = route('gemist.fragment') . $podcast->url; ?>
|
||||||
<h4 class="box_header"><span>Uitgelicht</span></h4>
|
<h4 class="box_header"><span>Uitgelicht fragment</span></h4>
|
||||||
<div class="box featured">
|
<div class="box featured">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-12 col-md-6">
|
<div class="col-12 col-md-6">
|
||||||
<a href="{{$url}}" title="{{$podcast->title}}">
|
<a href="{{$url}}" title="{{$podcast->title}}">
|
||||||
<img src="{{$podcast->image && $podcast->image->url ? $imgBase . $podcast->image->url : '/images/noimage.png'}}"/>
|
<img src="{{($hasImage = $podcast->image && $podcast->image->url) ? $imgBase . $podcast->image->url : '/images/noimage.png'}}"/>
|
||||||
|
<div class="sentence">
|
||||||
|
<?php
|
||||||
|
$sentence = [];
|
||||||
|
if ($hasImage) {
|
||||||
|
$sentence[] = '<span class="text">' . $podcast->image->title . '</span>';
|
||||||
|
} elseif (isset($podcast->image->title) && $podcast->image->title) {
|
||||||
|
$sentence[] = '<span class="text">' . $podcast->image->title . '</span>';
|
||||||
|
}
|
||||||
|
if (isset($podcast->image->author) && $podcast->image->author) {
|
||||||
|
$sentence[] = '<span class="author">' . $podcast->image->author . '</span>';
|
||||||
|
}
|
||||||
|
$sentence = join('<span class="separator">|</span>', $sentence);
|
||||||
|
?>
|
||||||
|
{!!$sentence!!}
|
||||||
|
</div>
|
||||||
|
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-12 col-md-6">
|
<div class="col-12 col-md-6">
|
||||||
|
|||||||
Reference in New Issue
Block a user