hpr_generator/templates/shared-avatar.tpl.html
Roan Horning 5b4421071f
Add MACRO lazy_load
Macro which allows programatically setting the HTML5 img
loading attribute.
2023-03-13 23:03:15 -04:00

12 lines
615 B
HTML

<!--% MACRO lazy_load(is_lazy) BLOCK %-->
<!--% IF is_lazy %-->loading="lazy"<!--% END %-->
<!--% END %-->
<!--% 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 %-->