CJ 1 年之前
父節點
當前提交
ecd1e7c5e5
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      templates/blog.html

+ 1 - 1
templates/blog.html

@@ -254,7 +254,7 @@
         if ($(imgs[i]).attr('alt')) {
             let alt = $(imgs[i]).attr('alt')
             let src = $(imgs[i]).attr('src')
-            $(imgs[i]).parent().html(`<a data-pswp-width="${alt.split(',')[0]}" data-pswp-height="${alt.split(',')[1]}" href="${src}"><img width="${alt.split(',')[0]}" height="${alt.split(',')[0]}" data-magnify="gallery" data-src="${src}"  src="${src}"  data-href="${src}" "/></a>`)
+            $(imgs[i]).parent().html(`<a data-pswp-width="${alt.split(',')[0]}" data-pswp-height="${alt.split(',')[1]}" href="${src}"><img width="${alt.split(',')[0]}" height="${alt.split(',')[1]}" data-magnify="gallery" data-src="${src}"  src="${src}"  data-href="${src}" "/></a>`)
         }
     }
     var lightbox = new PhotoSwipeLightbox({