Sha256: 1b20b878df106c92396c798217d8b6c74072355411f962166337c722f6b41b2d
Contents?: true
Size: 1 KB
Versions: 4
Compression:
Stored size: 1 KB
Contents
<div style="width: <%=size[0]%>px; height: auto; overflow: hidden;"> <% if attachment.image? %> <% if attachment.variable? %> <%= image_tag(field.variant(attachment, resize_to_limit: size)) %> <% else %> <%= image_tag(field.url(attachment)) %> <% end %> <% elsif attachment.video? %> <% if attachment.previewable? %> <%= video_tag(field.url(attachment), poster: field.preview(attachment, resize_to_limit: size), controls: true, autobuffer: true, style: "object-fit: contain; width: 100%; height: 100%;") %> <% else %> <%= video_tag(field.url(attachment), controls: true, autobuffer: true, style: style) %> <% end %> <% elsif attachment.audio? %> <%= audio_tag(field.url(attachment), autoplay: false, controls: true) %> <% elsif attachment.previewable? %> <%= image_tag(field.preview(attachment, resize_to_limit: size)) %> <% else %> <%= attachment.filename %> <% end %> </div>
Version data entries
4 entries across 4 versions & 1 rubygems