forked from rho_n/hpr_generator
Add correspondents page template
First use of data retrieved from the db.
This commit is contained in:
parent
3bab143697
commit
b33e812c3d
@ -55,7 +55,7 @@ sub main {
|
|||||||
read_config "site.cfg" => my %config;
|
read_config "site.cfg" => my %config;
|
||||||
|
|
||||||
my $tt = get_template_html();
|
my $tt = get_template_html();
|
||||||
generate_page($tt, $config{contact}{navigation}, $config{contact}{content});
|
generate_page($tt, $config{correspondents}{navigation}, $config{correspondents}{content});
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
22
templates/content-correspondents.tpl.html
Normal file
22
templates/content-correspondents.tpl.html
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
<article>
|
||||||
|
<p>
|
||||||
|
<h2 class="title">Correspondents</h2><p>For more information on how to become a Correspondent see our <a href="contribute.php">contribute</a></center> page. To add a logo here, either email one to admin at hpr or setup your email on <a href="https://en.gravatar.com/">Gravatar</a>. To protect your browsing privacy we gather the images every hour and serve them directly from HPR.<p />
|
||||||
|
<!--% USE DBI('dbi:SQLite:hpr.db') %-->
|
||||||
|
<table>
|
||||||
|
<th >Avatar</th>
|
||||||
|
<th >Name & Host ID</th>
|
||||||
|
<th >license</th>
|
||||||
|
<th >Last Show</th>
|
||||||
|
<!--% FOREACH host IN DBI.query('SELECT * FROM Contributors ORDER BY handle') %-->
|
||||||
|
<tr height="80" bgcolor="#CCCCCC">
|
||||||
|
<td><img src="./images/<!--% host.avatar %-->" height="80" width="80" alt="" /></td>
|
||||||
|
|
||||||
|
<td><strong><!--% host.handle %--></strong><br />
|
||||||
|
|
||||||
|
Host ID: <a href="correspondents/<!--% host.id %-->.html"><!--% host.id %--></a></td>
|
||||||
|
<td><!--% host.default_license %--></td>
|
||||||
|
<td> host.last_posted </td>
|
||||||
|
</tr>
|
||||||
|
<!--% END %-->
|
||||||
|
</table> <p><a href="contribute.php">Become a Correspondent</a></p>
|
||||||
|
</article>
|
Loading…
Reference in New Issue
Block a user