From c817e3a17a842769f94781917be57c7452e8dde0 Mon Sep 17 00:00:00 2001 From: Roan Horning Date: Sun, 18 Sep 2022 16:18:05 -0400 Subject: [PATCH 1/4] Add MACRO media_baseurl Allow the audio files to be served from a different host --- site-generator | 6 ++++++ templates/shared-utils.tpl.html | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/site-generator b/site-generator index 1ad2734..91e090b 100755 --- a/site-generator +++ b/site-generator @@ -125,6 +125,8 @@ sub main { # from the generated list of pages. @page_args= grep { $_ ne 'DBI' } @page_args; @page_args= grep { $_ ne 'root_template' } @page_args; + @page_args= grep { $_ ne 'media_hostname' } @page_args; + }; foreach my $page_arg (@page_args) { my %parsed_arg = parse_page_arg($page_arg); @@ -142,6 +144,10 @@ sub main { $page_config->{'baseurl'} = $config{root_template}{baseurl}; } + if (exists $config{root_template}{media_hostname}) { + $page_config->{'media_hostname'} = $config{root_template}{media_hostname}; + } + if ($page_config->{'multipage'} && $page_config->{'multipage'} eq 'true') { if (scalar @{$parsed_arg{'ids'}} == 1) { @{$parsed_arg{'ids'}} = get_ids_from_db($tt, \$page_config); diff --git a/templates/shared-utils.tpl.html b/templates/shared-utils.tpl.html index 677c053..460ca90 100644 --- a/templates/shared-utils.tpl.html +++ b/templates/shared-utils.tpl.html @@ -39,6 +39,12 @@ .// + + +https:/// + + + From dbf011395c90b262c1d494aac1959c49413423c9 Mon Sep 17 00:00:00 2001 From: Roan Horning Date: Sun, 18 Sep 2022 16:21:00 -0400 Subject: [PATCH 2/4] Add MACRO listen_now --- templates/shared-listen-now.tpl.html | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 templates/shared-listen-now.tpl.html diff --git a/templates/shared-listen-now.tpl.html b/templates/shared-listen-now.tpl.html new file mode 100644 index 0000000..d6219a5 --- /dev/null +++ b/templates/shared-listen-now.tpl.html @@ -0,0 +1,19 @@ + + + + +

Listen Now

+

Duration:

+ + + + From c6e7a3c23928a6d6dda2a8a4ecb0540928e38d96 Mon Sep 17 00:00:00 2001 From: Roan Horning Date: Sun, 18 Sep 2022 16:23:35 -0400 Subject: [PATCH 3/4] Refactor templates to use listen_now MACRO --- templates/content-episode.tpl.html | 13 ++----------- templates/content-index.tpl.html | 13 ++----------- templates/content-twat_episode.tpl.html | 13 ++----------- 3 files changed, 6 insertions(+), 33 deletions(-) diff --git a/templates/content-episode.tpl.html b/templates/content-episode.tpl.html index fe24fa6..9b3b643 100644 --- a/templates/content-episode.tpl.html +++ b/templates/content-episode.tpl.html @@ -1,6 +1,7 @@ + correspondents/