2024-11-27
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
---
|
||||
layout: base
|
||||
---
|
||||
|
||||
<div class="my-3">
|
||||
<h1>{{title}}</h1>
|
||||
<hr>
|
||||
</div>
|
||||
|
||||
{{{content}}}
|
||||
@@ -1,4 +1,5 @@
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
@@ -26,6 +27,15 @@
|
||||
<main class="container p-0 p-md-4">
|
||||
{{{content}}}
|
||||
</main>
|
||||
<footer class="bg-dark text-light py-3">
|
||||
<div class="container d-flex justify-content-between align-items-center">
|
||||
<!-- Copyright Notice -->
|
||||
<p class="mb-0">© <span id="currentYear">{{year}}</span> {{site.name}}. All rights reserved.</p>
|
||||
|
||||
<!-- Members Button -->
|
||||
<a href="/members" class="btn btn-outline-secondary btn-sm ">Members</a>
|
||||
</div>
|
||||
</footer>
|
||||
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js"
|
||||
integrity="sha384-geWF76RCwLtnZ8qwWowPQNguL3RmwHVBC9FhGdlKrxdiJJigb/j/68SIy3Te4Bkz"
|
||||
crossorigin="anonymous" webc:keep></script>
|
||||
|
||||
@@ -1,34 +1,14 @@
|
||||
---
|
||||
layout: base-with-heading
|
||||
|
||||
---
|
||||
|
||||
<section class="">
|
||||
{{{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}}
|
||||
</section>
|
||||
<hr>
|
||||
<h1>Episodes</h1>
|
||||
{{#each episodes}}
|
||||
<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}}<strong>{{data.episode}}</strong>{{/if}}
|
||||
</a>
|
||||
</h5>
|
||||
<span class="card-subtitle mb-2 text-body-secondary">{{{date this.date "MMM D, YYYY"}}}</h6>
|
||||
</div>
|
||||
</div>
|
||||
{{/each}}
|
||||
<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>
|
||||
{{#each pagination.hrefs}}
|
||||
|
||||
<li class="page-item {{#is @index ../pagination.pageNumber }}active{{/is}}" page-number="{{../pagination.pageNumber}}" index="{{@index}}"><a class="page-link " href="{{this}}">{{plus @index 1}}</a></li>
|
||||
{{/each}}
|
||||
<li class="page-item"><a class="page-link {{#eq pagination.pageNumber (minus (length pagination.hrefs) 1)}}disabled{{/eq}}" href="{{pagination.next}}">Next</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
{{>episode_list_paginated episodes=episodes pagination=pagination}}
|
||||
17
layouts/episode_card_grid.hbs
Normal file
17
layouts/episode_card_grid.hbs
Normal file
@@ -0,0 +1,17 @@
|
||||
{{log toList}}
|
||||
<div class="row row-cols-2 g-1">
|
||||
{{#each (latest_episodes toList limit)}}
|
||||
<div class="col">
|
||||
<div class="card m-2">
|
||||
<a href={{{this.url}}}><img src="{{this.data.image}}" class="card-img-top"></a>
|
||||
<div class="card-body">
|
||||
<h1 class="card-title text-truncate fs-6"><a href={{{this.url}}}>{{#if data.title}}{{{data.title}}}{{else}}Episode {{data.episode}}{{/if}}</a></h1>
|
||||
<span class="card-subtitle text-body-secondary fs-6">Season {{data.season}}, Episode {{data.episode}}</span><br>
|
||||
<span class="card-subtitle text-body-secondary fs-6">{{{date this.date "MMM D, YYYY"}}}</h6>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{/each}}
|
||||
</div>
|
||||
|
||||
|
||||
23
layouts/episode_list_paginated.hbs
Normal file
23
layouts/episode_list_paginated.hbs
Normal file
@@ -0,0 +1,23 @@
|
||||
{{#each episodes}}
|
||||
<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}}<strong>{{data.episode}}</strong>{{/if}}
|
||||
</a>
|
||||
</h5>
|
||||
<span class="card-subtitle mb-2 text-body-secondary">{{{date this.date "MMM D, YYYY"}}}</span>
|
||||
{{#if data.podcast.enclosureUrl}}<br><a href="{{data.podcast.enclosureUrl}}">Download</a>{{/if}}
|
||||
</div>
|
||||
</div>
|
||||
{{/each}}
|
||||
</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>
|
||||
{{#each pagination.hrefs}}
|
||||
<li class="page-item {{#is @index ../pagination.pageNumber }}active{{/is}}" page-number="{{../pagination.pageNumber}}" index="{{@index}}"><a class="page-link " href="{{this}}">{{plus @index 1}}</a></li>
|
||||
{{/each}}
|
||||
<li class="page-item"><a class="page-link {{#eq pagination.pageNumber (minus (length pagination.hrefs) 1)}}disabled{{/eq}}" href="{{pagination.next}}">Next</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
@@ -1,13 +1,13 @@
|
||||
---js
|
||||
{
|
||||
layout: "base",
|
||||
latest_episodes: function(episodes) {
|
||||
return episodes.sort().reverse().slice(0,4)
|
||||
latest_episodes: function(episodes, limit) {
|
||||
return episodes.sort().reverse().slice(0,limit)
|
||||
}
|
||||
}
|
||||
---
|
||||
<div class="hero">
|
||||
<h1>{{title}}</h1>
|
||||
<h1>{{heroText}}</h1>
|
||||
<section class="text-muted">
|
||||
{{{content}}}
|
||||
</section>
|
||||
@@ -17,22 +17,10 @@
|
||||
{{/if}}
|
||||
</section>
|
||||
</div>
|
||||
<section class="py-5">
|
||||
<hr>
|
||||
<section class="">
|
||||
<h1 class="text-center fs-2">Latest Episodes</h1>
|
||||
<div class="container" style="max-width:500px">
|
||||
<div class="row row-cols-2 g-1">
|
||||
{{#each (latest_episodes collections.episode)}}
|
||||
<div class="col">
|
||||
<div class="card m-2">
|
||||
<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}}, Episode {{data.episode}}</h6>
|
||||
<span class="card-subtitle mb-2 text-body-secondary">{{{date this.date "MMM D, YYYY"}}}</h6>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{/each}}
|
||||
</div>
|
||||
{{>episode_card_grid toList=collections.episode limit=4}}
|
||||
</div>
|
||||
</section>
|
||||
@@ -48,8 +48,7 @@ class PodcastFeed {
|
||||
itunesImage: data.itunes?.image || data.site.imageUrl || `${data.site.url}${data.page.filePathStem}.jpg`
|
||||
});
|
||||
|
||||
const episodes = data.collections.episode.filter(episode=>episode.data.podcast!=false)
|
||||
const items = data.tags ? episodes.filter(episode=>data.tags.every(tag=>episode.data.tags.includes(tag))) : episodes
|
||||
const items = data.collections[data.episodeCollection]?.filter(episode=>episode.data.podcast!=false)
|
||||
|
||||
items.forEach(episode=>{
|
||||
// const duration = getMp3Duration(`../episodes/s${zero_pad_season}/s${zero_pad_season}e${episode.data.episode}.mp3`)
|
||||
@@ -57,7 +56,7 @@ class PodcastFeed {
|
||||
feed.addItem({
|
||||
title: `${episode.data.podcast.title}`,
|
||||
description: episode.content,
|
||||
url: episode.url, // link to the item
|
||||
url: data.site.url+this.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:`${episode.data.podcast.enclosureUrl}`}, // optional enclosure
|
||||
|
||||
@@ -9,28 +9,7 @@ eleventyComputed:
|
||||
<a href="{{ page.url }}" class="badge text-bg-dark fw-light rounded-1">{{ page.data.title }}</a>
|
||||
{{/with}}
|
||||
{{/each}}
|
||||
<hr>
|
||||
<div>
|
||||
<h3>Episodes</h3>
|
||||
{{#each episodes}}
|
||||
<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}}<strong>{{data.episode}}</strong>{{/if}}
|
||||
</a>
|
||||
</h5>
|
||||
<span class="card-subtitle mb-2 text-body-secondary">{{{date this.date "MMM D, YYYY"}}}</h6>
|
||||
</div>
|
||||
</div>
|
||||
{{/each}}
|
||||
</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>
|
||||
{{#each pagination.hrefs}}
|
||||
|
||||
<li class="page-item {{#is @index ../pagination.pageNumber }}active{{/is}}" page-number="{{../pagination.pageNumber}}" index="{{@index}}"><a class="page-link " href="{{this}}">{{plus @index 1}}</a></li>
|
||||
{{/each}}
|
||||
<li class="page-item"><a class="page-link {{#eq pagination.pageNumber (minus (length pagination.hrefs) 1)}}disabled{{/eq}}" href="{{pagination.next}}">Next</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
{{>episode_list_paginated episodes=episodes pagination=pagination}}
|
||||
Reference in New Issue
Block a user