templates/WebImage.j2.html (view raw)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 |
<figure class="photo">
<link rel="license" href="{{ license }}" />
{% if url != thumbnail.url %}
<a href="{{ url }}"{% if representativeOfPage %} class="u-photo u-featured"{% endif %}>
{% endif %}
<img src="{{ thumbnail.url }}" title="{{ headline }}" alt="{{ headline }}" width="{{ thumbnail.width }}" height="{{ thumbnail.height }}" />
{% if url != thumbnail.url %}
</a>
{% endif %}
<figcaption>
<span class="alt">{{ caption }}</span>
{% if creator is defined %}
{% macro exifvalue(key) %}
{% for data in exifData: %}
{% if key == data['name'] %}
{{ data['value'] }}
{% endif %}
{% endfor %}
{% endmacro %}
<dl class="exif">
<dt>Camera</dt>
<dd>
<svg width="16" height="16">
<use xlink:href="#icon-camera" />
</svg>
{{ exifvalue('Model')|trim }}
</dd>
<dt>Aperture</dt>
<dd>
<svg width="16" height="16">
<use xlink:href="#icon-aperture" />
</svg>
f/{{ exifvalue('FNumber')|trim }}
</dd>
<dt>Shutter speed</dt>
<dd>
<svg width="16" height="16">
<use xlink:href="#icon-clock" />
</svg>
{{ exifvalue('ExposureTime')|trim }} sec
</dd>
<dt>Focal length (as set)</dt>
<dd>
<svg width="16" height="16">
<use xlink:href="#icon-focallength" />
</svg>
{{ exifvalue('FocalLength')|trim }}
</dd>
<dt>Sensitivity</dt>
<dd>
<svg width="16" height="16">
<use xlink:href="#icon-sensitivity" />
</svg>
ISO {{ exifvalue('ISO')|trim }}
</dd>
<dt>Lens</dt>
<dd>
<svg width="16" height="16">
<use xlink:href="#icon-lens" />
</svg>
{{ exifvalue('LensID')|trim }}
</dd>
</dl>
{% endif %}
</figcaption>
</figure>
|