Current location

narf Source control manager Git

summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOlivier Mehani <shtrom+mediagoblin@ssji.net>2020-05-17 02:24:07 +1000
committerOlivier Mehani <shtrom+mediagoblin@ssji.net>2020-05-31 00:44:14 +1000
commit1ba9ee46e56e6c77aab964c19de07c6d34d933ee (patch)
tree11c52ab4ff5217b74b0fa694a02c3a6399a31be9
parent9308959be28da444e6875691fef14a635b79339d (diff)
Generalise keyboard navigation
-rw-r--r--mediagoblin/templates/mediagoblin/root.html2
-rw-r--r--mediagoblin/templates/mediagoblin/user_pages/collection.html2
-rw-r--r--mediagoblin/templates/mediagoblin/user_pages/gallery.html2
-rw-r--r--mediagoblin/templates/mediagoblin/user_pages/user.html2
-rw-r--r--mediagoblin/templates/mediagoblin/utils/pagination.html6
5 files changed, 12 insertions, 2 deletions
diff --git a/mediagoblin/templates/mediagoblin/root.html b/mediagoblin/templates/mediagoblin/root.html
index 15d53af1..22fffb1c 100644
--- a/mediagoblin/templates/mediagoblin/root.html
+++ b/mediagoblin/templates/mediagoblin/root.html
@@ -22,6 +22,8 @@
{% set feed_url = request.urlgen('mediagoblin.listings.atom_feed') %}
{% block mediagoblin_head -%}
+ <script type="text/javascript"
+ src="{{ request.staticdirect('/js/keyboard_navigation.js') }}"></script>
{% set feed_url = request.urlgen('mediagoblin.listings.atom_feed') -%}
<link rel="alternate" type="application/atom+xml" href="{{ feed_url }}">
{%- endblock mediagoblin_head %}
diff --git a/mediagoblin/templates/mediagoblin/user_pages/collection.html b/mediagoblin/templates/mediagoblin/user_pages/collection.html
index 71ba4451..68bee67f 100644
--- a/mediagoblin/templates/mediagoblin/user_pages/collection.html
+++ b/mediagoblin/templates/mediagoblin/user_pages/collection.html
@@ -20,6 +20,8 @@
{% from "mediagoblin/utils/collection_gallery.html" import collection_gallery %}
{% block mediagoblin_head %}
+ <script type="text/javascript"
+ src="{{ request.staticdirect('/js/keyboard_navigation.js') }}"></script>
<link rel="alternate" type="application/atom+xml"
href="{{ request.urlgen(
'mediagoblin.user_pages.atom_feed',
diff --git a/mediagoblin/templates/mediagoblin/user_pages/gallery.html b/mediagoblin/templates/mediagoblin/user_pages/gallery.html
index f23bb156..af183890 100644
--- a/mediagoblin/templates/mediagoblin/user_pages/gallery.html
+++ b/mediagoblin/templates/mediagoblin/user_pages/gallery.html
@@ -20,6 +20,8 @@
{% from "mediagoblin/utils/object_gallery.html" import object_gallery %}
{% block mediagoblin_head %}
+ <script type="text/javascript"
+ src="{{ request.staticdirect('/js/keyboard_navigation.js') }}"></script>
<link rel="alternate" type="application/atom+xml"
href="{{ request.urlgen(
'mediagoblin.user_pages.atom_feed',
diff --git a/mediagoblin/templates/mediagoblin/user_pages/user.html b/mediagoblin/templates/mediagoblin/user_pages/user.html
index 9ac96f80..ff1c904d 100644
--- a/mediagoblin/templates/mediagoblin/user_pages/user.html
+++ b/mediagoblin/templates/mediagoblin/user_pages/user.html
@@ -23,6 +23,8 @@
{% from "mediagoblin/utils/object_gallery.html" import object_gallery %}
{% block mediagoblin_head %}
+ <script type="text/javascript"
+ src="{{ request.staticdirect('/js/keyboard_navigation.js') }}"></script>
<link rel="alternate" type="application/atom+xml"
href="{{ request.urlgen(
'mediagoblin.user_pages.atom_feed',
diff --git a/mediagoblin/templates/mediagoblin/utils/pagination.html b/mediagoblin/templates/mediagoblin/utils/pagination.html
index 2ac990ae..2b19d14c 100644
--- a/mediagoblin/templates/mediagoblin/utils/pagination.html
+++ b/mediagoblin/templates/mediagoblin/utils/pagination.html
@@ -36,13 +36,15 @@
{% set prev_url = pagination.get_page_url_explicit(
base_url, get_params,
pagination.page - 1) %}
- <a href="{{ prev_url }}">{% trans %}← Newer{% endtrans %}</a>
+ <a class="navigation_left"
+ href="{{ prev_url }}">{% trans %}← Newer{% endtrans %}</a>
{% endif %}
{% if pagination.has_next %}
{% set next_url = pagination.get_page_url_explicit(
base_url, get_params,
pagination.page + 1) %}
- <a href="{{ next_url }}">{% trans %}Older →{% endtrans %}</a>
+ <a class="navigation_right"
+ href="{{ next_url }}">{% trans %}Older →{% endtrans %}</a>
{% endif %}
<br />
{% trans %}Go to page:{% endtrans %}