hpr_generator/templates/shared-utils.tpl.html
Dave Morriss 31fed34212 Fixes to "step navigation", etc
public_html/css/hpr.css: Commented out the 'font-size: 75%;' in the CSS
    definition for '#maincontent footer p'. It was this that shrank the
    lower "step navigation" list in comparison to the upper one. The
    upper is in a '<header>' block and the lower in a '<footer>' block.

templates/content-episode.tpl.html: Fixed a typo.

templates/content-theme.tpl.html: Changed "This can be added" to "This
    is automatically added"

templates/queries-episode-sqlite.tpl.html: Fixed a transcription error
    from the 'mysql' version

templates/shared-utils.tpl.html: Modified the layout of the
    'step_navigation' macro to remove tabs which are being copied to the
    HTML. Just a minor cosmetic issue. Added a Vim modeline to the file
    to help with this.
2023-07-31 15:27:17 +01:00

100 lines
3.9 KiB
HTML

<!--% MACRO zero_pad_left(word, pad_length) BLOCK %-->
<!--% IF pad_length %-->
<!--% zero_pad_format = "%0${pad_length}s" %-->
<!--% ELSE %-->
<!--% zero_pad_format = "%04s" %-->
<!--% END %-->
<!--% USE String(word) %-->
<!--% String.format(zero_pad_format) %-->
<!--% END %-->
<!--% MACRO display_choice(choice, display_when_true, display_when_false) BLOCK %-->
<!--% IF choice == 1 %--><!--% display_when_true %-->
<!--% ELSE %--><!--% display_when_false %--><!--% END %-->
<!--% END %-->
<!--% MACRO display_episode_duration(duration_sec) BLOCK %-->
<!--% seconds = duration_sec % 60 %-->
<!--% USE format %-->
<!--% minutes_only = format("%d") %-->
<!--% minutes = minutes_only(duration_sec / 60) %-->
<!--% hours_only = format("%d") %-->
<!--% hours = hours_only(minutes / 60) %-->
<!--% IF hours >= 1 %-->
<!--% minutes = minutes - hours * 60 %-->
<!--% END %-->
<!--% display_hours = format("%02d:%02d:%02d") %-->
<!--% display_hours(hours,minutes,seconds) %-->
<!--% END %-->
<!--% MACRO display_explicit(is_explicit) BLOCK %-->
<!--% display_choice(is_explicit, 'Explicit', 'Clean') %-->
<!--% END %-->
<!--% MACRO display_explicit_feed(is_explicit) BLOCK %-->
<!--% display_choice(is_explicit, 'yes', 'no') %-->
<!--% END %-->
<!--% MACRO format_feed_date(date_to_format) BLOCK %-->
<!--% USE feed_date = date(format = '%a, %d %b %Y %H:%M:%S +0000', gmt=1) %-->
<!--% feed_date.format(date_to_format) %-->
<!--% END %-->
<!--% MACRO format_iso8601_date(date_to_format) BLOCK %-->
<!--% USE iso8601_date = date(format = '%Y-%m-%dT%H:%M:%SZ', gmt=1) %-->
<!--% iso8601_date.format(date_to_format) %-->
<!--% END %-->
<!--% MACRO absolute_path(baseurl) BLOCK %-->
<!--% IF baseurl %-->./<!--% ELSE %-->/<!--% END %-->
<!--% END %-->
<!--% MACRO media_basepath(baseurl, media_baseurl) BLOCK %-->
<!--% IF media_baseurl %-->
<!--% media_baseurl %--><!--% ELSE %-->
<!--% IF baseurl %--><!--% baseurl %--><!--% ELSE %-->/<!--% END %-->
<!--% END %-->
<!--% END %-->
<!--% MACRO media_path(episode_id, episode_type, media_type, baseurl, media_baseurl) BLOCK %-->
<!--% IF episode_type == "twat" %-->
<!--% padding = 3 %-->
<!--% media_folder = "eps/"; padding = 3 %-->
<!--% ELSE %-->
<!--% media_folder = "local/" %-->
<!--% END %-->
<!--% IF media_baseurl %-->
<!--% transcription_types = "txt srt vtt" %-->
<!--% USE String(transcription_types) %-->
<!--% USE String(media_baseurl) %-->
<!--% IF transcription_types.search(media_type) && media_baseurl.search('archive.org') %-->
<!--% media_baseurl = "${media_baseurl}hpr\$eps_id/" %-->
<!--% END %-->
<!--% media_folder = "" %-->
<!--% media_baseurl = media_baseurl.replace('\$eps_id', zero_pad_left(episode_id)) %-->
<!--% END %-->
<!--% media_basepath(baseurl, media_baseurl) %--><!--% media_folder %--><!--% episode_type %--><!--% zero_pad_left(episode_id, padding) %-->.<!--% media_type %-->
<!--% END %-->
<!--% MACRO step_navigation(baseurl, links, folder) BLOCK %-->
<!--% IF folder %-->
<!--% folder = folder %--><!--% ELSE %--><!--% folder = "hpr" %-->
<!--% END %-->
<small><a href="<!--% absolute_path(baseurl) %-->eps/<!--% folder %--><!--% zero_pad_left(links.earliest) %-->/index.html" rel="first">&lt;&lt; First</a>,
<!--% IF links.previous %-->
<a href="<!--% absolute_path(baseurl) %-->eps/<!--% folder %--><!--% zero_pad_left(links.previous) %-->/index.html" rel="previous">&lt; Previous</a>,
<!--% ELSE %-->
<span>&lt;</span> Previous,
<!--% END %-->
<!--% IF links.next %-->
<a href="<!--% absolute_path(baseurl) %-->eps/<!--% folder %--><!--% zero_pad_left(links.next) %-->/index.html" rel="next">Next &gt;</a>,
<!--% ELSE %-->
Next <span>&gt;</span>
<!--% END %-->
<a href="<!--% absolute_path(baseurl) %-->eps/<!--% folder %--><!--% zero_pad_left(links.latest) %-->/index.html" rel="last">Latest &gt;&gt;</a></small>
<!--% END %-->
<!--
vim: syntax=html:ts=8:sw=4:tw=78:et:ai:
-->