nasg/templates/WebImage.j2.html
Peter Molnar f47ed93fa0 once more with feeling: on-the-fly representation is schema.org json-ld for everything,
becase it's easy to write, forces me to use some sort of structure, and it might come handy.

However, the end HTML is microformats v1 and v2 - v1 for google, search engines, etc, v2 for anything indieweb.
2019-02-08 23:32:52 +00:00

65 lines
2.1 KiB
HTML

<figure class="photo">
{% if url != thumbnail.url %}
<a href="{{ url }}"{% if representativeOfPage %} class="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>