2024-11-24

This commit is contained in:
2024-11-24 11:24:58 -06:00
parent 1c3ea0b119
commit 4d8338b1be
60 changed files with 638 additions and 384 deletions

View File

@@ -4,7 +4,11 @@ layout: base-with-heading
---
{{{content}}}
{{#each (extractUniqueTags pagination "season")}}
{{#with (findPageByTag this ../collections) as |page|}}
<a href="{{ page.url }}" class="badge text-bg-dark fw-light rounded-1">{{ page.data.title }}</a>
{{/with}}
{{/each}}
<h1>Episodes</h1>
<ul>
{{#each episodes}}
@@ -12,7 +16,7 @@ layout: base-with-heading
<div class="card-body">
<h5 class="card-title">
<a href="{{{this.page.url}}}">
{{#if data.title}}<strong>{{{data.episode}}}</strong>: {{{data.title}}}{{else}}{{data.episode}}{{/if}}
{{#if data.title}}<strong>{{{data.episode}}}</strong>: {{{data.title}}}{{else}}<strong>{{data.episode}}</strong>{{/if}}
</a>
</h5>
<span class="card-subtitle mb-2 text-body-secondary">{{{date this.date "MMM D, YYYY"}}}</h6>

View File

@@ -9,17 +9,22 @@ eleventyComputed:
<div class="row">
<div class="col"><img src="{{{this.url}}}../image.jpg" class="img-fluid"></div>
<div class="col">
<h1>{{#if title}}{{{title}}}{{else}}Episode {{episode}}{{/if}}<a href="{{{podcast.url}}}" ><i class="bi bi-download m-1"></i></a></h1>
{{#if podcast.url}}
<h1>{{#if title}}{{{title}}}{{else}}Episode {{episode}}{{/if}}</h1>
Season {{season}}, Episode {{episode}} <br>
<date>{{formatDate this.date "MMMM d, yyyy"}}</date><br>
{{#if podcast.enclosureUrl}}
<a href="{{{podcast.enclosureUrl}}}">Download</a>
<audio controls>
<source src="{{{podcast.url}}}" type="audio/mpeg">
<source src="{{{podcast.enclosureUrl}}}" type="audio/mpeg">
Your browser does not support the audio element.
</audio>
{{/if}}
<div class="d-flex felx-wrap m-1 gap-1">
{{#each tags}}
{{#unlessEq this "episode"}}
<div class="badge text-bg-dark fw-light rounded-1">{{{this}}}</div>
{{#with (findPageByTag this ../collections) as |page|}}
<a href="{{ page.url }}" class="badge text-bg-dark fw-light rounded-1">{{ page.data.title }}</a>
{{/with}}
{{/unlessEq}}
{{/each}}

View File

@@ -27,7 +27,7 @@
<a href={{{this.url}}}><img src="{{this.data.image}}" class="card-img-top"></a>
<div class="card-body">
<h5 class="card-title"><a href={{{this.url}}}>{{#if data.title}}{{{data.title}}}{{else}}Episode {{data.episode}}{{/if}}</a></h5>
<h6 class="card-subtitle mb-2 text-body-secondary">Season {{{data.season}}}</h6>
<h6 class="card-subtitle mb-2 text-body-secondary">Season {{data.season}}, Episode {{data.episode}}</h6>
<span class="card-subtitle mb-2 text-body-secondary">{{{date this.date "MMM D, YYYY"}}}</h6>
</div>
</div>

View File

@@ -52,20 +52,15 @@ class PodcastFeed {
const items = data.tags ? episodes.filter(episode=>data.tags.every(tag=>episode.data.tags.includes(tag))) : episodes
items.forEach(episode=>{
const episode_data = episode.data
var zero_pad_season
zero_pad_season = episode_data.season.toString().padStart(2, '0')
// const duration = getMp3Duration(`../episodes/s${zero_pad_season}/s${zero_pad_season}e${episode_data.episode}.mp3`)
// const duration = getMp3Duration(`../episodes/s${zero_pad_season}/s${zero_pad_season}e${episode.data.episode}.mp3`)
/* loop over data and add to feed */
feed.addItem({
title: `${episode_data.podcast.title}`,
title: `${episode.data.podcast.title}`,
description: episode.content,
url: episode.url, // link to the item
guid: episode.url, // optional - defaults to url
date: episode_data.date, // any format that js Date can parse.
// enclosure : {url:`${data.site.url}/episodes/s${zero_pad_season}/s${zero_pad_season}e${episode_data.episode}.mp3`}, // optional enclosure
enclosure : {url:`${episode_data.podcast.url}`}, // optional enclosure
date: episode.data.date, // any format that js Date can parse.
enclosure : {url:`${episode.data.podcast.enclosureUrl}`}, // optional enclosure
// itunesDuration: duration,
});
})

View File

@@ -1,22 +1,29 @@
---
layout: base
layout: base-with-heading
eleventyComputed:
title: Season {{season}}
---
<h1>Season {{season}}</h1>
{{{content}}}
<ul>
{{#each (extractUniqueTags pagination "campaign")}}
{{#with (findPageByTag this ../collections) as |page|}}
<a href="{{ page.url }}" class="badge text-bg-dark fw-light rounded-1">{{ page.data.title }}</a>
{{/with}}
{{/each}}
<div>
<h3>Episodes</h3>
{{#each episodes}}
<li class="card my-2">
<div class="card my-2">
<div class="card-body">
<h5 class="card-title">
<a href="{{{this.page.url}}}">
{{#if data.title}}<strong>{{{data.episode}}}</strong>: {{{data.title}}}{{else}}{{data.episode}}{{/if}}
{{#if data.title}}<strong>{{{data.episode}}}</strong>: {{{data.title}}}{{else}}<strong>{{data.episode}}</strong>{{/if}}
</a>
</h5>
<span class="card-subtitle mb-2 text-body-secondary">{{{date this.date "MMM D, YYYY"}}}</h6>
</div>
</li>
</div>
{{/each}}
</ul>
</div>
<div aria-label="Page navigation">
<ul class="pagination">
<li class="page-item {{#eq pagination.pageNumber 0}}disabled{{/eq}}"><a class="page-link" href="{{pagination.previous}}">Previous</a></li>