More key shortcuts

merge-requests/30/head
Bob Mottram 2021-04-23 13:04:42 +01:00
parent 5d267d32d0
commit 4b904c8f33
19 changed files with 229 additions and 41 deletions

View File

@ -2845,6 +2845,11 @@ class PubServer(BaseHTTPRequestHandler):
showPublishedDateOnly = self.server.showPublishedDateOnly showPublishedDateOnly = self.server.showPublishedDateOnly
allowLocalNetworkAccess = \ allowLocalNetworkAccess = \
self.server.allowLocalNetworkAccess self.server.allowLocalNetworkAccess
accessKeys = self.server.accessKeys
if self.server.keyShortcuts.get(nickname):
accessKeys = self.server.keyShortcuts[nickname]
profileStr = \ profileStr = \
htmlProfileAfterSearch(self.server.cssCache, htmlProfileAfterSearch(self.server.cssCache,
self.server.recentPostsCache, self.server.recentPostsCache,
@ -2867,7 +2872,8 @@ class PubServer(BaseHTTPRequestHandler):
self.server.defaultTimeline, self.server.defaultTimeline,
self.server.peertubeInstances, self.server.peertubeInstances,
allowLocalNetworkAccess, allowLocalNetworkAccess,
self.server.themeName) self.server.themeName,
accessKeys)
if profileStr: if profileStr:
msg = profileStr.encode('utf-8') msg = profileStr.encode('utf-8')
msglen = len(msg) msglen = len(msg)
@ -5718,6 +5724,13 @@ class PubServer(BaseHTTPRequestHandler):
optionsActor, optionsProfileUrl, optionsActor, optionsProfileUrl,
self.server.personCache, 5) self.server.personCache, 5)
accessKeys = self.server.accessKeys
if '/users/' in path:
nickname = path.split('/users/')[1]
if '/' in nickname:
nickname = nickname.split('/')[0]
if self.server.keyShortcuts.get(nickname):
accessKeys = self.server.keyShortcuts[nickname]
msg = htmlPersonOptions(self.server.defaultTimeline, msg = htmlPersonOptions(self.server.defaultTimeline,
self.server.cssCache, self.server.cssCache,
self.server.translate, self.server.translate,
@ -5740,7 +5753,8 @@ class PubServer(BaseHTTPRequestHandler):
movedTo, alsoKnownAs, movedTo, alsoKnownAs,
self.server.textModeBanner, self.server.textModeBanner,
self.server.newsInstance, self.server.newsInstance,
authorized).encode('utf-8') authorized,
accessKeys).encode('utf-8')
msglen = len(msg) msglen = len(msg)
self._set_headers('text/html', msglen, self._set_headers('text/html', msglen,
cookie, callingDomain) cookie, callingDomain)
@ -14658,6 +14672,14 @@ def runDaemon(brochMode: bool,
# key shortcuts SHIFT + ALT + [key] # key shortcuts SHIFT + ALT + [key]
httpd.accessKeys = { httpd.accessKeys = {
'submitButton': 'y', 'submitButton': 'y',
'followButton': 'f',
'blockButton': 'b',
'infoButton': 'i',
'snoozeButton': 's',
'reportButton': 'r',
'viewButton': 'v',
'enterPetname': 'p',
'enterNotes': 'n',
'menuTimeline': 't', 'menuTimeline': 't',
'menuEdit': 'e', 'menuEdit': 'e',
'menuProfile': 'p', 'menuProfile': 'p',
@ -14673,7 +14695,8 @@ def runDaemon(brochMode: bool,
'menuBlogs': 'b', 'menuBlogs': 'b',
'menuNewswire': 'w', 'menuNewswire': 'w',
'menuLinks': 'l', 'menuLinks': 'l',
'menuModeration': 'm', 'menuMedia': 'm',
'menuModeration': 'o',
'menuFollowing': 'f', 'menuFollowing': 'f',
'menuFollowers': 'g', 'menuFollowers': 'g',
'menuRoles': 'o', 'menuRoles': 'o',

View File

@ -427,5 +427,14 @@
"menuSkills": "مهارات", "menuSkills": "مهارات",
"menuLogout": "تسجيل خروج", "menuLogout": "تسجيل خروج",
"menuKeys": "الاختصارات الرئيسية", "menuKeys": "الاختصارات الرئيسية",
"submitButton": "زر الإرسال" "submitButton": "زر الإرسال",
"menuMedia": "وسائط",
"followButton": "زر متابعة / متابعة",
"blockButton": "زر كتلة",
"infoButton": "زر المعلومات",
"snoozeButton": "زر الغفوة",
"reportButton": "زر تقرير",
"viewButton": "عرض زر",
"enterPetname": "أدخل PETNAME",
"enterNotes": "أدخل الملاحظات"
} }

View File

@ -427,5 +427,14 @@
"menuSkills": "Habilitats", "menuSkills": "Habilitats",
"menuLogout": "Tancar sessió", "menuLogout": "Tancar sessió",
"menuKeys": "Dreceres clau", "menuKeys": "Dreceres clau",
"submitButton": "Envia el botó" "submitButton": "Envia el botó",
"menuMedia": "Medis de comunicació",
"followButton": "Seguiu / no seguit",
"blockButton": "Botó de bloc",
"infoButton": "Botó d'informació",
"snoozeButton": "Botó de snooze",
"reportButton": "Botó d'informe",
"viewButton": "Botó Veure",
"enterPetname": "Introduïu PETNAME",
"enterNotes": "Introduïu notes"
} }

View File

@ -427,5 +427,14 @@
"menuSkills": "Medrau", "menuSkills": "Medrau",
"menuLogout": "Allgofnodi", "menuLogout": "Allgofnodi",
"menuKeys": "Llwybrau byr allweddol", "menuKeys": "Llwybrau byr allweddol",
"submitButton": "Cyflwyno botwm" "submitButton": "Cyflwyno botwm",
"menuMedia": "Chyfryngau",
"followButton": "Dilynwch / Peidiwch â Dilynwch y botwm",
"blockButton": "Botwm bloc",
"infoButton": "Botwm info",
"snoozeButton": "Botwm Snooze",
"reportButton": "Botwm adroddiadau",
"viewButton": "Gweld y botwm",
"enterPetname": "Rhowch enw PETName",
"enterNotes": "Rhowch nodiadau"
} }

View File

@ -427,5 +427,14 @@
"menuSkills": "Kompetenzen", "menuSkills": "Kompetenzen",
"menuLogout": "Ausloggen", "menuLogout": "Ausloggen",
"menuKeys": "Schlüsselverknüpfungen", "menuKeys": "Schlüsselverknüpfungen",
"submitButton": "Button einreichen" "submitButton": "Button einreichen",
"menuMedia": "Medien",
"followButton": "Folgen / folgen Sie nicht der Taste",
"blockButton": "Blockknopf",
"infoButton": "Info-Taste",
"snoozeButton": "Schlummertaste",
"reportButton": "Berichtsknopf",
"viewButton": "Schaltfläche anzeigen",
"enterPetname": "Petname eingeben",
"enterNotes": "Notizen eingeben"
} }

View File

@ -427,5 +427,14 @@
"menuSkills": "Skills", "menuSkills": "Skills",
"menuLogout": "Logout", "menuLogout": "Logout",
"menuKeys": "Key Shortcuts", "menuKeys": "Key Shortcuts",
"submitButton": "Submit button" "submitButton": "Submit button",
"menuMedia": "Media",
"followButton": "Follow/unfollow button",
"blockButton": "Block button",
"infoButton": "Info button",
"snoozeButton": "Snooze button",
"reportButton": "Report button",
"viewButton": "View button",
"enterPetname": "Enter petname",
"enterNotes": "Enter notes"
} }

View File

@ -427,5 +427,14 @@
"menuSkills": "Habilidades", "menuSkills": "Habilidades",
"menuLogout": "Cerrar sesión", "menuLogout": "Cerrar sesión",
"menuKeys": "Atajos clave", "menuKeys": "Atajos clave",
"submitButton": "Botón de enviar" "submitButton": "Botón de enviar",
"menuMedia": "Medios de comunicación",
"followButton": "Botón de seguimiento / dejo",
"blockButton": "Botón de bloqueo",
"infoButton": "Botón de información",
"snoozeButton": "El botón de dormitar",
"reportButton": "Botón de informe",
"viewButton": "Botón de vista",
"enterPetname": "Entrar en nombre de pettname",
"enterNotes": "Ingresar notas"
} }

View File

@ -427,5 +427,14 @@
"menuSkills": "Compétences", "menuSkills": "Compétences",
"menuLogout": "Se déconnecter", "menuLogout": "Se déconnecter",
"menuKeys": "Raccourcis clés", "menuKeys": "Raccourcis clés",
"submitButton": "Bouton de soumission" "submitButton": "Bouton de soumission",
"menuMedia": "Médias",
"followButton": "Suivez / Bouton Suivi",
"blockButton": "Bouton de bloc",
"infoButton": "Bouton info",
"snoozeButton": "Le bouton de la sieste",
"reportButton": "Bouton de rapport",
"viewButton": "Bouton d'affichage",
"enterPetname": "Entrez PETNAME",
"enterNotes": "Faire entrer des notes"
} }

View File

@ -427,5 +427,14 @@
"menuSkills": "Scileanna", "menuSkills": "Scileanna",
"menuLogout": "Logáil Amach", "menuLogout": "Logáil Amach",
"menuKeys": "Príomh-aicearraí", "menuKeys": "Príomh-aicearraí",
"submitButton": "Cuir an cnaipe isteach" "submitButton": "Cuir an cnaipe isteach",
"menuMedia": "Na meáin",
"followButton": "Lean / Cnaipe Unurollow",
"blockButton": "Cnaipe bloc",
"infoButton": "Cnaipe Info",
"snoozeButton": "Cnaipe snooze",
"reportButton": "Cnaipe Tuairisce",
"viewButton": "Féach an cnaipe",
"enterPetname": "Cuir isteach PetName",
"enterNotes": "Cuir nótaí isteach"
} }

View File

@ -427,5 +427,14 @@
"menuSkills": "कौशल", "menuSkills": "कौशल",
"menuLogout": "लॉग आउट", "menuLogout": "लॉग आउट",
"menuKeys": "कुंजी शॉर्टकट", "menuKeys": "कुंजी शॉर्टकट",
"submitButton": "जमा करने वाला बटन" "submitButton": "जमा करने वाला बटन",
"menuMedia": "मीडिया",
"followButton": "फॉलो / अनफ़ॉलो बटन",
"blockButton": "ब्लॉक बटन",
"infoButton": "जानकारी बटन",
"snoozeButton": "अलार्म को थोड़ी देर बंद करने वाला बटन",
"reportButton": "रिपोर्ट बटन",
"viewButton": "देखें बटन",
"enterPetname": "PETNAME दर्ज करें",
"enterNotes": "नोट्स दर्ज करें"
} }

View File

@ -427,5 +427,14 @@
"menuSkills": "Competenze", "menuSkills": "Competenze",
"menuLogout": "Disconnettersi", "menuLogout": "Disconnettersi",
"menuKeys": "Scorciatoie chiave", "menuKeys": "Scorciatoie chiave",
"submitButton": "Invia il pulsante" "submitButton": "Invia il pulsante",
"menuMedia": "Media",
"followButton": "Segui il pulsante Segui / Unfollow",
"blockButton": "Blocco pulsante",
"infoButton": "Pulsante info",
"snoozeButton": "Pulsante snooze.",
"reportButton": "Pulsante report.",
"viewButton": "Visualizza il pulsante",
"enterPetname": "Inserisci PetName",
"enterNotes": "Inserisci le note"
} }

View File

@ -427,5 +427,14 @@
"menuSkills": "スキル", "menuSkills": "スキル",
"menuLogout": "ログアウト", "menuLogout": "ログアウト",
"menuKeys": "キーショートカット", "menuKeys": "キーショートカット",
"submitButton": "送信ボタン" "submitButton": "送信ボタン",
"menuMedia": "メディア",
"followButton": "フォロー/フォローダウンボタン",
"blockButton": "ブロックボタン",
"infoButton": "情報ボタン",
"snoozeButton": "スヌーズボタン",
"reportButton": "レポートボタン",
"viewButton": "ボタンを見る",
"enterPetname": "PetNameを入力してください",
"enterNotes": "ノートを入力してください"
} }

View File

@ -427,5 +427,14 @@
"menuSkills": "Şarezayên", "menuSkills": "Şarezayên",
"menuLogout": "Derkeve", "menuLogout": "Derkeve",
"menuKeys": "Kurteyên Key", "menuKeys": "Kurteyên Key",
"submitButton": "Bişkojka bişînin" "submitButton": "Bişkojka bişînin",
"menuMedia": "Medya",
"followButton": "Bişkojka bişopînin / Nexşe",
"blockButton": "Bişkojka Block",
"infoButton": "Bişkoja INFO",
"snoozeButton": "Bişkojka Snooze",
"reportButton": "Bişkoja Report",
"viewButton": "Bişkoja View",
"enterPetname": "Porê binivîse",
"enterNotes": "Nîşan binivîse"
} }

View File

@ -423,5 +423,14 @@
"menuSkills": "Skills", "menuSkills": "Skills",
"menuLogout": "Logout", "menuLogout": "Logout",
"menuKeys": "Key Shortcuts", "menuKeys": "Key Shortcuts",
"submitButton": "Submit button" "submitButton": "Submit button",
"menuMedia": "Media",
"followButton": "Follow/unfollow button",
"blockButton": "Block button",
"infoButton": "Info button",
"snoozeButton": "Snooze button",
"reportButton": "Report button",
"viewButton": "View button",
"enterPetname": "Enter petname",
"enterNotes": "Enter notes"
} }

View File

@ -427,5 +427,14 @@
"menuSkills": "Habilidades", "menuSkills": "Habilidades",
"menuLogout": "Sair", "menuLogout": "Sair",
"menuKeys": "Atalhos-chave", "menuKeys": "Atalhos-chave",
"submitButton": "Botão de envio" "submitButton": "Botão de envio",
"menuMedia": "meios de comunicação",
"followButton": "Siga / Deixar botão",
"blockButton": "Botão de bloco",
"infoButton": "Botão de informação",
"snoozeButton": "Botão Snooze",
"reportButton": "Botão de relatório",
"viewButton": "Botão de visualização",
"enterPetname": "Digite Petname",
"enterNotes": "Digite notas"
} }

View File

@ -427,5 +427,14 @@
"menuSkills": "Навыки и умения", "menuSkills": "Навыки и умения",
"menuLogout": "Выйти", "menuLogout": "Выйти",
"menuKeys": "Клавичные ярлыки", "menuKeys": "Клавичные ярлыки",
"submitButton": "Отправить кнопку" "submitButton": "Отправить кнопку",
"menuMedia": "СМИ",
"followButton": "Следуйте / отписаться кнопка",
"blockButton": "Кнопка блокировки",
"infoButton": "Информация Кнопка",
"snoozeButton": "Кнопка сножения",
"reportButton": "Кнопка отчета",
"viewButton": "Кнопка просмотра",
"enterPetname": "Введите petname",
"enterNotes": "Введите ноты"
} }

View File

@ -427,5 +427,14 @@
"menuSkills": "技能", "menuSkills": "技能",
"menuLogout": "登出", "menuLogout": "登出",
"menuKeys": "关键捷径", "menuKeys": "关键捷径",
"submitButton": "提交按钮" "submitButton": "提交按钮",
"menuMedia": "媒体",
"followButton": "关注/取消关注按钮",
"blockButton": "块按钮",
"infoButton": "信息按钮",
"snoozeButton": "贪睡按钮",
"reportButton": "报告按钮",
"viewButton": "查看按钮",
"enterPetname": "进入宠物名",
"enterNotes": "输入笔记"
} }

View File

@ -54,7 +54,8 @@ def htmlPersonOptions(defaultTimeline: str,
alsoKnownAs: [], alsoKnownAs: [],
textModeBanner: str, textModeBanner: str,
newsInstance: bool, newsInstance: bool,
authorized: bool) -> str: authorized: bool,
accessKeys: {}) -> str:
"""Show options for a person: view/follow/block/report """Show options for a person: view/follow/block/report
""" """
optionsDomain, optionsPort = getDomainFromActor(optionsActor) optionsDomain, optionsPort = getDomainFromActor(optionsActor)
@ -234,7 +235,8 @@ def htmlPersonOptions(defaultTimeline: str,
optionsStr += \ optionsStr += \
' ' + translate['Petname'] + ': \n' + \ ' ' + translate['Petname'] + ': \n' + \
' <input type="text" name="optionpetname" value="' + \ ' <input type="text" name="optionpetname" value="' + \
petname + '">\n' \ petname + '" ' + \
'accesskey="' + accessKeys['enterPetname'] + '">\n' \
' <button type="submit" class="buttonsmall" ' + \ ' <button type="submit" class="buttonsmall" ' + \
'name="submitPetname">' + \ 'name="submitPetname">' + \
translate['Submit'] + '</button><br>\n' translate['Submit'] + '</button><br>\n'
@ -324,40 +326,51 @@ def htmlPersonOptions(defaultTimeline: str,
if authorized and originPathStr == '/users/' + nickname: if authorized and originPathStr == '/users/' + nickname:
optionsStr += \ optionsStr += \
' <a href="' + backPath + '"><button type="button" ' + \ ' <a href="' + backPath + '"><button type="button" ' + \
'class="buttonIcon" name="submitBack">' + translate['Go Back'] + \ 'class="buttonIcon" name="submitBack" ' + \
'</button></a>\n' 'accesskey="' + accessKeys['menuTimeline'] + '">' + \
translate['Go Back'] + '</button></a>\n'
else: else:
optionsStr += \ optionsStr += \
' <a href="' + originPathStr + '"><button type="button" ' + \ ' <a href="' + originPathStr + '"><button type="button" ' + \
'class="buttonIcon" name="submitBack">' + translate['Go Back'] + \ 'class="buttonIcon" name="submitBack" accesskey="' + \
accessKeys['menuTimeline'] + '">' + translate['Go Back'] + \
'</button></a>\n' '</button></a>\n'
if authorized: if authorized:
optionsStr += \ optionsStr += \
' <button type="submit" class="button" name="submitView">' + \ ' <button type="submit" class="button" ' + \
'name="submitView" accesskey="' + \
accessKeys['viewButton'] + '">' + \
translate['View'] + '</button>\n' translate['View'] + '</button>\n'
optionsStr += donateStr optionsStr += donateStr
if authorized: if authorized:
optionsStr += \ optionsStr += \
' <button type="submit" class="button" name="submit' + \ ' <button type="submit" class="button" name="submit' + \
followStr + '">' + translate[followStr] + '</button>\n' followStr + '" accesskey="' + accessKeys['followButton'] + '">' + \
translate[followStr] + '</button>\n'
optionsStr += \ optionsStr += \
' <button type="submit" class="button" name="submit' + \ ' <button type="submit" class="button" name="submit' + \
blockStr + '">' + translate[blockStr] + '</button>\n' blockStr + '" accesskey="' + accessKeys['blockButton'] + '">' + \
translate[blockStr] + '</button>\n'
optionsStr += \ optionsStr += \
' <button type="submit" class="button" name="submitDM">' + \ ' <button type="submit" class="button" name="submitDM" ' + \
'accesskey="' + accessKeys['menuDM'] + '">' + \
translate['DM'] + '</button>\n' translate['DM'] + '</button>\n'
optionsStr += \ optionsStr += \
' <button type="submit" class="button" name="submit' + \ ' <button type="submit" class="button" name="submit' + \
snoozeButtonStr + '">' + translate[snoozeButtonStr] + \ snoozeButtonStr + '" accesskey="' + \
accessKeys['snoozeButton'] + '">' + translate[snoozeButtonStr] + \
'</button>\n' '</button>\n'
optionsStr += \ optionsStr += \
' <button type="submit" class="button" ' + \ ' <button type="submit" class="button" ' + \
'name="submitReport">' + translate['Report'] + '</button>\n' 'name="submitReport" accesskey="' + \
accessKeys['reportButton'] + '">' + \
translate['Report'] + '</button>\n'
if isModerator(baseDir, nickname): if isModerator(baseDir, nickname):
optionsStr += \ optionsStr += \
' <button type="submit" class="button" ' + \ ' <button type="submit" class="button" ' + \
'name="submitPersonInfo">' + \ 'name="submitPersonInfo" accesskey="' + \
accessKeys['infoButton'] + '">' + \
translate['Info'] + '</button>\n' translate['Info'] + '</button>\n'
personNotes = '' personNotes = ''
@ -376,7 +389,8 @@ def htmlPersonOptions(defaultTimeline: str,
translate['Submit'] + '</button><br>\n' translate['Submit'] + '</button><br>\n'
optionsStr += \ optionsStr += \
' <textarea id="message" ' + \ ' <textarea id="message" ' + \
'name="optionnotes" style="height:400px" spellcheck="true">' + \ 'name="optionnotes" style="height:400px" spellcheck="true" ' + \
'accesskey="' + accessKeys['enterNotes'] + '">' + \
personNotes + '</textarea>\n' personNotes + '</textarea>\n'
optionsStr += ' </form>\n' optionsStr += ' </form>\n'

View File

@ -67,7 +67,8 @@ def htmlProfileAfterSearch(cssCache: {},
defaultTimeline: str, defaultTimeline: str,
peertubeInstances: [], peertubeInstances: [],
allowLocalNetworkAccess: bool, allowLocalNetworkAccess: bool,
themeName: str) -> str: themeName: str,
accessKeys: {}) -> str:
"""Show a profile page after a search for a fediverse address """Show a profile page after a search for a fediverse address
""" """
if hasUsersPath(profileHandle) or '/@' in profileHandle: if hasUsersPath(profileHandle) or '/@' in profileHandle:
@ -255,7 +256,7 @@ def htmlProfileAfterSearch(cssCache: {},
profileDescriptionShort, profileDescriptionShort,
avatarUrl, imageUrl, avatarUrl, imageUrl,
movedTo, profileJson['id'], movedTo, profileJson['id'],
alsoKnownAs) alsoKnownAs, accessKeys)
domainFull = getFullDomain(domain, port) domainFull = getFullDomain(domain, port)
@ -276,10 +277,12 @@ def htmlProfileAfterSearch(cssCache: {},
' <input type="hidden" name="actor" value="' + \ ' <input type="hidden" name="actor" value="' + \
personUrl + '">\n' personUrl + '">\n'
profileStr += \ profileStr += \
' <button type="submit" class="button" name="submitYes">' + \ ' <button type="submit" class="button" name="submitYes" ' + \
'accesskey="' + accessKeys['followButton'] + '">' + \
translate['Follow'] + '</button>\n' translate['Follow'] + '</button>\n'
profileStr += \ profileStr += \
' <button type="submit" class="button" name="submitView">' + \ ' <button type="submit" class="button" name="submitView" ' + \
'accesskey="' + accessKeys['viewButton'] + '">' + \
translate['View'] + '</button>\n' translate['View'] + '</button>\n'
profileStr += ' </center>\n' profileStr += ' </center>\n'
profileStr += ' </form>\n' profileStr += ' </form>\n'
@ -331,14 +334,16 @@ def _getProfileHeader(baseDir: str, httpPrefix: str,
loginButton: str, avatarUrl: str, loginButton: str, avatarUrl: str,
theme: str, movedTo: str, theme: str, movedTo: str,
alsoKnownAs: [], alsoKnownAs: [],
pinnedContent) -> str: pinnedContent: str,
accessKeys: {}) -> str:
"""The header of the profile screen, containing background """The header of the profile screen, containing background
image and avatar image and avatar
""" """
htmlStr = '\n\n <figure class="profileHeader">\n' htmlStr = '\n\n <figure class="profileHeader">\n'
htmlStr += ' <a href="/users/' + \ htmlStr += ' <a href="/users/' + \
nickname + '/' + defaultTimeline + '" title="' + \ nickname + '/' + defaultTimeline + '" title="' + \
translate['Switch to timeline view'] + '">\n' translate['Switch to timeline view'] + '" ' + \
'accesskey="' + accessKeys['menuTimeline'] + '">\n'
htmlStr += ' <img class="profileBackground" ' + \ htmlStr += ' <img class="profileBackground" ' + \
'alt="" ' + \ 'alt="" ' + \
'src="/users/' + nickname + '/image_' + theme + '.png" /></a>\n' 'src="/users/' + nickname + '/image_' + theme + '.png" /></a>\n'
@ -411,14 +416,16 @@ def _getProfileHeaderAfterSearch(baseDir: str,
profileDescriptionShort: str, profileDescriptionShort: str,
avatarUrl: str, imageUrl: str, avatarUrl: str, imageUrl: str,
movedTo: str, actor: str, movedTo: str, actor: str,
alsoKnownAs: []) -> str: alsoKnownAs: [],
accessKeys: {}) -> str:
"""The header of a searched for handle, containing background """The header of a searched for handle, containing background
image and avatar image and avatar
""" """
htmlStr = '\n\n <figure class="profileHeader">\n' htmlStr = '\n\n <figure class="profileHeader">\n'
htmlStr += ' <a href="/users/' + \ htmlStr += ' <a href="/users/' + \
nickname + '/' + defaultTimeline + '" title="' + \ nickname + '/' + defaultTimeline + '" title="' + \
translate['Switch to timeline view'] + '">\n' translate['Switch to timeline view'] + '" ' + \
'accesskey="' + accessKeys['menuTimeline'] + '">\n'
htmlStr += ' <img class="profileBackground" ' + \ htmlStr += ' <img class="profileBackground" ' + \
'alt="" ' + \ 'alt="" ' + \
'src="' + imageUrl + '" /></a>\n' 'src="' + imageUrl + '" /></a>\n'
@ -723,7 +730,7 @@ def htmlProfile(rssIconAtTop: bool,
profileDescriptionShort, profileDescriptionShort,
loginButton, avatarUrl, theme, loginButton, avatarUrl, theme,
movedTo, alsoKnownAs, movedTo, alsoKnownAs,
pinnedContent) pinnedContent, accessKeys)
# keyboard navigation # keyboard navigation
userPathStr = '/users/' + nickname userPathStr = '/users/' + nickname