diff options
author | Jimmy Cai <github@jimmycai.com> | 2021-08-25 13:20:15 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-08-25 13:20:15 +0300 |
commit | 626265bcfd3ebfe4a528cd367964a34b3ed9c5ab (patch) | |
tree | c225ef3159747425ebbd54a968c6461d6af0cbe3 /assets | |
parent | fe94466ec4df74533fa29944ca56417d6d9f0c5d (diff) |
refactor(article): better support for svg and external images (#326)
Diffstat (limited to 'assets')
-rw-r--r-- | assets/ts/gallery.ts | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/assets/ts/gallery.ts b/assets/ts/gallery.ts index 8bce5a9..5de13a2 100644 --- a/assets/ts/gallery.ts +++ b/assets/ts/gallery.ts @@ -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 = []; |