lazy-load record covers to avoid 429 responses
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
This commit is contained in:
parent
db3387aac9
commit
2e3359df7a
@ -131,7 +131,7 @@ function RecordTemplate({
|
|||||||
year,
|
year,
|
||||||
discogsURL,
|
discogsURL,
|
||||||
}) {
|
}) {
|
||||||
return `${coverURL ? `<img src="${coverURL}"/>` : ""}
|
return `${coverURL ? `<img src="${coverURL}" loading="lazy"/>` : ""}
|
||||||
<h1>${name}</h1>
|
<h1>${name}</h1>
|
||||||
<h2>${artists.join(", ")}</h2>
|
<h2>${artists.join(", ")}</h2>
|
||||||
<span>${identifier}</span><br/>
|
<span>${identifier}</span><br/>
|
||||||
@ -149,7 +149,7 @@ function RecordTemplate({
|
|||||||
|
|
||||||
function TableRowTemplate({ name, coverURL, discogsURL }) {
|
function TableRowTemplate({ name, coverURL, discogsURL }) {
|
||||||
return `<div class="record">
|
return `<div class="record">
|
||||||
<img class="cover" src="${coverURL}"/>
|
<img class="cover" src="${coverURL}" loading="lazy"/>
|
||||||
<span class="name">${name}</span>
|
<span class="name">${name}</span>
|
||||||
<a
|
<a
|
||||||
target="_blank"
|
target="_blank"
|
||||||
|
Loading…
Reference in New Issue
Block a user