lazy load images on homepage

This commit is contained in:
mappu 2020-05-04 18:15:04 +12:00
parent 124882da9a
commit 902e1be59c

View File

@ -150,7 +150,7 @@ func (this *Application) Homepage(w http.ResponseWriter, r *http.Request) {
data-sort-mt="`+fmt.Sprintf("%d", repo.UpdatedAt.Unix())+`" data-sort-mt="`+fmt.Sprintf("%d", repo.UpdatedAt.Unix())+`"
> >
<td> <td>
<a href="`+pageHref+`"><img class="homeimage" src="`+html.EscapeString(`/:banner/`+url.PathEscape(repo.Name))+`"></div></a> <a href="`+pageHref+`"><img class="homeimage" loading="lazy" src="`+html.EscapeString(`/:banner/`+url.PathEscape(repo.Name))+`"></div></a>
</td> </td>
<td> <td>
<strong>`+html.EscapeString(repo.Name)+`</strong>`+html.EscapeString(normalisedDesc)+` <strong>`+html.EscapeString(repo.Name)+`</strong>`+html.EscapeString(normalisedDesc)+`