Uitgelicht podcast [#00028]
This commit is contained in:
@@ -22,13 +22,9 @@ class HomeController extends Controller
|
||||
$populair[] = new \Model\NewsItem($newsItem);
|
||||
}
|
||||
|
||||
$podcasts = [];
|
||||
$apiResult = $this->API('podcast/overzicht?aantal=3');
|
||||
$podcast = new \Model\Podcast($apiResult->podcasts[0]);
|
||||
foreach ($apiResult->podcasts as $_podcast) {
|
||||
$podcasts[] = new \Model\Podcast($_podcast);
|
||||
}
|
||||
|
||||
return view('home', ['populair' => $populair, 'podcasts' => $podcasts, 'podcast' => $podcast, 'title' => 'Home', 'news' => $news, 'searchURL' => 'nieuws/zoeken']);
|
||||
$apiResult = $this->API('podcast/overzicht?aantal=15');
|
||||
$index = array_rand($apiResult->podcasts);
|
||||
$podcast = new \Model\Podcast($apiResult->podcasts[$index]);
|
||||
return view('home', ['populair' => $populair, '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 {
|
||||
font-size: 15px;
|
||||
}
|
||||
.post_container .post_body .sentence {
|
||||
.post_container .post_body .sentence,
|
||||
.box.featured .sentence {
|
||||
font-size: 12px;
|
||||
font-style: italic;
|
||||
line-height: 1.3;
|
||||
@@ -1240,7 +1241,8 @@ div.pp_default .pp_close:hover {
|
||||
display: block;
|
||||
width: 100%;
|
||||
}
|
||||
.post_container .post_body .sentence span {
|
||||
.post_container .post_body .sentence span,
|
||||
.box.featured .sentence span {
|
||||
padding: 0 5px;
|
||||
}
|
||||
.post_container .post_body blockquote {
|
||||
|
||||
@@ -170,12 +170,28 @@
|
||||
|
||||
@if ($podcast)
|
||||
<?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="row">
|
||||
<div class="col-12 col-md-6">
|
||||
<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>
|
||||
</div>
|
||||
<div class="col-12 col-md-6">
|
||||
|
||||
Reference in New Issue
Block a user