Lazy load images

This commit is contained in:
Florian Baumann 2023-02-27 15:20:39 +01:00
parent 48086358d2
commit 04d5f20b46

View File

@ -17,6 +17,7 @@
.cardpreview .cardpreviewtext {
visibility: hidden;
display: none;
width: 300px;
color: #fff;
@ -27,6 +28,7 @@
.cardpreview:hover .cardpreviewtext {
visibility: visible;
display: inline-block;
}
</style>
</head>
@ -64,7 +66,8 @@
<select name="set" id="set" form="searchform">
<option value="">-</option>
{{range .sets}}
<option value="{{ index . "code" }}">{{ printf "%.25s" (index . "_id") }} ({{ index . "count" }})</option>
<option value="{{ index . "code" }}">{{ printf "%.25s" (index . "_id") }} ({{ index . "count" }})
</option>
{{end}}
</select>
</div>
@ -143,7 +146,7 @@
<td>
<div class="cardpreview"><strong>{{.Name }}</strong>
<span class="cardpreviewtext">
<img src="{{ .ImageUris.Normal }}" alt="" />
<img loading="lazy" src="{{ .ImageUris.Normal }}" alt="" />
</span>
</div>
</td>