mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-01-03 07:18:49 +01:00
This commit is contained in:
parent
08de630e6f
commit
9dbd9cceeb
1 changed files with 2 additions and 2 deletions
|
|
@ -67,12 +67,12 @@ export const renderGallery = (options: {
|
|||
view.cards.forEach((item: IAVGalleryItem, rowIndex: number) => {
|
||||
galleryHTML += `<div data-id="${item.id}" draggable="true" class="av__gallery-item${selectItemIds.includes(item.id) ? " av__gallery-item--select" : ""}">`;
|
||||
if (view.coverFrom !== 0) {
|
||||
const coverClass= "av__gallery-cover av__gallery-cover--" + view.cardAspectRatio;
|
||||
const coverClass = "av__gallery-cover av__gallery-cover--" + view.cardAspectRatio;
|
||||
if (item.coverURL) {
|
||||
if (item.coverURL.startsWith("background")) {
|
||||
galleryHTML += `<div class="${coverClass}"><div class="av__gallery-img${view.fitImage ? " av__gallery-img--fit" : ""}" style="${item.coverURL}"></div></div>`;
|
||||
} else {
|
||||
galleryHTML += `<div class="${coverClass}"><div class="av__gallery-img${view.fitImage ? " av__gallery-img--fit" : ""}" style="background-image:url('${item.coverURL}')"></div></div>`;
|
||||
galleryHTML += `<div class="${coverClass}"><div class="av__gallery-img${view.fitImage ? " av__gallery-img--fit" : ""}" style="background-image:url('${item.coverURL.replace(/'/g, "\\'")}')"></div></div>`;
|
||||
}
|
||||
} else if (item.coverContent) {
|
||||
galleryHTML += `<div class="${coverClass}"><div class="av__gallery-content">${item.coverContent}</div><div></div></div>`;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue