Ticket #5619: 0001-Generalise-keyboard-navigation.patch

File 0001-Generalise-keyboard-navigation.patch, 4.4 KB (added by Olivier Mehani, 8 months ago)
  • mediagoblin/templates/mediagoblin/root.html

    From 6d97ecc3a21c0328cb99e911f437928af7fcd528 Mon Sep 17 00:00:00 2001
    From: Olivier Mehani <shtrom+mediagoblin@ssji.net>
    Date: Sun, 17 May 2020 02:24:07 +1000
    Subject: [PATCH 1/5] Generalise keyboard navigation
    
    ---
     mediagoblin/templates/mediagoblin/root.html                 | 2 ++
     .../templates/mediagoblin/user_pages/collection.html        | 2 ++
     mediagoblin/templates/mediagoblin/user_pages/gallery.html   | 2 ++
     mediagoblin/templates/mediagoblin/user_pages/user.html      | 2 ++
     mediagoblin/templates/mediagoblin/utils/pagination.html     | 6 ++++--
     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 b  
    2222{% set feed_url = request.urlgen('mediagoblin.listings.atom_feed') %}
    2323
    2424{% block mediagoblin_head -%}
     25  <script type="text/javascript"
     26          src="{{ request.staticdirect('/js/keyboard_navigation.js') }}"></script>
    2527  {% set feed_url = request.urlgen('mediagoblin.listings.atom_feed') -%}
    2628  <link rel="alternate" type="application/atom+xml" href="{{ feed_url }}">
    2729{%- endblock mediagoblin_head %}
  • mediagoblin/templates/mediagoblin/user_pages/collection.html

    diff --git a/mediagoblin/templates/mediagoblin/user_pages/collection.html b/mediagoblin/templates/mediagoblin/user_pages/collection.html
    index 171de887..c9d9fbcd 100644
    a b  
    2020{% from "mediagoblin/utils/collection_gallery.html" import collection_gallery %}
    2121
    2222{% block mediagoblin_head %}
     23    <script type="text/javascript"
     24          src="{{ request.staticdirect('/js/keyboard_navigation.js') }}"></script>
    2325    <link rel="alternate" type="application/atom+xml"
    2426          href="{{ request.urlgen(
    2527                       'mediagoblin.user_pages.atom_feed',
  • mediagoblin/templates/mediagoblin/user_pages/gallery.html

    diff --git a/mediagoblin/templates/mediagoblin/user_pages/gallery.html b/mediagoblin/templates/mediagoblin/user_pages/gallery.html
    index f23bb156..af183890 100644
    a b  
    2020{% from "mediagoblin/utils/object_gallery.html" import object_gallery %}
    2121
    2222{% block mediagoblin_head %}
     23    <script type="text/javascript"
     24          src="{{ request.staticdirect('/js/keyboard_navigation.js') }}"></script>
    2325    <link rel="alternate" type="application/atom+xml"
    2426          href="{{ request.urlgen(
    2527                       'mediagoblin.user_pages.atom_feed',
  • mediagoblin/templates/mediagoblin/user_pages/user.html

    diff --git a/mediagoblin/templates/mediagoblin/user_pages/user.html b/mediagoblin/templates/mediagoblin/user_pages/user.html
    index 9ac96f80..ff1c904d 100644
    a b  
    2323{% from "mediagoblin/utils/object_gallery.html" import object_gallery %}
    2424
    2525{% block mediagoblin_head %}
     26    <script type="text/javascript"
     27          src="{{ request.staticdirect('/js/keyboard_navigation.js') }}"></script>
    2628    <link rel="alternate" type="application/atom+xml"
    2729          href="{{ request.urlgen(
    2830                       'mediagoblin.user_pages.atom_feed',
  • mediagoblin/templates/mediagoblin/utils/pagination.html

    diff --git a/mediagoblin/templates/mediagoblin/utils/pagination.html b/mediagoblin/templates/mediagoblin/utils/pagination.html
    index 2ac990ae..2b19d14c 100644
    a b  
    3636          {% set prev_url = pagination.get_page_url_explicit(
    3737                   base_url, get_params,
    3838                   pagination.page - 1) %}
    39           <a href="{{ prev_url }}">{% trans %}← Newer{% endtrans %}</a>
     39          <a class="navigation_left"
     40             href="{{ prev_url }}">{% trans %}← Newer{% endtrans %}</a>
    4041        {% endif %}
    4142        {% if pagination.has_next %}
    4243          {% set next_url = pagination.get_page_url_explicit(
    4344                   base_url, get_params,
    4445                   pagination.page + 1) %}
    45           <a href="{{ next_url }}">{% trans %}Older →{% endtrans %}</a>
     46          <a class="navigation_right"
     47             href="{{ next_url }}">{% trans %}Older →{% endtrans %}</a>
    4648        {% endif %}
    4749        <br />
    4850        {% trans %}Go to page:{% endtrans %}