[opt] albums & posters

This commit is contained in:
xaoxuu 2024-02-08 23:51:38 +08:00
parent 1fa700d8db
commit a7f4eee1b8
2 changed files with 2 additions and 2 deletions

View File

@ -30,7 +30,7 @@ module.exports = ctx => function(args) {
if (item?.url) { if (item?.url) {
el += `<div class="grid-cell album-card">` el += `<div class="grid-cell album-card">`
el += `<a class="card-link" target="_blank" rel="external nofollow noopener noreferrer" href="${item.url}">` el += `<a class="card-link" target="_blank" rel="external nofollow noopener noreferrer" href="${item.url}">`
el += `<img src="${item.icon || item.avatar || ctx.theme.config.default.cover}" onerror="javascript:this.removeAttribute(&quot;data-src&quot;);this.src=&quot;${ctx.theme.config.default.cover}&quot;;"/>` el += `<img src="${item.cover || item.icon || item.avatar || ctx.theme.config.default.cover}" onerror="javascript:this.removeAttribute(&quot;data-src&quot;);this.src=&quot;${ctx.theme.config.default.cover}&quot;;"/>`
el += `<div class="image-meta">` el += `<div class="image-meta">`
if (item.title) { if (item.title) {
el += `<span class="image-caption">${item.title}</span>` el += `<span class="image-caption">${item.title}</span>`

View File

@ -30,7 +30,7 @@ module.exports = ctx => function(args) {
if (item?.url) { if (item?.url) {
el += `<div class="grid-cell poster-card">` el += `<div class="grid-cell poster-card">`
el += `<a class="card-link" target="_blank" rel="external nofollow noopener noreferrer" href="${item.url}">` el += `<a class="card-link" target="_blank" rel="external nofollow noopener noreferrer" href="${item.url}">`
el += `<img src="${item.icon || item.avatar || ctx.theme.config.default.cover}" onerror="javascript:this.removeAttribute(&quot;data-src&quot;);this.src=&quot;${ctx.theme.config.default.cover}&quot;;"/>` el += `<img src="${item.cover || item.icon || item.avatar || ctx.theme.config.default.cover}" onerror="javascript:this.removeAttribute(&quot;data-src&quot;);this.src=&quot;${ctx.theme.config.default.cover}&quot;;"/>`
el += `<div class="image-meta">` el += `<div class="image-meta">`
if (item.title) { if (item.title) {
el += `<span class="image-caption">${item.title}</span>` el += `<span class="image-caption">${item.title}</span>`