From 312cc3f19a48b560ce64f195a8364916d6a0b4aa Mon Sep 17 00:00:00 2001 From: "Martin Hinshelwood nkdAgility.com" Date: Fri, 15 Nov 2024 08:37:51 +0000 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20(podcasts):=20enhance=20podcast=20c?= =?UTF-8?q?ontent=20with=20YouTube=20integration=20and=20modularize=20layo?= =?UTF-8?q?ut?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Update podcast content to include YouTube video integration by adding `youtube_video_id` to the parameters and using it in iframes. This enhances the user experience by allowing video playback directly on the site. Modularize the podcast layout by creating a new partial `podcastB.html` to improve code maintainability and reusability. Refactor the podcast list layout to use the new partial, reducing repetition and simplifying the HTML structure. These changes aim to improve the site's functionality and maintainability. --- site/content/podcasts/_content.gotmpl | 3 +- site/layouts/_default/baseof.html | 2 +- site/layouts/index.html | 2 +- site/layouts/partials/podcastA.html | 8 +++--- site/layouts/partials/podcastB.html | 31 +++++++++++++++++++++ site/layouts/podcasts/list.html | 40 +++------------------------ 6 files changed, 43 insertions(+), 43 deletions(-) create mode 100644 site/layouts/partials/podcastB.html diff --git a/site/content/podcasts/_content.gotmpl b/site/content/podcasts/_content.gotmpl index ea9918c..82cdc88 100644 --- a/site/content/podcasts/_content.gotmpl +++ b/site/content/podcasts/_content.gotmpl @@ -3,13 +3,14 @@ {{ range $episodes }} {{ $content := dict "mediaType" "text/markdown" - "value" .description + "value" (printf "%s\n\n%s" .description .iframe) }} {{ $params := dict "duration" .duration_ms "preview" (index .images 0).url "audio_preview_url" .audio_preview_url "id" .id + "youtube_video_id" .youtube_video_id }} {{ $dates := dict "date" (time.AsTime .release_date) }} {{ $page := dict diff --git a/site/layouts/_default/baseof.html b/site/layouts/_default/baseof.html index 243e839..6d7ad37 100644 --- a/site/layouts/_default/baseof.html +++ b/site/layouts/_default/baseof.html @@ -78,7 +78,7 @@
-

Our {{ .Page.Title }}

+

{{ if eq .Kind "section" }}Our {{ end }}{{ .Page.Title }}

-
{{ .Title }}
+
{{ .Title }}
-