Merge pull request '[I70] Add audio links' (#104) from I70-Add_audio_links into main

Reviewed-on: rho_n/hpr_generator#104
This commit is contained in:
Roan Horning 2023-04-02 13:08:42 +00:00
commit f2c9326e61
8 changed files with 40 additions and 30 deletions

View File

@ -248,6 +248,11 @@ pre.comment {
line-height: 1.2rem;
}
h3.title { margin: 1.25rem 0 0.75rem 0 }
p.meta { margin: 0.25rem 0 }
p.summary { margin: 0.25rem 0 }
p.listen-in { margin-top: 0 }
@media only screen and (max-width: 680px) {
#container {width: 95%;}
img#hprlogo {float: left; max-width: 85px; padding: .35em;}

View File

@ -62,11 +62,13 @@
</p>
<!--% FOREACH hpr_show IN hpr_shows; %-->
<!--% show_summary(hpr_show, 'hide_host') %-->
<!--% END %-->
<!--% show_summary(hpr_show, 'hide_host') %-->
<p class="listen-in"><!--% display_listen_in(hpr_show.id) %--></p>
<!--% END %-->
<!--% FOREACH twat_show IN twat_shows; %-->
<!--% twat_show_summary(twat_show, 'hide_host') %-->
<p class="listen-in"><!--% display_listen_in(twat_show.id,"twat") %--></p>
<!--% END %-->
</article>
<p><a href="contribute.html">Become a Correspondent</a></p>

View File

@ -18,10 +18,10 @@
</p>
<p><!--% show_avatar(episode.hostid, episode.host) %-->
Hosted by <a href="<!--% absolute_path(baseurl) %-->correspondents/<!--% zero_pad_left(episode.hostid) %-->.html"><!--% episode.host %--></a> on <span><!--% episode.date %--></span> is flagged as <span><!--% display_explicit(episode.explicit) %--></span> and is released under a <span><!--% episode.license %--> license</span>. <br>
<!--% display_tags(episode.tags) %--> <br>
<!--% display_tags(episode.tags) %-->
<label>Comments: </label><!--% display_comments_tally(episode.id, episode.eps_tally) %--> <br>
<!--% listen_now(episode, "hpr", baseurl, media_baseurl) %-->
<!--% display_listen_in(episode.id) %--> |
<!--% display_comments_tally(episode.id, episode.eps_tally) %-->
</p>
<h3><!--% show_series(episode.series, episode.seriesid, "Part of the series") %--></h3>
<p><em><!--% episode.series_description %--></em></p>

View File

@ -11,6 +11,7 @@
<!--% FOREACH episodes IN DBI.query(query_episodes)
%-->
<!--% show_summary(episodes) %-->
<p class="listen-in"><!--% display_listen_in(episodes.id) %--></p>
<!--% END %-->
<h2 id="twat_episodes">Today With a Techie Archived Shows</h2>
<p>

View File

@ -63,10 +63,10 @@
<h3><!--% latest_episodes.summary%--></h3>
<p class="meta"$><!--% show_avatar(latest_episodes.hostid, latest_episodes.host, host_cnt) %-->
Hosted by <a href="<!--% absolute_path(baseurl) %-->correspondents/<!--% zero_pad_left(latest_episodes.hostid) %-->.html"><!--% latest_episodes.host %--></a> on <!--% latest_episodes.date %--> is flagged as <!--% display_explicit(latest_episodes.explicit) %--> and released under a <!--% latest_episodes.license %--> license. <br>
<!--% display_tags(latest_episodes.tags) %--><br>
<!--% display_tags(latest_episodes.tags) %-->
<span><!--% show_series(latest_episodes.series, latest_episodes.seriesid) %--></span>
<span><label>Comments: </label><!--% display_comments_tally(latest_episodes.id, latest_episodes.eps_tally) %--></span><br>
<!--% listen_now(latest_episodes, "hpr", baseurl, media_baseurl) %-->
<small><!--% display_listen_in(latest_episodes.id) %--> <!--% show_series(latest_episodes.series, latest_episodes.seriesid) %--> |
<!--% display_comments_tally(latest_episodes.id, latest_episodes.eps_tally) %--></small>
</p>
</header>
<!--% tidy_notes(latest_episodes.notes) %-->
@ -84,6 +84,7 @@
<!--% FOREACH last_5_weeks_episodes IN DBI.query(query_last_5_weeks_episodes)
%-->
<!--% show_summary(last_5_weeks_episodes) %-->
<p class="listen-in"><!--% display_listen_in(last_5_weeks_episodes.id) %--></p>
<!--% END %-->
</article>
<h1>Older Shows</h1>

View File

@ -22,5 +22,6 @@
<!--% show_results = query_shows.execute(id) %-->
<!--% FOREACH show IN show_results %-->
<!--% show_summary(show) %-->
<p class="listen-in"><!--% display_listen_in(show.id) %--></p>
<!--% END %-->
</article>

View File

@ -19,20 +19,26 @@ from the series <em><a href="<!--% baseurl %-->series/<!--% zero_pad_left(series
<!--% IF episode_type == "" %--><!--% episode_type = 'hpr' %--><!--% END %-->
Listen in
<!--% IF episode_type == 'hpr' %-->
<a href="<!--% media_path(eps_id, episode_type, 'ogg', baseurl, media_baseurl) %-->">ogg</a>,
<a href="<!--% media_path(eps_id, episode_type, 'spx', baseurl, media_baseurl) %-->">spx</a>,
<a href="<!--% media_path(eps_id, episode_type, 'ogg', baseurl, media_baseurl) %-->" aria-label="Download <!--% episode_type %--><!--% zero_pad_left(eps_id) %--> as">ogg</a>,
<a href="<!--% media_path(eps_id, episode_type, 'spx', baseurl, media_baseurl) %-->" aria-label="Download <!--% episode_type %--><!--% zero_pad_left(eps_id) %--> as">spx</a>,
or
<!--% END %-->
<a href="<!--% media_path(eps_id, episode_type, 'mp3', baseurl, media_baseurl) %-->">mp3</a> format.
<a href="<!--% media_path(eps_id, episode_type, 'mp3', baseurl, media_baseurl) %-->" aria-label="Download <!--% episode_type %--><!--% zero_pad_left(eps_id) %--> as">mp3</a> format.
<!--% END %-->
<!--% MACRO display_comments_tally(eps_id, tally) BLOCK %-->
<a href="<!--% absolute_path(baseurl) %-->eps/hpr<!--% zero_pad_left(eps_id) %-->/index.html#comments">Comments (<!--% tally %-->)</a>.
<a href="<!--% absolute_path(baseurl) %-->eps/hpr<!--% zero_pad_left(eps_id) %-->/index.html#comments" aria-label="Comments for hpr<!--% zero_pad_left(eps_id) %-->"><!--% IF tally > 0 %--><!--% tally %--><!--% ELSE %-->(Be the first)<!--% END %--></a>.
<!--% END %-->
<!--% MACRO show_meta(show, hide_tags) BLOCK %-->
<span><label>Released:</label> <!--% show.date %-->.</span> <span><label>Duration:</label> <!--% display_episode_duration(show.duration) %-->.</span> <span><label>Flag:</label> <!--% display_explicit(show.explicit) %-->.</span> <span><!--% show_series(show.series, show.seriesid) %--></span> <br>
<!--% IF hide_tags == "" %--><!--% display_tags(tags) %--><!--% END %-->
<span><label>Released:</label> <!--% show.date %-->.</span>
<span><label>Duration:</label> <!--% display_episode_duration(show.duration) %-->.</span>
<span><label>Flag:</label> <!--% display_explicit(show.explicit) %-->.</span>
<span><!--% show_series(show.series, show.seriesid) %--></span> <br>
<!--% IF hide_tags == "" %--><!--% display_tags(show.tags) %--><!--% END %-->
<!--% IF show.comentsTally || show.commentsTally == 0 %-->
<span><label>Comments:</label> <!--% display_comments_tally(show.id, show.commentsTally) %--></span>
<!--% END %-->
<!--% END %-->
<!--% MACRO show_summary(show, hide_host) BLOCK %-->
@ -41,9 +47,8 @@ or
hosted by <a href="<!--% absolute_path(baseurl) %-->correspondents/<!--% zero_pad_left(show.hostid) %-->.html"><!--% show.host %--></a>
<!--% END %-->
</h3>
<p class="meta"><!--% show_meta(show) %--><br>
<!--% show.summary %-->
</p>
<p class="meta"><!--% show_meta(show) %--></p>
<p class="summary"><!--% show.summary %--></p>
<!--% END %-->
<!--% MACRO twat_show_summary(show, hide_host) BLOCK %-->
@ -52,8 +57,7 @@ or
hosted by <a href="<!--% absolute_path(baseurl) %-->correspondents/<!--% zero_pad_left(show.hostid) %-->.html"><!--% show.host %--></a>
<!--% END %-->
</h3>
<p class="meta"><!--% show_meta(show) %--><br>
<!--% show.summary %-->
</p>
<p class="meta"><!--% show_meta(show) %--></p>
<p class="summary"><!--% show.summary %--></p>
<!--% END %-->

View File

@ -1,16 +1,12 @@
<!--% MACRO listen_now(episode, episode_type, baseurl, media_baseurl) BLOCK %-->
<h2>Listen Now</h2>
<p>Duration: <!--% display_episode_duration(episode.duration) %--></p>
<!--% PROCESS 'shared-episode-summary.tpl.html' %-->
<!--% MACRO listen_now(episode, episode_type, baseurl, media_baseurl, hide_duration) BLOCK %-->
<p><!--% display_listen_in(episode.id, episode_type) %--> Play now:<br>
<audio controls preload="none">
<source src="<!--% media_path(episode.id, episode_type, 'ogg', baseurl, media_baseurl) %-->" type="audio/ogg" >
<source src="<!--% media_path(episode.id, episode_type, 'mp3', baseurl, media_baseurl) %-->" type="audio/mpeg" >
</audio>
<ul>
<!--% IF episode_type != "twat" %-->
<li>ogg: <a href="<!--% media_path(episode.id, episode_type, 'ogg', baseurl, media_baseurl) %-->"><!--% media_path(episode.id, episode_type, 'ogg', baseurl, media_baseurl) %--></a></li>
<li>spx: <a href="<!--% media_path(episode.id, episode_type, 'spx', baseurl, media_baseurl) %-->"><!--% media_path(episode.id, episode_type, 'spx', baseurl, media_baseurl) %--></a></li>
<!--% END %-->
<li>mp3: <a href="<!--% media_path(episode.id, episode_type, 'mp3', baseurl, media_baseurl) %-->"><!--% media_path(episode.id, episode_type, 'mp3', baseurl, media_baseurl) %--></a></li>
</ul>
<!--% IF !hide_duration %--><br>
Duration: <!--% display_episode_duration(episode.duration) %--><!--% END %--></p>
<!--% END %-->