Renamed macro get_avatar to get_avatar_src as per suggestion.

Moved host_thumb macro into shared avatar template file.
Made condition of lazy loading a parameter.
This commit is contained in:
Gordon Stanton
2023-03-12 18:48:51 +11:00
parent ebcd906300
commit ce4aefe828
7 changed files with 12 additions and 17 deletions

View File

@@ -1,5 +1,8 @@
<!--% MACRO get_avatar(host_id) BLOCK %-->
<!--% MACRO get_avatar_src(host_id) BLOCK %-->
<!--% TRY %-->
<!--% USE File ("./public_html/images/hosts/${host_id}.png") %-->hosts/<!--% File.name %-->
<!--% CATCH File %-->hpr_logo.png<!--% END %-->
<!--% END %-->
<!--% MACRO host_thumb(avatar, host_name, host_cnt, min_cnt) 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 %--> />
<!--% END %-->