hpr_generator/templates/content-index.tpl.html

111 lines
4.2 KiB
HTML
Raw Normal View History

<!--% PROCESS 'shared-avatar.tpl.html' %-->
<!--% PROCESS 'shared-utils.tpl.html' %-->
<!--% PROCESS 'shared-listen-now.tpl.html' %-->
<!--% PROCESS 'shared-show-transcript.tpl.html' %-->
<!--% PROCESS 'shared-call_for_shows.tpl.html' %-->
<!--% INCLUDE 'content-index-announcement.tpl.html' %-->
<!--% PROCESS "queries-index.tpl.html" %-->
<!--% MACRO tidy_notes(all_lines) BLOCK %-->
<!--% lines = all_lines %-->
<!--% after_html = all_lines %-->
<!--% img_re = '(?six)^(.*?)\<img ([^\>]+\>)(.+)$' %-->
<!--% lazy_re = '(?i)loading="lazy"' %-->
<!--% WHILE (matches = lines.match(img_re)) %-->
2023-10-29 17:28:04 +00:00
<!--% img_tag = matches.1 %-->
<!--% after_html = matches.2 %-->
<!--% matches.0 %-->
<!--% IF (img_tag.search(lazy_re)) %-->
<img <!--% img_tag %-->
2023-10-29 17:28:04 +00:00
<!--% ELSE %-->
<img loading="lazy" <!--% img_tag %-->
2023-10-29 17:28:04 +00:00
<!--% END %-->
<!--% lines = after_html %-->
<!--% END %-->
<!--% after_html %-->
<!--% END %-->
<!--% days_till_next_episode = 0 %-->
<!--% USE DBI(constants.driver) %-->
<!--% USE date %-->
<!--% calc = date.calc %-->
<!--% episodes = DBI.query(query_next_available_episode).get_all() %-->
<!--% last_date = episodes.0.date.split('-') %-->
2023-10-29 17:28:04 +00:00
<!--% offset = (calc.Day_of_Week(last_date.0,last_date.1,last_date.2) == 5 ? 3 : 1) %-->
<!--% slot_date = calc.Add_Delta_Days(last_date.0,last_date.1,last_date.2,offset) %-->
<!--% now = calc.Today() %-->
<!--% days_till_next_episode = calc.Delta_Days(now.0,now.1,now.2,slot_date.0,slot_date.1,slot_date.2) %-->
<!--% delta = date.calc.N_Delta_YMD(2005,9,19, date.format(date.now, '%Y'),date.format(date.now, '%m'),date.format(date.now, '%d')) %-->
<section id="welcome">
<header>Welcome</header>
<p>Hacker Public Radio is a podcast that releases shows every weekday Monday to Friday. The shows are contributed by the public and can be on any topic that is of interest to hackers, makers, hobbyists, etc.</p>
<div id="call_for_shows">
<!--% display_call_for_shows() %-->
</div>
</section>
<section id="podcast_lane">
<header>Podcast</header>
<div class="lane">
<a class="lane-button" href="<!--% absolute_path(baseurl) %-->about.html#recording_a_podcast">
<img src="<!--% absolute_path(baseurl) %-->" alt="Microphone icon">
Record
</a>
<a class="lane-button" href="https://hub.hackerpublicradio.org/calendar.php">
<img src="" alt="Calendar icon">
Schedule
</a>
<a class="lane-button" href="<!--% absolute_path(baseurl) %-->syndication.html">
<img src="<!--% absolute_path(baseurl) %-->" alt="RSS icon">
Subscribe
</a>
<a class="lane-button" href="<!--% absolute_path(baseurl) %-->eps/index.html">
<img src="" alt="Speaker icon">
Listen
</a>
</div>
</section>
<section id="project_lane">
<header>Project</header>
<div class="lane">
<a class="lane-button" href="<!--% absolute_path(baseurl) %-->correspondents/index.html">
<img src="<!--% absolute_path(baseurl) %-->" alt="Person icon">
Host
</a>
<a class="lane-button" href="<!--% absolute_path(baseurl) %-->series/index.html">
<img src="" alt="Stack of Books icon">
Series
</a>
<a class="lane-button" href="<!--% absolute_path(baseurl) %-->about.html">
<img src="<!--% absolute_path(baseurl) %-->" alt="Question Mark icon">
About
</a>
</div>
</section>
<section id="latest_lane">
<!--% PROCESS 'shared-episode-summary.tpl.html' %-->
<section id="latest_shows">
<header>Latest Shows</header>
<!--% host_cnt = 0 %-->
2022-11-27 13:54:14 -05:00
<!--% FOREACH latest_episodes IN DBI.query(query_latest_episodes)
%-->
<ul>
<li><a href="<!--% absolute_path(baseurl) %-->eps/hpr<!--% zero_pad_left(latest_episodes.id) %-->/index.html">hpr<!--% latest_episodes.id %--> :: <!--% latest_episodes.title %--></a></li>
</ul>
<!--% host_cnt = host_cnt + 1 %-->
2022-07-01 22:07:06 -04:00
<!--% END %-->
<article id="previous_five_weeks">
2022-07-01 22:07:06 -04:00
<header>
<hr>
<h1>Previous five weeks</h1>
</header>
<!--% 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 %-->
2022-07-01 22:07:06 -04:00
</article>
<h1>Older Shows</h1>
<p>
2022-08-05 17:50:03 -04:00
Get a <a href="<!--% absolute_path(baseurl) %-->eps/index.html">full list</a> of all our shows.
2022-07-01 22:07:06 -04:00
</p>
</section>