143 lines
5.5 KiB
HTML
143 lines
5.5 KiB
HTML
<!--% 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)) %-->
|
|
<!--% img_tag = matches.1 %-->
|
|
<!--% after_html = matches.2 %-->
|
|
<!--% matches.0 %-->
|
|
<!--% IF (img_tag.search(lazy_re)) %-->
|
|
<img <!--% img_tag %-->
|
|
<!--% ELSE %-->
|
|
<img loading="lazy" <!--% img_tag %-->
|
|
<!--% 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('-') %-->
|
|
<!--% 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><h2>Welcome</h2></header>
|
|
<p>Hacker Public Radio is a technology focused podcast that releases shows every weekday Monday to Friday. Our shows are produced by listeners like you and can be on any topic that is of interest to hackers, makers, hobbyists, etc. We are a welcoming community that offers positive feedback and encourages respectful debate.</p>
|
|
<div id="call_for_shows">
|
|
<!--% display_call_for_shows() %-->
|
|
</div>
|
|
</section>
|
|
<section id="podcast_lane">
|
|
<header><h2>The Podcast</h2></header>
|
|
<div class="lane">
|
|
<a class="lane-button" href="<!--% absolute_path(baseurl) %-->about.html#recording_a_podcast">
|
|
<img src="<!--% absolute_path(baseurl) %-->images/icons/mic-fill.svg" alt="" height="110">
|
|
Record
|
|
</a>
|
|
<br class="no-css">
|
|
<a class="lane-button" href="https://hub.hackerpublicradio.org/calendar.php">
|
|
<img src="<!--% absolute_path(baseurl) %-->images/icons/calendar-2-line.svg" alt="" height="110">
|
|
Schedule
|
|
</a>
|
|
<br class="no-css">
|
|
<a class="lane-button" href="<!--% absolute_path(baseurl) %-->syndication.html">
|
|
<img src="<!--% absolute_path(baseurl) %-->images/icons/rss-fill.svg" alt="" height="110">
|
|
Subscribe
|
|
</a>
|
|
<br class="no-css">
|
|
<a class="lane-button" href="<!--% absolute_path(baseurl) %-->eps/index.html">
|
|
<img src="<!--% absolute_path(baseurl) %-->images/icons/volume-up-fill.svg" alt="" height="110">
|
|
Listen
|
|
</a>
|
|
</div>
|
|
</section>
|
|
<section id="project_lane">
|
|
<header><h2>The Project</h2></header>
|
|
<div class="lane">
|
|
<a class="lane-button" href="<!--% absolute_path(baseurl) %-->correspondents/index.html">
|
|
<img src="<!--% absolute_path(baseurl) %-->images/icons/user-fill.svg" alt="" height="110">
|
|
Host
|
|
</a>
|
|
<br class="no-css">
|
|
<a class="lane-button" href="<!--% absolute_path(baseurl) %-->series/index.html">
|
|
<img src="<!--% absolute_path(baseurl) %-->images/icons/stack-fill.svg" alt="" height="110">
|
|
Series
|
|
</a>
|
|
<br class="no-css">
|
|
<a class="lane-button" href="<!--% absolute_path(baseurl) %-->about.html">
|
|
<img src="<!--% absolute_path(baseurl) %-->images/icons/question-mark.svg" alt="" height="110">
|
|
About
|
|
</a>
|
|
</div>
|
|
</section>
|
|
<section id="latest_lane" class="lane">
|
|
<!--% PROCESS 'shared-episode-summary.tpl.html' %-->
|
|
<section id="latest_shows">
|
|
<header><h2>Latest Shows</h2></header>
|
|
<!--% host_cnt = 0 %-->
|
|
<ul>
|
|
<!--% FOREACH latest_episodes IN DBI.query(query_latest_episodes)
|
|
%-->
|
|
<li><a href="<!--% absolute_path(baseurl) %-->eps/hpr<!--% zero_pad_left(latest_episodes.id) %-->/index.html">hpr<!--% latest_episodes.id %--> :: <!--% latest_episodes.title %--></a>
|
|
<ul><li>
|
|
<!--% latest_episodes.summary %-->
|
|
</li></ul>
|
|
<!--% host_cnt = host_cnt + 1 %-->
|
|
<!--% END %-->
|
|
</ul>
|
|
</section>
|
|
<section id="latest_comments">
|
|
<header><h2>Latest Comments</h2></header>
|
|
<ul>
|
|
<!--% FOREACH item IN DBI.query('
|
|
WITH episode_comment_rank AS (
|
|
SELECT
|
|
comments.eps_id
|
|
, comments.id as comment_id
|
|
, comments.comment_author_name
|
|
, comments.comment_timestamp
|
|
, comments.comment_title
|
|
, RANK() OVER (PARTITION BY eps_id ORDER BY id ) AS comment_number
|
|
FROM comments
|
|
)
|
|
SELECT
|
|
episode_comment_rank.*
|
|
, hosts.host
|
|
, eps.title AS episode_title
|
|
, eps.date AS episode_date
|
|
FROM episode_comment_rank
|
|
INNER JOIN eps
|
|
ON episode_comment_rank.eps_id = eps.id
|
|
INNER JOIN hosts
|
|
ON eps.hostid = hosts.hostid
|
|
ORDER BY episode_comment_rank.comment_timestamp DESC
|
|
LIMIT 10;
|
|
|
|
')
|
|
%-->
|
|
<li>hpr<!--% item.eps_id %--> (<!--% item.episode_date %-->) "<!--% item.episode_title %-->" by <!--% item.host %-->
|
|
<ul>
|
|
<li><a href="<!--% absolute_path(baseurl) %-->eps/hpr<!--% zero_pad_left(item.eps_id) %-->/index.html#comment_<!--% item.comment_id%-->">Comment <!--% item.comment_number %-->: <!--% item.comment_author_name %--> on <!--% item.comment_timestamp %-->: "<!--% item.comment_title %-->"</a>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
<!--% END %-->
|
|
</ul>
|
|
</section>
|
|
</section>
|