mirror of
https://github.com/shadoll/sLogos.git
synced 2026-08-28 11:33:29 +00:00
Add titles to collections and update image URL resolution in components
- Added 'title' property to collections for 'Logos', 'Flags', and 'Emblems'. - Updated image URL generation in CardMiddle, CardSmall, and CardTiny components to dynamically resolve the current collection based on window.appData.
This commit is contained in:
@@ -41,7 +41,12 @@
|
||||
}
|
||||
}
|
||||
function getImageUrl(logo) {
|
||||
return `/${collection.baseDir}/${logo.path}`;
|
||||
// Always resolve collection for each logo based on current collection name
|
||||
let currentCollection = collection;
|
||||
if (typeof window !== 'undefined' && window.appData && window.appData.collection) {
|
||||
currentCollection = collections.find(c => c.name === window.appData.collection) || collections[0];
|
||||
}
|
||||
return `/${currentCollection.baseDir}/${logo.path}`;
|
||||
}
|
||||
|
||||
$: getLogoThemeColor = (logo) => getDefaultLogoColor(logo.colors, theme);
|
||||
|
||||
Reference in New Issue
Block a user