Add MACRO step_navigation

This commit is contained in:
Roan Horning 2022-08-07 14:26:05 -04:00
parent 227510316b
commit 541a79265a
Signed by: rho_n
GPG Key ID: 234AEF20B72D5769
2 changed files with 17 additions and 14 deletions

View File

@ -45,19 +45,7 @@
<header> <header>
<h1>hpr<!--% episode.id %--> :: <!--% episode.title %--></h1> <h1>hpr<!--% episode.id %--> :: <!--% episode.title %--></h1>
<h3><!--% episode.summary %--></h3> <h3><!--% episode.summary %--></h3>
<p class="meta"> <p class="meta"><!--% step_navigation(episode) %-->
<small><a href="<!--% absolute_url(baseurl) %-->eps/hpr<!--% zero_pad_left(episode.earliest) %-->/index.html" rel="first">&lt;&lt; First</a>,
<!--% IF episode.previous %-->
<a href="<!--% absolute_url(baseurl) %-->eps/hpr<!--% zero_pad_left(episode.previous) %-->/index.html" rel="previous">&lt; Previous</a>,
<!--% ELSE %-->
<span>&lt;</span> Previous,
<!--% END %-->
<!--% IF episode.next %-->
<a href="<!--% absolute_url(baseurl) %-->eps/hpr<!--% zero_pad_left(episode.next) %-->/index.html" rel="next">Next &gt;</a>,
<!--% ELSE %-->
Next <span>&gt;</span>
<!--% END %-->
<a href="<!--% absolute_url(baseurl) %-->eps/hpr<!--% zero_pad_left(episode.latest) %-->/index.html" rel="last">Latest &gt;&gt;</a></small>
</p> </p>
<p> <p>
Hosted by <a href="correspondents/host<!--% episode.hostid %-->.html"><!--% episode.host %--></a>. <!--% show_meta(episode) %--></p> Hosted by <a href="correspondents/host<!--% episode.hostid %-->.html"><!--% episode.host %--></a>. <!--% show_meta(episode) %--></p>

View File

@ -11,3 +11,18 @@
<!--% MACRO absolute_path(baseurl) BLOCK %--> <!--% MACRO absolute_path(baseurl) BLOCK %-->
<!--% IF baseurl %-->./<!--% ELSE %-->/<!--% END %--> <!--% IF baseurl %-->./<!--% ELSE %-->/<!--% END %-->
<!--% END %--> <!--% END %-->
<!--% MACRO step_navigation(links) BLOCK %-->
<small><a href="<!--% absolute_url(baseurl) %-->eps/hpr<!--% zero_pad_left(links.earliest) %-->/index.html" rel="first">&lt;&lt; First</a>,
<!--% IF links.previous %-->
<a href="<!--% absolute_url(baseurl) %-->eps/hpr<!--% zero_pad_left(links.previous) %-->/index.html" rel="previous">&lt; Previous</a>,
<!--% ELSE %-->
<span>&lt;</span> Previous,
<!--% END %-->
<!--% IF links.next %-->
<a href="<!--% absolute_url(baseurl) %-->eps/hpr<!--% zero_pad_left(links.next) %-->/index.html" rel="next">Next &gt;</a>,
<!--% ELSE %-->
Next <span>&gt;</span>
<!--% END %-->
<a href="<!--% absolute_url(baseurl) %-->eps/hpr<!--% zero_pad_left(links.latest) %-->/index.html" rel="last">Latest &gt;&gt;</a></small>
<!--% END %-->