From 8ad988a58622497ef19cffa5ca6f1940f247d2f2 Mon Sep 17 00:00:00 2001 From: Andrei Rybak Date: Sat, 24 Dec 2022 23:24:16 +0100 Subject: [PATCH 1/2] Support accesskey shortcuts similar to MediaWiki HTML attribute `accesskey` [1] allows user to quickly navigate the website. Add support for `accesskey` to links of Gitit using the shortcut scheme of MediaWiki [2]. This would allow users who edit MediaWiki websites to more easily navigate Gitit webpages. Closes https://github.com/jgm/gitit/issues/609 [1] https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/accesskey [2] Documented in detail on English Wikipedia, one of the main instances of MediaWiki: https://en.wikipedia.org/wiki/Wikipedia:Keyboard_shortcuts See also https://www.mediawiki.org/wiki/Manual:Access_keys and https://meta.wikimedia.org/wiki/Help:Keyboard_shortcuts --- data/templates/pagetools.st | 4 ++-- data/templates/sitenav.st | 8 ++++---- data/templates/userbox.st | 2 +- src/Network/Gitit/Handlers.hs | 10 +++++++--- src/Network/Gitit/Layout.hs | 14 +++++++++----- 5 files changed, 23 insertions(+), 15 deletions(-) diff --git a/data/templates/pagetools.st b/data/templates/pagetools.st index a5178f4c8..5cce9a2d2 100644 --- a/data/templates/pagetools.st +++ b/data/templates/pagetools.st @@ -3,8 +3,8 @@ This page