photojawn/resources/skel/_templates/photo.html
Nick Pegg 9945b9eb7f
Some checks are pending
Rust / build (push) Waiting to run
Rewrite in Rust (#3)
Just what the world needs, another silly Rust re-write! But it was a good exercise in learning.

There's a lot of messy things, which is why this is 0.2.0-pre.1. Going to make some cleaning passes after landing this.
2025-05-08 12:27:49 -07:00

54 lines
1.3 KiB
HTML

{% extends "base.html" %}
{% block js %}
// Do left/right navigation on keypresses
document.onkeydown = function(event) {
if (event.key == "ArrowLeft") {
{% if prev_image %}
location.href = "{{prev_image.html_filename}}";
{% endif %}
} else if (event.key == "ArrowRight") {
{% if next_image %}
location.href = "{{next_image.html_filename}}";
{% endif %}
}
}
{% endblock %}
{% block content %}
<div id="photo">
<img src="{{image.screen_filename}}" />
</div>
<div id="nav">
<div>
{% if prev_image %}
<a href="{{prev_image.html_filename}}">
<i class="arrow arrow-left"></i>
</a>
{% endif %}
</div>
<div>
<a href="..">
<i class="arrow arrow-up"></i>
</a>
</div>
<div>
{% if next_image %}
<a href="{{next_image.html_filename}}">
<i class="arrow arrow-right"></i>
</a>
{% endif %}
</div>
</div>
<div id="photo-description" class="caption">
{% if image.description %}
{{ image.description | safe }}
{% endif %}
</div>
<div id="download">
<a href="../{{image.filename}}">view full size</a>
</div>
{% endblock %}