forked from HPR/hpr_generator
add site-newdesign configuration that generates the new design
This commit is contained in:
98
templates/content-index-newdesign.tpl.html
Normal file
98
templates/content-index-newdesign.tpl.html
Normal file
@@ -0,0 +1,98 @@
|
||||
<!--% 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 %-->
|
||||
|
||||
<section class="welcome">
|
||||
<!--% 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')) %-->
|
||||
|
||||
<h2>Welcome</h2>
|
||||
<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>
|
||||
<p>We started producing shows as <a href="<!--% absolute_path(baseurl) %-->eps/index.html#twt_episodes"><em>Today with a Techie</em></a> on 2005-09-19, <!--% delta.0 %--> years, <!--% delta.1 %--> months, <!--% delta.2 %--> days ago. Our shows are produced by <a href="<!--% absolute_path(baseurl) %-->correspondents/index.html">listeners</a> like you and can be on any <a href="<!--% absolute_path(baseurl) %-->eps/index.html">topics</a> that <strong>"are of interest to <a href="https://en.wikipedia.org/wiki/hacker_(hobbyist)">hackers</a>"</strong>. If you listen to HPR then please consider contributing one show a year. If you <a href="<!--% absolute_url(baseurl) %-->about.html#so_you_want_to_record_a_podcast">record</a> your show now it could be <a href="<!--% hub_baseurl %-->calendar.php">released</a> in <strong><!--% days_till_next_episode %--></strong> days.</p>
|
||||
</section>
|
||||
|
||||
<!--% display_call_for_shows() %-->
|
||||
|
||||
<h2>Podcast</h2>
|
||||
<section class="podcast">
|
||||
<a class="podcast record" href="<!--% absolute_url(baseurl) %-->about.html#so_you_want_to_record_a_podcast">
|
||||
<p>Record</p>
|
||||
</a>
|
||||
<a class="podcast schedule" href="<!--% hub_baseurl %-->calendar.php">
|
||||
<p>Schedule</p>
|
||||
</a>
|
||||
<a class="podcast subscribe" href="<!--% absolute_path(baseurl) %-->syndication.html">
|
||||
<p>Subscribe</p>
|
||||
</a>
|
||||
<a class="podcast listen" href="<!--% absolute_path(baseurl) %-->eps/index.html">
|
||||
<p>Listen</p>
|
||||
</a>
|
||||
</section>
|
||||
|
||||
<h2>Project</h2>
|
||||
<section class="project">
|
||||
<a class="project host" href="<!--% absolute_path(baseurl) %-->correspondents/index.html">
|
||||
<p>Hosts</p>
|
||||
</a>
|
||||
<a class="project series" href="<!--% absolute_path(baseurl) %-->series/index.html">
|
||||
<p>Series</p>
|
||||
</a>
|
||||
<a class="project about" href="<!--% absolute_path(baseurl) %-->about.html">
|
||||
<p>About</p>
|
||||
</a>
|
||||
</section>
|
||||
|
||||
<div class="column-container">
|
||||
<section class="episodes">
|
||||
<h2>Latest Episodes</h2>
|
||||
<ul>
|
||||
<!--% host_cnt = 0 %-->
|
||||
<!--% 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></li>
|
||||
<!--% host_cnt = host_cnt + 1 %-->
|
||||
<!--% END %-->
|
||||
</ul>
|
||||
<p><a href="<!--% absolute_path(baseurl) %-->eps/index.html">View all episodes</a></p>
|
||||
</section>
|
||||
|
||||
<section class="comments">
|
||||
<h2>Latest Comments</h2>
|
||||
<ul>
|
||||
<!--% FOREACH last_5_weeks_episodes IN DBI.query(query_last_5_weeks_episodes).slice(0,4) %-->
|
||||
<li><!--% show_summary(last_5_weeks_episodes) %--></li>
|
||||
<!--% END %-->
|
||||
</ul>
|
||||
<p><a href="<!--% absolute_path(baseurl) %-->comments_viewer.html">View all comments</a></p>
|
||||
</section>
|
||||
</div>
|
Reference in New Issue
Block a user