mirror of
https://github.com/kiwix/libkiwix.git
synced 2025-06-26 10:11:30 +00:00
Add fallback image if thumbnail metadata is not available in zim
This commit is contained in:
File diff suppressed because one or more lines are too long
@ -104,10 +104,11 @@
|
||||
if (sort) {
|
||||
divTag.setAttribute('data-idx', bookOrderMap.get(id));
|
||||
}
|
||||
const faviconAttr = iconUrl != undefined ? `style="background-image: url('${root}${iconUrl}')"` : '';
|
||||
const languageAttr = language != '' ? '' : 'style="background-color: transparent"';
|
||||
divTag.innerHTML = `<a class="book__link" href="${root}${link}" data-hover="Preview">
|
||||
<div class="book__wrapper">
|
||||
<div class="book__icon"><img class="book__icon--image" src="${root}${iconUrl}"></div>
|
||||
<div class="book__icon" ${faviconAttr}></div>
|
||||
<div class="book__header">
|
||||
<div id="book__title">${title}</div>
|
||||
${downloadLink ? `<div class="book__download"><span data-link="${downloadLink}">Download ${humanFriendlyZimSize ? ` - ${humanFriendlyZimSize}</span></div>`: ''}` : ''}
|
||||
|
Reference in New Issue
Block a user