- Add `.cache` to `.gitignore` for temporary build files. - Introduce Markdown snippets for creating Season 1 and Season 5 show notes in `.vscode/markdown.code-snippets`. - Update `.vscode/settings.json`: - Exclude `node_modules` directory. - Adjust quick suggestions to disable them for comments, strings, and others. - Remove unnecessary `console.log` statements from `episodes.11tydata.js`. - Add an image file `content/episodes/image.jpg`. - Implement a transcript search feature: - Add `search-transcripts.hbs` to enable searching transcript cues with time markers. - Add `transcript-index.11ty.js` to generate a searchable transcript index. - Update `search-index.11ty.js` to skip processing `<hr>` and `<img>` tags. - Enhance episode layout with `startAt` query parameter to allow audio playback from a specific time. - Add a new dependency: - `@11ty/eleventy-fetch` for fetching transcripts. - `media-captions` for parsing and handling transcript files. - Update package-lock.json and package.json to include new dependencies.
47 lines
1.4 KiB
Handlebars
47 lines
1.4 KiB
Handlebars
---
|
|
layout: "base"
|
|
eleventyComputed:
|
|
bodyClasses: "episode season-{{season}}"
|
|
---
|
|
<div class="bg-body-tertiary p-4 my-2 rounded">
|
|
<div class="row">
|
|
<div class="col"><img src="{{{this.image}}}" class="img-fluid"></div>
|
|
<div class="col">
|
|
<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}}
|
|
<a href="{{{podcast.enclosureUrl}}}">Download</a>
|
|
{{#if podcast.transcriptUrl}}| <a href="{{{podcast.transcriptUrl}}}">Transcript</a>{{/if}}
|
|
|
|
<div>
|
|
<audio controls>
|
|
<source src="{{{podcast.enclosureUrl}}}" id="audio-player" type="audio/mpeg">
|
|
Your browser does not support the audio element.
|
|
</audio>
|
|
</div>
|
|
<script>
|
|
params = new URLSearchParams(document.location.search)
|
|
let startAt = params.get('startAt')
|
|
if (startAt) {
|
|
document.getElementById("audio-player").currentTime = startAt
|
|
}
|
|
</script>
|
|
{{/if}}
|
|
<div class="d-flex felx-wrap m-1 gap-1">
|
|
{{#each tags}}
|
|
{{#unlessEq this "episode"}}
|
|
{{#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}}
|
|
</div>
|
|
</div>
|
|
|
|
</div>
|
|
</div>
|
|
|
|
{{{content}}}
|