diff --git a/main.js b/main.js index 5229d56..af6248b 100644 --- a/main.js +++ b/main.js @@ -132,6 +132,10 @@ static a(params) { return this.make("a", params) } + + static img(params) { + return this.make("img", params) + } } class Property { @@ -384,7 +388,7 @@ } }, children: [ - Tag.make("img", { + Tag.img({ src: "https://upload.wikimedia.org/wikipedia/commons/a/aa/Bw_copy_icon_320x320.svg" }) ] @@ -419,7 +423,7 @@ } }, children: [ - Tag.make("img", { + Tag.img({ src: iconSrc, classes: "map-icon" }) @@ -909,10 +913,6 @@ }) for (const file of files) { - let swiperFile = file.cloneNode(true) - if (swiperFile.dataset.origin) - swiperFile.src = swiperFile.dataset.origin - let swiperSlide = Tag.div({ classes: "swiper-slide", children: [ @@ -922,7 +922,9 @@ text: "Скачать", target: "_blank" }), - swiperFile + Tag.img({ + src: file.dataset.origin + }) ] })