nasg/templates/WebImage.j2.html

67 lines
2.2 KiB
HTML
Raw Normal View History

2018-07-20 16:45:42 +01:00
<figure class="photo">
<link rel="license" href="{{ license }}" />
{% if url != thumbnail.url %}
<a href="{{ url }}"{% if representativeOfPage %} class="u-photo u-featured"{% endif %}>
2018-07-20 16:45:42 +01:00
{% endif %}
<img src="{{ thumbnail.url }}" title="{{ headline }}" alt="{{ headline }}" width="{{ thumbnail.width }}" height="{{ thumbnail.height }}" />
{% if url != thumbnail.url %}
2018-07-20 16:45:42 +01:00
</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 %}
2018-07-20 16:45:42 +01:00
<dl class="exif">
<dt>Camera</dt>
<dd>
<svg width="16" height="16">
2018-07-20 16:45:42 +01:00
<use xlink:href="#icon-camera" />
</svg>
{{ exifvalue('Model')|trim }}
2018-07-20 16:45:42 +01:00
</dd>
<dt>Aperture</dt>
<dd>
<svg width="16" height="16">
2018-07-20 16:45:42 +01:00
<use xlink:href="#icon-aperture" />
</svg>
f/{{ exifvalue('FNumber')|trim }}
2018-07-20 16:45:42 +01:00
</dd>
<dt>Shutter speed</dt>
<dd>
<svg width="16" height="16">
2018-07-20 16:45:42 +01:00
<use xlink:href="#icon-clock" />
</svg>
{{ exifvalue('ExposureTime')|trim }} sec
2018-07-20 16:45:42 +01:00
</dd>
<dt>Focal length (as set)</dt>
<dd>
<svg width="16" height="16">
2018-07-20 16:45:42 +01:00
<use xlink:href="#icon-focallength" />
</svg>
{{ exifvalue('FocalLength')|trim }}
2018-07-20 16:45:42 +01:00
</dd>
<dt>Sensitivity</dt>
<dd>
<svg width="16" height="16">
2018-07-20 16:45:42 +01:00
<use xlink:href="#icon-sensitivity" />
</svg>
ISO {{ exifvalue('ISO')|trim }}
2018-07-20 16:45:42 +01:00
</dd>
<dt>Lens</dt>
<dd>
<svg width="16" height="16">
2018-07-20 16:45:42 +01:00
<use xlink:href="#icon-lens" />
</svg>
{{ exifvalue('LensID')|trim }}
2018-07-20 16:45:42 +01:00
</dd>
</dl>
{% endif %}
</figcaption>
</figure>