From b9f66b5b07f19285303d8fefb30f6493d8f95f44 Mon Sep 17 00:00:00 2001 From: Oliver Davies Date: Mon, 16 Dec 2024 12:00:00 +0000 Subject: [PATCH] Add a feature flag for using the native HTML audio ...player element --- app/config/sculpin_site.yml | 2 ++ app/config/sculpin_site_prod.yml | 2 ++ source/_layouts/podcast_episode.html.twig | 28 ++++++++++++++--------- 3 files changed, 21 insertions(+), 11 deletions(-) diff --git a/app/config/sculpin_site.yml b/app/config/sculpin_site.yml index b8feccb0..09ad1bfe 100644 --- a/app/config/sculpin_site.yml +++ b/app/config/sculpin_site.yml @@ -311,6 +311,8 @@ transistor: share: url: https://share.transistor.fm/e +use_transistor: false + youtube: channel: slug: opdavies diff --git a/app/config/sculpin_site_prod.yml b/app/config/sculpin_site_prod.yml index bac62bed..44c90eb5 100644 --- a/app/config/sculpin_site_prod.yml +++ b/app/config/sculpin_site_prod.yml @@ -3,3 +3,5 @@ imports: - sculpin_site.yml url: https://www.oliverdavies.uk + +use_transistor: true diff --git a/source/_layouts/podcast_episode.html.twig b/source/_layouts/podcast_episode.html.twig index fcf89388..d9f212e6 100644 --- a/source/_layouts/podcast_episode.html.twig +++ b/source/_layouts/podcast_episode.html.twig @@ -19,17 +19,23 @@ {% endblock %} {% block content_wrapper %} - {% if page.transistor.id %} -
- -
+ {% if site.use_transistor %} + {% if page.transistor.id %} +
+ +
+ {% endif %} + {% else %} + {% endif %} {{ parent() }}