refactor(article): better support for svg and external images (#326)

This commit is contained in:
Jimmy Cai
2021-08-25 12:20:15 +02:00
committed by GitHub
parent fe94466ec4
commit 626265bcfd
2 changed files with 46 additions and 30 deletions
+2 -2
View File
@@ -34,7 +34,7 @@ class StackGallery {
private loadItems(container: HTMLElement) {
this.items = [];
const figures = container.querySelectorAll('figure');
const figures = container.querySelectorAll('figure.gallery-image');
for (const el of figures) {
const figcaption = el.querySelector('figcaption'),
@@ -57,7 +57,7 @@ class StackGallery {
}
public static createGallery(container: HTMLElement) {
const figuresEl = container.querySelectorAll('figure');
const figuresEl = container.querySelectorAll('figure.gallery-image');
let currentGallery = [];