fix image pages

This commit is contained in:
Nick Pegg 2025-05-06 21:16:29 -07:00
parent 141ea6dc5d
commit 2bacda9de5
3 changed files with 37 additions and 38 deletions

View file

@ -5,11 +5,11 @@
document.onkeydown = function(event) {
if (event.key == "ArrowLeft") {
{% if prev_image %}
location.href = "{{prev_image.html_path}}";
location.href = "{{prev_image.html_filename}}";
{% endif %}
} else if (event.key == "ArrowRight") {
{% if next_image %}
location.href = "{{next_image.html_path}}";
location.href = "{{next_image.html_filename}}";
{% endif %}
}
}
@ -17,13 +17,13 @@
{% block content %}
<div id="photo">
<img src="{{image.screen_path}}" />
<img src="{{image.screen_filename}}" />
</div>
<div id="nav">
<div>
{% if prev_image %}
<a href="{{prev_image.html_path}}">
<a href="{{prev_image.html_filename}}">
<i class="arrow arrow-left"></i>
</a>
{% endif %}
@ -35,7 +35,7 @@
</div>
<div>
{% if next_image %}
<a href="{{next_image.html_path}}">
<a href="{{next_image.html_filename}}">
<i class="arrow arrow-right"></i>
</a>
{% endif %}