feat: dashboard cards show preview.jpg background when available
This commit is contained in:
@@ -289,9 +289,10 @@ const PageDashboard = {
|
|||||||
const isAll = supported === 'all';
|
const isAll = supported === 'all';
|
||||||
const compatLabel = isAll ? '全' : '限';
|
const compatLabel = isAll ? '全' : '限';
|
||||||
const compatClass = isAll ? 'badge-info' : 'badge-warning';
|
const compatClass = isAll ? 'badge-info' : 'badge-warning';
|
||||||
|
const preview = `/dashboard/${theme.id}/preview.jpg`;
|
||||||
return `
|
return `
|
||||||
<div class="glass-card theme-card" data-theme-id="${theme.id}">
|
<div class="glass-card theme-card" data-theme-id="${theme.id}">
|
||||||
<div class="theme-card-preview">${icon}</div>
|
<div class="theme-card-preview" style="background-image:url(${preview});background-size:cover;background-position:center">${icon}</div>
|
||||||
<div class="theme-card-info">
|
<div class="theme-card-info">
|
||||||
<div class="theme-card-name">${theme.name || 'Unnamed'}</div>
|
<div class="theme-card-name">${theme.name || 'Unnamed'}</div>
|
||||||
<div class="theme-card-meta">
|
<div class="theme-card-meta">
|
||||||
|
|||||||
Reference in New Issue
Block a user