Add podcast images
This commit is contained in:
@@ -62,3 +62,7 @@
|
||||
margin-bottom: var(--space-sm);
|
||||
background-color: var(--color-light-blue);
|
||||
}
|
||||
|
||||
.excerpt__image {
|
||||
height: 200px;
|
||||
}
|
||||
|
||||
BIN
images/tfc.png
Normal file
BIN
images/tfc.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.3 MiB |
BIN
images/xin.png
Normal file
BIN
images/xin.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 971 KiB |
@@ -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>
|
||||
|
||||
@@ -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'],
|
||||
|
||||
@@ -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'] ?>
|
||||
|
||||
Reference in New Issue
Block a user