Rename MACRO host_thumb to get_avatar
Update to use lazy_load MACRO and minimize number of arguments needed.
This commit is contained in:
parent
5b4421071f
commit
dee924e6a8
@ -1,9 +1,9 @@
|
|||||||
<!--% PROCESS 'shared-utils.tpl.html' %-->
|
<!--% PROCESS 'shared-utils.tpl.html' %-->
|
||||||
|
<!--% PROCESS 'shared-avatar.tpl.html' %-->
|
||||||
<article>
|
<article>
|
||||||
<h2 class="title">Correspondents</h2>
|
<h2 class="title">Correspondents</h2>
|
||||||
<p>For more information on how to become a Correspondent see our <a href="<!--% absolute_path(baseurl) %-->contribute.html">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 />
|
<p>For more information on how to become a Correspondent see our <a href="<!--% absolute_path(baseurl) %-->contribute.html">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(constants.driver, constants.user, constants.password) %-->
|
<!--% USE DBI(constants.driver, constants.user, constants.password) %-->
|
||||||
<!--% PROCESS 'shared-avatar.tpl.html' %-->
|
|
||||||
<!--% host_cnt = 0 %-->
|
<!--% host_cnt = 0 %-->
|
||||||
<table class="hosts">
|
<table class="hosts">
|
||||||
<th >Avatar</th>
|
<th >Avatar</th>
|
||||||
@ -18,7 +18,7 @@
|
|||||||
on h.hostid = e.hostid '
|
on h.hostid = e.hostid '
|
||||||
) %-->
|
) %-->
|
||||||
<tr height="80">
|
<tr height="80">
|
||||||
<td><!--% host_thumb(get_avatar_src(host.hostid), host.host, host_cnt, 8) %--></td>
|
<td><!--% get_avatar(host.hostid, host.host, host_cnt > 8) %--></td>
|
||||||
|
|
||||||
<td><strong><!--% host.host %--></strong><br>
|
<td><strong><!--% host.host %--></strong><br>
|
||||||
|
|
||||||
|
@ -6,6 +6,6 @@
|
|||||||
<!--% USE File ("./public_html/images/hosts/${host_id}.png") %-->hosts/<!--% File.name %-->
|
<!--% USE File ("./public_html/images/hosts/${host_id}.png") %-->hosts/<!--% File.name %-->
|
||||||
<!--% CATCH File %-->hpr_logo.png<!--% END %-->
|
<!--% CATCH File %-->hpr_logo.png<!--% END %-->
|
||||||
<!--% END %-->
|
<!--% END %-->
|
||||||
<!--% MACRO host_thumb(avatar, host_name, host_cnt, min_cnt) BLOCK %-->
|
<!--% MACRO get_avatar(host_id, host_name, is_lazy_loaded) BLOCK %-->
|
||||||
<img src="<!--% absolute_path(baseurl) %-->images/<!--% avatar %-->" height="80" width="80" alt="Thumbnail of <!--% host_name | html %-->" <!--% IF host_cnt > min_cnt %-->loading="lazy"<!--% END %--> />
|
<img src="<!--% absolute_path(baseurl) %-->images/<!--% get_avatar_src(host_id) %-->" height="80" width="80" alt="Thumbnail of <!--% host_name | html %-->" <!--% lazy_load(is_lazy_loaded) %--> />
|
||||||
<!--% END %-->
|
<!--% END %-->
|
||||||
|
Loading…
Reference in New Issue
Block a user