Support m-img attribute (indicates existence of downscaled version) in post building.

This commit is contained in:
ccd0 2016-11-05 14:14:12 -07:00
parent 3259517b0d
commit 7e4288aa3a
2 changed files with 2 additions and 1 deletions

View File

@ -76,6 +76,7 @@ Build =
twidth: data.tn_w
isSpoiler: !!data.spoiler
tag: data.tag
hasDownscale: !!data.m_img
o.file.dimensions = "#{o.file.width}x#{o.file.height}" unless /\.pdf$/.test o.file.url
o

View File

@ -14,7 +14,7 @@
</a>
(${file.size}, ${file.dimensions || "PDF"})
</div>
<a class="fileThumb?{file.isSpoiler}{ imgspoiler}{}" href="${fileURL}" target="_blank">
<a class="fileThumb?{file.isSpoiler}{ imgspoiler}{}" href="${fileURL}" target="_blank"?{file.hasDownscale}{ data-m}>
<img
src="${fileThumb}"
alt="${file.size}"