|
|
@ -81,11 +81,17 @@ pug_html = pug_html + ("\u003Cdiv class=\"post-file\"\u003E\u003Cspan class=\"po |
|
|
|
if (file.durationString) { |
|
|
|
if (file.durationString) { |
|
|
|
pug_html = pug_html + (", " + (pug_escape(null == (pug_interp = file.durationString) ? "" : pug_interp))); |
|
|
|
pug_html = pug_html + (", " + (pug_escape(null == (pug_interp = file.durationString) ? "" : pug_interp))); |
|
|
|
} |
|
|
|
} |
|
|
|
pug_html = pug_html + ")\u003C\u002Fspan\u003E\u003C\u002Fspan\u003E\u003Cdiv" + (" class=\"post-file-src\""+pug_attr("data-type", file.mimetype.split('/')[0], true, false)) + "\u003E\u003Ca" + (" target=\"_blank\""+pug_attr("href", `/img/${file.filename}`, true, false)) + "\u003E"; |
|
|
|
pug_html = pug_html + ")\u003C\u002Fspan\u003E\u003C\u002Fspan\u003E"; |
|
|
|
|
|
|
|
const type = file.mimetype.split('/')[0] |
|
|
|
|
|
|
|
pug_html = pug_html + "\u003Cdiv" + (" class=\"post-file-src\""+pug_attr("data-type", type, true, false)) + "\u003E\u003Ca" + (" target=\"_blank\""+pug_attr("href", `/img/${file.filename}`, true, false)) + "\u003E"; |
|
|
|
if (post.spoiler) { |
|
|
|
if (post.spoiler) { |
|
|
|
pug_html = pug_html + "\u003Cimg class=\"file-thumb\" src=\"\u002Fimg\u002Fspoiler.png\" width=\"200\" height=\"200\"\u002F\u003E"; |
|
|
|
pug_html = pug_html + "\u003Cimg class=\"file-thumb\" src=\"\u002Fimg\u002Fspoiler.png\" width=\"200\" height=\"200\"\u002F\u003E"; |
|
|
|
} |
|
|
|
} |
|
|
|
else |
|
|
|
else |
|
|
|
|
|
|
|
if (type === 'audio') { |
|
|
|
|
|
|
|
pug_html = pug_html + "\u003Cimg class=\"file-thumb\" src=\"\u002Fimg\u002Faudio.png\" width=\"200\" height=\"200\"\u002F\u003E"; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
else |
|
|
|
if (file.hasThumb) { |
|
|
|
if (file.hasThumb) { |
|
|
|
pug_html = pug_html + "\u003Cimg" + (" class=\"file-thumb\""+pug_attr("src", `/img/thumb-${file.hash}${file.thumbextension}`, true, false)+pug_attr("height", file.geometry.thumbheight, true, false)+pug_attr("width", file.geometry.thumbwidth, true, false)) + "\u002F\u003E"; |
|
|
|
pug_html = pug_html + "\u003Cimg" + (" class=\"file-thumb\""+pug_attr("src", `/img/thumb-${file.hash}${file.thumbextension}`, true, false)+pug_attr("height", file.geometry.thumbheight, true, false)+pug_attr("width", file.geometry.thumbwidth, true, false)) + "\u002F\u003E"; |
|
|
|
} |
|
|
|
} |
|
|
@ -103,11 +109,17 @@ pug_html = pug_html + ("\u003Cdiv class=\"post-file\"\u003E\u003Cspan class=\"po |
|
|
|
if (file.durationString) { |
|
|
|
if (file.durationString) { |
|
|
|
pug_html = pug_html + (", " + (pug_escape(null == (pug_interp = file.durationString) ? "" : pug_interp))); |
|
|
|
pug_html = pug_html + (", " + (pug_escape(null == (pug_interp = file.durationString) ? "" : pug_interp))); |
|
|
|
} |
|
|
|
} |
|
|
|
pug_html = pug_html + ")\u003C\u002Fspan\u003E\u003C\u002Fspan\u003E\u003Cdiv" + (" class=\"post-file-src\""+pug_attr("data-type", file.mimetype.split('/')[0], true, false)) + "\u003E\u003Ca" + (" target=\"_blank\""+pug_attr("href", `/img/${file.filename}`, true, false)) + "\u003E"; |
|
|
|
pug_html = pug_html + ")\u003C\u002Fspan\u003E\u003C\u002Fspan\u003E"; |
|
|
|
|
|
|
|
const type = file.mimetype.split('/')[0] |
|
|
|
|
|
|
|
pug_html = pug_html + "\u003Cdiv" + (" class=\"post-file-src\""+pug_attr("data-type", type, true, false)) + "\u003E\u003Ca" + (" target=\"_blank\""+pug_attr("href", `/img/${file.filename}`, true, false)) + "\u003E"; |
|
|
|
if (post.spoiler) { |
|
|
|
if (post.spoiler) { |
|
|
|
pug_html = pug_html + "\u003Cimg class=\"file-thumb\" src=\"\u002Fimg\u002Fspoiler.png\" width=\"200\" height=\"200\"\u002F\u003E"; |
|
|
|
pug_html = pug_html + "\u003Cimg class=\"file-thumb\" src=\"\u002Fimg\u002Fspoiler.png\" width=\"200\" height=\"200\"\u002F\u003E"; |
|
|
|
} |
|
|
|
} |
|
|
|
else |
|
|
|
else |
|
|
|
|
|
|
|
if (type === 'audio') { |
|
|
|
|
|
|
|
pug_html = pug_html + "\u003Cimg class=\"file-thumb\" src=\"\u002Fimg\u002Faudio.png\" width=\"200\" height=\"200\"\u002F\u003E"; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
else |
|
|
|
if (file.hasThumb) { |
|
|
|
if (file.hasThumb) { |
|
|
|
pug_html = pug_html + "\u003Cimg" + (" class=\"file-thumb\""+pug_attr("src", `/img/thumb-${file.hash}${file.thumbextension}`, true, false)+pug_attr("height", file.geometry.thumbheight, true, false)+pug_attr("width", file.geometry.thumbwidth, true, false)) + "\u002F\u003E"; |
|
|
|
pug_html = pug_html + "\u003Cimg" + (" class=\"file-thumb\""+pug_attr("src", `/img/thumb-${file.hash}${file.thumbextension}`, true, false)+pug_attr("height", file.geometry.thumbheight, true, false)+pug_attr("width", file.geometry.thumbwidth, true, false)) + "\u002F\u003E"; |
|
|
|
} |
|
|
|
} |
|
|
|