Add podcast images

This commit is contained in:
2019-01-06 22:14:51 +00:00
parent aa2a74a2f5
commit 5deece89bf
6 changed files with 15 additions and 10 deletions

View File

@@ -36,11 +36,11 @@
<h2 class="title">Podcasts</h2>
<div class="page__columns">
<div class="page__cell">
<?php $podcast = windycoys_get_podcast_meta('tfc') ?>
<?php $podcast = windycoys_get_podcast_meta('xin') ?>
<?php get_template_part('partials/podcast') ?>
</div>
<div class="page__cell">
<?php $podcast = windycoys_get_podcast_meta('xin') ?>
<?php $podcast = windycoys_get_podcast_meta('tfc') ?>
<?php get_template_part('partials/podcast') ?>
</div>
</div>

View File

@@ -121,11 +121,12 @@ function windycoys_get_podcast_meta($id) {
$item = $rss->channel->item;
$date = strtotime((String) $item->pubDate);
return array(
id => $id,
from_cache => $res['from_cache'],
podcast_title => (String) $rss->channel->title,
podcast_description => (String) $rss->channel->description,
podcast_url => (String) $rss->channel->image->url,
podcast_episodes => windycoys_get_episodes_url($id),
artwork_url => (String) $rss->channel->image->url,
title => (String) $item->title,
description => (String) $item->description,
image => (String) $item->image['href'],

View File

@@ -1,18 +1,18 @@
<?php
global $podcast;
$artwork = get_template_directory_uri().'/images/'.$podcast['id'].'.png';
?>
<div class="excerpt">
<div class="excerpt__head">
<h3 class="excerpt__title">
<a class="link" href="<?php echo $podcast['podcast_episodes'] ?>">
<?php echo $podcast['podcast_title'] ?>
</a>
</h3>
<h4 class="excerpt__subtitle">
<img
class="excerpt__image"
title="<?php echo $podcast['podcast_title'] ?>"
src="<?php echo $artwork ?>">
<h3 class="excerpt__subtitle">
<a class="link" href="<?php echo $podcast['url'] ?>">
<?php echo $podcast['title'] ?>
</a>
</h4>
</h3>
</div>
<div class="excerpt__body">
<?php echo $podcast['description'] ?>