open-nomad/ui/app/templates/components/image-file.hbs
2019-07-30 17:25:47 -07:00

11 lines
546 B
Handlebars

<a data-test-image-link href={{src}} target="_blank" rel="noopener noreferrer" class="image-file-image">
<img data-test-image src={{src}} alt={{or alt fileName}} title={{fileName}} onload={{action updateImageMeta}} />
</a>
<figcaption class="image-file-caption">
<span class="image-file-caption-primary">
<strong data-test-file-name>{{fileName}}</strong>
{{#if (and width height)}}
<span data-test-file-stats>({{width}}px &times; {{height}}{{#if size}}px, {{format-bytes size}}{{/if}})</span>
{{/if}}
</span>
</figcaption>