mirror of
https://github.com/CaiJimmy/hugo-theme-stack.git
synced 2025-06-19 04:23:30 +08:00
Remove data-alt-html
This commit is contained in:
parent
cf515e73bb
commit
b217427dc9
@ -93,7 +93,7 @@ class StackGallery {
|
|||||||
/// Add figcaption if it exists
|
/// Add figcaption if it exists
|
||||||
if (img.hasAttribute('alt')) {
|
if (img.hasAttribute('alt')) {
|
||||||
const figcaption = document.createElement('figcaption');
|
const figcaption = document.createElement('figcaption');
|
||||||
figcaption.innerHTML = img.getAttribute('data-alt-html');
|
figcaption.innerText = img.getAttribute('alt');
|
||||||
figure.appendChild(figcaption);
|
figure.appendChild(figcaption);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -32,9 +32,7 @@
|
|||||||
loading="lazy"
|
loading="lazy"
|
||||||
{{ with $alt }}
|
{{ with $alt }}
|
||||||
alt="{{ . }}"
|
alt="{{ . }}"
|
||||||
data-alt-html="{{ . | markdownify }}"
|
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
{{ if $galleryImage }}
|
{{ if $galleryImage }}
|
||||||
class="gallery-image"
|
class="gallery-image"
|
||||||
data-flex-grow="{{ div (mul $image.Width 100) $image.Height }}"
|
data-flex-grow="{{ div (mul $image.Width 100) $image.Height }}"
|
||||||
|
Loading…
Reference in New Issue
Block a user