photos/theme/templates/media.html

85 lines
2.7 KiB
HTML

{% extends "base.html" %}
{% block extra_head %}
<link rel="stylesheet" href="{{ theme.url }}/css/media.css">
<link rel="stylesheet" href="{{ theme.url }}/fork-awesome/css/fork-awesome.min.css">
<meta property="og:image" content="{{ settings.base_url }}{{ media.path|urlencode }}/{{ media.url }}">
<meta property="og:url" content="{{ settings.base_url }}{{ media.path|urlencode }}/{{ media.url }}.html">
<meta property="og:description" content="Photo {{ media_index }} of {{ album.medias|length }}">
<meta name="twitter:card" content="summary_large_image">
{% endblock %}
{% block content %}
<div class="img-container">
<div>
<ul class="img-links">
<li>
<a href="../{{ album.url }}#{{ media.url }}" title="Go back to album">
<i aria-hidden="true" class="fa fa-reply"></i> <span>Back to album</span>
</a>
</li>
<li>
<a href="{{ media.big_url }}" title="Download original file">
<i aria-hidden="true" class="fa fa-download"></i> <span>Download</span>
</a>
</li>
</ul>
<img src="{{ media.url }}" alt="{{ media.title }}">
<dl class="meta">
{% if media.exif.dateobj %}
<div>
<dt><i class="fa fa-calendar" aria-hidden="true" title="Date taken"></i><span class="sr-only">Date taken:</span></dt>
<dd>{{ media.exif.dateobj.strftime('%a, %d. %b %Y') }} </dd>
</div>
{% endif %}
{% if media.meta.location %}
<div>
<dt><i class="fa fa-map-marker" aria-hidden="true" title="Location"></i><span class="sr-only">Location:</span></dt>
<dd>{{ media.meta.location[0] }}</dd>
</div>
{% endif %}
{% if media.exif %}
<div>
<dt><i class="fa fa-sliders" aria-hidden="true" title="Camera settings"></i><span class="sr-only">Camera settings</span></dt>
<dd>
<ul>
{% if media.exif.focal %}
<li>{{ media.exif.focal }}mm</li>
{% endif %}
{% if media.exif.fstop %}
<li>f/{{ media.exif.fstop }}</li>
{% endif %}
{% if media.exif.exposure %}
<li>{{ media.exif.exposure }}s</li>
{% endif %}
{% if media.exif.iso %}
<li>ISO {{ media.exif.iso}}</li>
{% endif %}
</ul>
</dd>
</div>
{% endif %}
</dl>
</div>
</div>
{% if previous_media %}
<a class="overlay-nav previous" href="{{ previous_media.url }}.html">
<i class="fa fa-arrow-left fa-4x" aria-hidden="true"></i>
</a>
{% endif %}
{% if next_media %}
<a class="overlay-nav next" href="{{ next_media.url }}.html">
<i class="fa fa-arrow-right fa-4x" aria-hidden="true"></i>
</a>
{% endif %}
<!-- <div>{{ media_index }} / {{ album.medias|length }}</div> -->
{% endblock %}