Keyboard navigation

merge-requests/16/head
Bob Mottram 2021-02-05 17:24:45 +00:00
parent 1e49b3e352
commit ab2b2a46ca
3 changed files with 13 additions and 4 deletions

View File

@ -714,9 +714,8 @@ def htmlProfile(rssIconAtTop: bool,
navLinks = {
translate['Switch to timeline view']: userTimelineStr,
translate['Edit']: userPathStr + '/editprofile',
translate['Skip to timeline']: '#buttonheader',
translate['Logout']: '/logout'
}
}
profileStr = htmlKeyboardNavigation(navLinks)
profileStr += profileHeaderStr + donateSection

View File

@ -367,9 +367,18 @@ def htmlTimeline(cssCache: {}, defaultTimeline: str,
# keyboard navigation
navLinks = {
translate['Switch to profile view']: '/users/' + nickname,
translate['Skip to timeline']: usersPath + '/' + boxName + '#timeline',
translate['Inbox']: usersPath + '/inbox#timeline',
translate['DM']: usersPath + '/dm#timeline',
translate['Replies']: usersPath + '/tlreplies#timeline',
translate['Outbox']: usersPath + '/inbox#timeline',
translate['Create a new post']: usersPath + '/newpost',
translate['Bookmarks']: usersPath + '/tlbookmarks#timeline',
translate['Shares']: usersPath + '/tlshares#timeline',
translate['Blogs']: usersPath + '/tlblogs#timeline',
translate['Events']: usersPath + '/tlevents#timeline',
translate['Skip to Newswire']: '#newswire',
translate['Skip to Links']: '#links'
translate['Skip to Links']: '#links',
translate['Mod']: usersPath + '/moderation#timeline'
}
tlStr += htmlKeyboardNavigation(navLinks)

View File

@ -885,6 +885,7 @@ def htmlKeyboardNavigation(links: {}) -> str:
"""
htmlStr = '<div class="transparent">'
for title, url in links.items():
title = str(title)
htmlStr += '<label class="transparent">' + \
'<a href="' + url + '">' + \
title + '</a></label> | '