From 1cb71eabdb963cf17ff8f0302e99178719727734 Mon Sep 17 00:00:00 2001 From: Luke Murphy Date: Fri, 5 Feb 2021 09:48:04 +0100 Subject: [PATCH 01/79] Drop crypto package Follows d6f7ad20a38b4e56f106c4117b34440153aa04fa. --- setup.cfg | 1 - 1 file changed, 1 deletion(-) diff --git a/setup.cfg b/setup.cfg index 3f3e838ff..0942dd25e 100644 --- a/setup.cfg +++ b/setup.cfg @@ -25,7 +25,6 @@ scripts = deploy/i2p deploy/onion install_requires = - crypto >= 1.4.1, < 2 idna >= 2.5, < 3 numpy >= 1.20.0, < 2 pillow >= 8.1.0, < 9 From da5648d1d0ce9f492fd9fccdf278e879229edaaa Mon Sep 17 00:00:00 2001 From: Luke Murphy Date: Fri, 5 Feb 2021 09:48:16 +0100 Subject: [PATCH 02/79] Add bounds for cryptography Follows d6f7ad20a38b4e56f106c4117b34440153aa04fa. --- setup.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.cfg b/setup.cfg index 0942dd25e..6b3bd5005 100644 --- a/setup.cfg +++ b/setup.cfg @@ -28,7 +28,7 @@ install_requires = idna >= 2.5, < 3 numpy >= 1.20.0, < 2 pillow >= 8.1.0, < 9 - cryptography + cryptography >= 3.3.1, < 4 pyqrcode >= 1.2.1, < 2 python-dateutil >= 2.8.1, < 3 requests >= 2.25.1, < 3 From 668c96f6ea0238dcfa2b39a9e4eac8aa68a2c1c7 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Fri, 5 Feb 2021 11:16:18 +0000 Subject: [PATCH 03/79] Move timeline bookmark --- webapp_timeline.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/webapp_timeline.py b/webapp_timeline.py index 66bbf7837..d3c950ba1 100644 --- a/webapp_timeline.py +++ b/webapp_timeline.py @@ -433,7 +433,6 @@ def htmlTimeline(cssCache: {}, defaultTimeline: str, leftColumnStr + ' \n' # center column containing posts tlStr += ' \n' - tlStr += '
\n' if not fullWidthTimelineButtonHeader: tlStr += \ @@ -534,6 +533,8 @@ def htmlTimeline(cssCache: {}, defaultTimeline: str, translate['Page up'] + '">\n' + \ ' \n' + tlStr += '
\n' + # show the posts itemCtr = 0 if timelineJson: From 48e7d17d9300148b5b84935bef092d812222ed01 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Fri, 5 Feb 2021 11:35:25 +0000 Subject: [PATCH 04/79] Change terminology for news instances --- translations/ar.json | 3 ++- translations/ca.json | 3 ++- translations/cy.json | 3 ++- translations/de.json | 3 ++- translations/en.json | 3 ++- translations/es.json | 3 ++- translations/fr.json | 3 ++- translations/ga.json | 3 ++- translations/hi.json | 3 ++- translations/it.json | 3 ++- translations/ja.json | 3 ++- translations/oc.json | 3 ++- translations/pt.json | 3 ++- translations/ru.json | 3 ++- translations/zh.json | 3 ++- webapp_column_right.py | 18 +++++++++++++----- 16 files changed, 43 insertions(+), 20 deletions(-) diff --git a/translations/ar.json b/translations/ar.json index 087f1bc9d..b3a408074 100644 --- a/translations/ar.json +++ b/translations/ar.json @@ -366,5 +366,6 @@ "Version": "الإصدار", "Skip to timeline": "تخطي إلى الجدول الزمني", "Skip to Newswire": "انتقل إلى Newswire", - "Skip to Links": "تخطي إلى روابط الويب" + "Skip to Links": "تخطي إلى روابط الويب", + "Publish a blog article": "نشر مقال بلوق" } diff --git a/translations/ca.json b/translations/ca.json index 17b1414f4..232ee4300 100644 --- a/translations/ca.json +++ b/translations/ca.json @@ -366,5 +366,6 @@ "Version": "Versió", "Skip to timeline": "Ves a la cronologia", "Skip to Newswire": "Vés a Newswire", - "Skip to Links": "Vés als enllaços web" + "Skip to Links": "Vés als enllaços web", + "Publish a blog article": "Publicar un article del bloc" } diff --git a/translations/cy.json b/translations/cy.json index 26813ecc2..55b4b95e1 100644 --- a/translations/cy.json +++ b/translations/cy.json @@ -366,5 +366,6 @@ "Version": "Fersiwn", "Skip to timeline": "Neidio i'r llinell amser", "Skip to Newswire": "Neidio i Newswire", - "Skip to Links": "Neidio i Dolenni Gwe" + "Skip to Links": "Neidio i Dolenni Gwe", + "Publish a blog article": "Cyhoeddi erthygl blog" } diff --git a/translations/de.json b/translations/de.json index cb0fa5c24..140712ebd 100644 --- a/translations/de.json +++ b/translations/de.json @@ -366,5 +366,6 @@ "Version": "Ausführung", "Skip to timeline": "Zur Zeitleiste springen", "Skip to Newswire": "Springe zu Newswire", - "Skip to Links": "Springe zu Weblinks" + "Skip to Links": "Springe zu Weblinks", + "Publish a blog article": "Veröffentlichen Sie einen Blog-Artikel" } diff --git a/translations/en.json b/translations/en.json index bdf30b608..77da14052 100644 --- a/translations/en.json +++ b/translations/en.json @@ -366,5 +366,6 @@ "Version": "Version", "Skip to timeline": "Skip to timeline", "Skip to Newswire": "Skip to Newswire", - "Skip to Links": "Skip to Links" + "Skip to Links": "Skip to Links", + "Publish a blog article": "Publish a blog article" } diff --git a/translations/es.json b/translations/es.json index 602d20746..cf09d1446 100644 --- a/translations/es.json +++ b/translations/es.json @@ -366,5 +366,6 @@ "Version": "Versión", "Skip to timeline": "Saltar a la línea de tiempo", "Skip to Newswire": "Saltar a Newswire", - "Skip to Links": "Saltar a enlaces web" + "Skip to Links": "Saltar a enlaces web", + "Publish a blog article": "Publica un artículo de blog" } diff --git a/translations/fr.json b/translations/fr.json index 2506982e9..ac51b24fa 100644 --- a/translations/fr.json +++ b/translations/fr.json @@ -366,5 +366,6 @@ "Version": "Version", "Skip to timeline": "Passer à la chronologie", "Skip to Newswire": "Passer à Newswire", - "Skip to Links": "Passer aux liens Web" + "Skip to Links": "Passer aux liens Web", + "Publish a blog article": "Publier un article de blog" } diff --git a/translations/ga.json b/translations/ga.json index 169fd5e3e..5cff4c525 100644 --- a/translations/ga.json +++ b/translations/ga.json @@ -366,5 +366,6 @@ "Version": "Leagan", "Skip to timeline": "Scipeáil chuig an amlíne", "Skip to Newswire": "Scipeáil chuig Newswire", - "Skip to Links": "Scipeáil chuig Naisc Ghréasáin" + "Skip to Links": "Scipeáil chuig Naisc Ghréasáin", + "Publish a blog article": "Foilsigh alt blagála" } diff --git a/translations/hi.json b/translations/hi.json index def3d5d1f..a83d8d5a9 100644 --- a/translations/hi.json +++ b/translations/hi.json @@ -366,5 +366,6 @@ "Version": "संस्करण", "Skip to timeline": "टाइमलाइन पर जाएं", "Skip to Newswire": "Newswire पर जाएं", - "Skip to Links": "वेब लिंक पर जाएं" + "Skip to Links": "वेब लिंक पर जाएं", + "Publish a blog article": "एक ब्लॉग लेख प्रकाशित करें" } diff --git a/translations/it.json b/translations/it.json index fc13ee792..e7082ff98 100644 --- a/translations/it.json +++ b/translations/it.json @@ -366,5 +366,6 @@ "Version": "Versione", "Skip to timeline": "Passa alla sequenza temporale", "Skip to Newswire": "Passa a Newswire", - "Skip to Links": "Passa a collegamenti Web" + "Skip to Links": "Passa a collegamenti Web", + "Publish a blog article": "Pubblica un articolo sul blog" } diff --git a/translations/ja.json b/translations/ja.json index e5de8f525..38d6685a4 100644 --- a/translations/ja.json +++ b/translations/ja.json @@ -366,5 +366,6 @@ "Version": "バージョン", "Skip to timeline": "タイムラインにスキップ", "Skip to Newswire": "Newswireにスキップ", - "Skip to Links": "Webリンクにスキップ" + "Skip to Links": "Webリンクにスキップ", + "Publish a blog article": "ブログ記事を公開する" } diff --git a/translations/oc.json b/translations/oc.json index a6d62a6e0..7cd70a858 100644 --- a/translations/oc.json +++ b/translations/oc.json @@ -362,5 +362,6 @@ "Version": "Version", "Skip to timeline": "Skip to timeline", "Skip to Newswire": "Skip to Newswire", - "Skip to Links": "Skip to Links" + "Skip to Links": "Skip to Links", + "Publish a blog article": "Publish a blog article" } diff --git a/translations/pt.json b/translations/pt.json index d0f485ca5..2abe336bf 100644 --- a/translations/pt.json +++ b/translations/pt.json @@ -366,5 +366,6 @@ "Version": "Versão", "Skip to timeline": "Pular para a linha do tempo", "Skip to Newswire": "Pular para Newswire", - "Skip to Links": "Pular para links da web" + "Skip to Links": "Pular para links da web", + "Publish a blog article": "Publique um artigo de blog" } diff --git a/translations/ru.json b/translations/ru.json index 14eb8b5db..b75628208 100644 --- a/translations/ru.json +++ b/translations/ru.json @@ -366,5 +366,6 @@ "Version": "Версия", "Skip to timeline": "Перейти к временной шкале", "Skip to Newswire": "Перейти к ленте новостей", - "Skip to Links": "Перейти к веб-ссылкам" + "Skip to Links": "Перейти к веб-ссылкам", + "Publish a blog article": "Опубликовать статью в блоге" } diff --git a/translations/zh.json b/translations/zh.json index b75b33b3f..ea0dcce39 100644 --- a/translations/zh.json +++ b/translations/zh.json @@ -366,5 +366,6 @@ "Version": "版", "Skip to timeline": "跳到时间线", "Skip to Newswire": "跳到新闻专线", - "Skip to Links": "跳到网页链接" + "Skip to Links": "跳到网页链接", + "Publish a blog article": "发布博客文章" } diff --git a/webapp_column_right.py b/webapp_column_right.py index b245a5c6e..b2a4e63b6 100644 --- a/webapp_column_right.py +++ b/webapp_column_right.py @@ -50,7 +50,8 @@ def getRightColumnContent(baseDir: str, nickname: str, domainFull: str, publishButtonAtTop: bool, authorized: bool, showHeaderImage: bool, - theme: str) -> str: + theme: str, + defaultTimeline: str) -> str: """Returns html content for the right column """ htmlStr = '' @@ -62,10 +63,13 @@ def getRightColumnContent(baseDir: str, nickname: str, domainFull: str, if authorized: # only show the publish button if logged in, otherwise replace it with # a login button + titleStr = translate['Publish a blog article'] + if defaultTimeline == 'tlfeatures': + titleStr = translate['Publish a news article'] publishButtonStr = \ ' ' + \ + 'title="' + titleStr + '">' + \ '\n' else: @@ -158,13 +162,16 @@ def getRightColumnContent(baseDir: str, nickname: str, domainFull: str, # show publish icon at top if showPublishButton: if showPublishAsIcon: + titleStr = translate['Publish a blog article'] + if defaultTimeline == 'tlfeatures': + titleStr = translate['Publish a news article'] htmlStr += \ ' ' + \ '' + \
-                translate['Publish a news article'] + '\n' if editImageClass == 'rightColEdit': @@ -485,7 +492,8 @@ def htmlNewswireMobile(cssCache: {}, baseDir: str, nickname: str, newswire, positiveVoting, False, timelinePath, showPublishButton, showPublishAsIcon, rssIconAtTop, False, - authorized, False, theme) + authorized, False, theme, + defaultTimeline) else: if editor: htmlStr += '


\n' From 12b7ab6503e237cbca3a39a90a921c93e13d513b Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Fri, 5 Feb 2021 11:41:45 +0000 Subject: [PATCH 05/79] Missing paramaters --- webapp_frontscreen.py | 3 ++- webapp_timeline.py | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/webapp_frontscreen.py b/webapp_frontscreen.py index 97aadb938..4e5ad14fc 100644 --- a/webapp_frontscreen.py +++ b/webapp_frontscreen.py @@ -169,7 +169,8 @@ def htmlFrontScreen(rssIconAtTop: bool, httpPrefix, translate, False, False, newswire, False, False, None, False, False, - False, True, authorized, True, theme) + False, True, authorized, True, theme, + defaultTimeline) profileFooterStr += ' \n' profileFooterStr += ' \n' profileFooterStr += ' \n' diff --git a/webapp_timeline.py b/webapp_timeline.py index d3c950ba1..7f81fdb5a 100644 --- a/webapp_timeline.py +++ b/webapp_timeline.py @@ -635,7 +635,8 @@ def htmlTimeline(cssCache: {}, defaultTimeline: str, False, None, True, showPublishAsIcon, rssIconAtTop, publishButtonAtTop, - authorized, True, theme) + authorized, True, theme, + defaultTimeline) tlStr += '
\n' tlStr += ' ' + \ From 178fb27b5b314321954787b3b52bbcd45e416175 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Fri, 5 Feb 2021 12:14:54 +0000 Subject: [PATCH 06/79] Turn off dropdown on new post screen under some single-purpose conditions --- daemon.py | 20 +++++++++++++++----- webapp_column_right.py | 4 ++-- webapp_create_post.py | 16 +++++++++++----- 3 files changed, 28 insertions(+), 12 deletions(-) diff --git a/daemon.py b/daemon.py index 0c70a77fb..70c836065 100644 --- a/daemon.py +++ b/daemon.py @@ -2078,7 +2078,8 @@ class PubServer(BaseHTTPRequestHandler): domainFull, self.server.defaultTimeline, self.server.newswire, - self.server.themeName).encode('utf-8') + self.server.themeName, + True).encode('utf-8') msglen = len(msg) self._set_headers('text/html', msglen, cookie, callingDomain) @@ -2176,7 +2177,8 @@ class PubServer(BaseHTTPRequestHandler): domainFull, self.server.defaultTimeline, self.server.newswire, - self.server.themeName).encode('utf-8') + self.server.themeName, + True).encode('utf-8') msglen = len(msg) self._set_headers('text/html', msglen, cookie, callingDomain) @@ -9711,7 +9713,8 @@ class PubServer(BaseHTTPRequestHandler): inReplyToUrl: str, replyToList: [], shareDescription: str, replyPageNumber: int, domain: str, domainFull: str, - GETstartTime, GETtimings: {}, cookie) -> bool: + GETstartTime, GETtimings: {}, cookie, + noDropDown: bool) -> bool: """Shows the new post screen """ isNewPostEndpoint = False @@ -9740,7 +9743,8 @@ class PubServer(BaseHTTPRequestHandler): domainFull, self.server.defaultTimeline, self.server.newswire, - self.server.themeName).encode('utf-8') + self.server.themeName, + noDropDown).encode('utf-8') if not msg: print('Error replying to ' + inReplyToUrl) self._404() @@ -9983,6 +9987,12 @@ class PubServer(BaseHTTPRequestHandler): if self.path.startswith('/@'): self.path = self.path.replace('/@', '/users/') + # turn off dropdowns on new post screen + noDropDown = False + if self.path.endswith('?nodropdown'): + noDropDown = True + self.path = self.path.replace('?nodropdown', '') + # redirect music to #nowplaying list if self.path == '/music' or self.path == '/nowplaying': self.path = '/tags/nowplaying' @@ -11556,7 +11566,7 @@ class PubServer(BaseHTTPRequestHandler): self.server.domain, self.server.domainFull, GETstartTime, GETtimings, - cookie): + cookie, noDropDown): return self._benchmarkGETtimings(GETstartTime, GETtimings, diff --git a/webapp_column_right.py b/webapp_column_right.py index b2a4e63b6..1b4276515 100644 --- a/webapp_column_right.py +++ b/webapp_column_right.py @@ -68,7 +68,7 @@ def getRightColumnContent(baseDir: str, nickname: str, domainFull: str, titleStr = translate['Publish a news article'] publishButtonStr = \ ' ' + \ '\n' @@ -167,7 +167,7 @@ def getRightColumnContent(baseDir: str, nickname: str, domainFull: str, titleStr = translate['Publish a news article'] htmlStr += \ ' ' + \ + '/users/' + nickname + '/newblog?nodropdown">' + \ '' + \
                 titleStr + '' + \ scopeDescription + '\n' - dropDownContent += '
    \n' + if noDropDown: + dropDownContent += '\n' + return dropDownContent + + dropDownContent += ' \n' + dropDownContent += '\n' return dropDownContent @@ -171,7 +176,7 @@ def htmlNewPost(cssCache: {}, mediaInstance: bool, translate: {}, nickname: str, domain: str, domainFull: str, defaultTimeline: str, newswire: {}, - theme: str) -> str: + theme: str, noDropDown: bool) -> str: """New post screen """ replyStr = '' @@ -641,7 +646,8 @@ def htmlNewPost(cssCache: {}, mediaInstance: bool, translate: {}, dropdownDMSuffix, dropdownReminderSuffix, dropdownEventSuffix, - dropdownReportSuffix) + dropdownReportSuffix, + noDropDown) else: if not shareDescription: # reporting a post to moderator From c0bd35adf93dd3daa60f74f32c4f74522f77649e Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Fri, 5 Feb 2021 12:22:23 +0000 Subject: [PATCH 07/79] No checkbox if dropdown is absent --- webapp_create_post.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/webapp_create_post.py b/webapp_create_post.py index 04db29e38..6387f9c5a 100644 --- a/webapp_create_post.py +++ b/webapp_create_post.py @@ -76,8 +76,9 @@ def _htmlNewPostDropDown(scopeIcon: str, scopeDescription: str, """Returns the html for a drop down list of new post types """ dropDownContent = '
' return htmlStr From 3bfa33f1f93203dbb9f7771b2dd4f1bd37f36d1c Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Fri, 5 Feb 2021 17:44:50 +0000 Subject: [PATCH 20/79] Tidying --- webapp_profile.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/webapp_profile.py b/webapp_profile.py index 19912ce46..83eb6a241 100644 --- a/webapp_profile.py +++ b/webapp_profile.py @@ -710,9 +710,9 @@ def htmlProfile(rssIconAtTop: bool, # keyboard navigation userPathStr = '/users/' + nickname - userTimelineStr = '/users/' + nickname + '/' + defaultTimeline, + deft = defaultTimeline navLinks = { - translate['Switch to timeline view']: userTimelineStr, + translate['Switch to timeline view']: userPathStr + '/' + deft, translate['Edit']: userPathStr + '/editprofile', translate['Following']: userPathStr + '/following#buttonheader', translate['Followers']: userPathStr + '/followers#buttonheader', From 1e255fcd1e69c0538be4fd7f6b6e68765fc4b907 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Fri, 5 Feb 2021 17:55:49 +0000 Subject: [PATCH 21/79] Bookmark below button header --- webapp_profile.py | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/webapp_profile.py b/webapp_profile.py index 83eb6a241..9e522bc8e 100644 --- a/webapp_profile.py +++ b/webapp_profile.py @@ -714,13 +714,13 @@ def htmlProfile(rssIconAtTop: bool, navLinks = { translate['Switch to timeline view']: userPathStr + '/' + deft, translate['Edit']: userPathStr + '/editprofile', - translate['Following']: userPathStr + '/following#buttonheader', - translate['Followers']: userPathStr + '/followers#buttonheader', - translate['Roles']: userPathStr + '/roles#buttonheader', - translate['Skills']: userPathStr + '/skills#buttonheader', - translate['Shares']: userPathStr + '/shares#buttonheader', + translate['Following']: userPathStr + '/following#timeline', + translate['Followers']: userPathStr + '/followers#timeline', + translate['Roles']: userPathStr + '/roles#timeline', + translate['Skills']: userPathStr + '/skills#timeline', + translate['Shares']: userPathStr + '/shares#timeline', translate['Logout']: '/logout' - } + } profileStr = htmlKeyboardNavigation(navLinks) profileStr += profileHeaderStr + donateSection @@ -755,6 +755,9 @@ def htmlProfile(rssIconAtTop: bool, profileStr += ' ' profileStr += '' + # start of #timeline + profileStr += '
\n' + profileStr += followApprovalsSection cssFilename = baseDir + '/epicyon-profile.css' @@ -809,6 +812,8 @@ def htmlProfile(rssIconAtTop: bool, _htmlProfileShares(actor, translate, nickname, domainFull, extraJson) + licenseStr + # end of #timeline + profileStr += '
' instanceTitle = \ getConfigParam(baseDir, 'instanceTitle') From e58d3464fdd4f58d1b48d4b5cf1c41d26f4e322a Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Fri, 5 Feb 2021 18:15:32 +0000 Subject: [PATCH 22/79] Highlight new posts during keyboard navigation --- webapp_timeline.py | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/webapp_timeline.py b/webapp_timeline.py index ceb520c17..228644276 100644 --- a/webapp_timeline.py +++ b/webapp_timeline.py @@ -365,13 +365,24 @@ def htmlTimeline(cssCache: {}, defaultTimeline: str, translate['Post'] + '' # keyboard navigation + calendarStr = translate['Calendar'] + if newCalendarEvent: + calendarStr = '*' + calendarStr + '*' + dmStr = translate['DM'] + if newDM: + dmStr = '*' + dmStr + '*' + repliesStr = translate['Replies'] + if newReply: + repliesStr = '*' + repliesStr + '*' navLinks = { translate['Switch to profile view']: '/users/' + nickname, translate['Inbox']: usersPath + '/inbox#timeline', - translate['DM']: usersPath + '/dm#timeline', - translate['Replies']: usersPath + '/tlreplies#timeline', - translate['Outbox']: usersPath + '/inbox#timeline', + translate['Search and follow']: usersPath + '/search', translate['Create a new post']: usersPath + '/newpost', + calendarStr: usersPath + '/calendar', + dmStr: usersPath + '/dm#timeline', + repliesStr: usersPath + '/tlreplies#timeline', + translate['Outbox']: usersPath + '/inbox#timeline', translate['Bookmarks']: usersPath + '/tlbookmarks#timeline', translate['Shares']: usersPath + '/tlshares#timeline', translate['Blogs']: usersPath + '/tlblogs#timeline', From 87c14f0c0f347f7ba67d53f45e46fa90f9634982 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Fri, 5 Feb 2021 18:21:04 +0000 Subject: [PATCH 23/79] No bookmark --- webapp_timeline.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/webapp_timeline.py b/webapp_timeline.py index 228644276..78470afd6 100644 --- a/webapp_timeline.py +++ b/webapp_timeline.py @@ -389,7 +389,7 @@ def htmlTimeline(cssCache: {}, defaultTimeline: str, translate['Events']: usersPath + '/tlevents#timeline', translate['Skip to Newswire']: '#newswire', translate['Skip to Links']: '#links', - translate['Mod']: usersPath + '/moderation#timeline' + translate['Mod']: usersPath + '/moderation' } tlStr += htmlKeyboardNavigation(navLinks) From 36963fe3fcf432434f20748b920c8a2d07193bd2 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Fri, 5 Feb 2021 18:23:59 +0000 Subject: [PATCH 24/79] Only show modertion link if the account is a moderator --- webapp_timeline.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/webapp_timeline.py b/webapp_timeline.py index 78470afd6..2721adb14 100644 --- a/webapp_timeline.py +++ b/webapp_timeline.py @@ -388,9 +388,10 @@ def htmlTimeline(cssCache: {}, defaultTimeline: str, translate['Blogs']: usersPath + '/tlblogs#timeline', translate['Events']: usersPath + '/tlevents#timeline', translate['Skip to Newswire']: '#newswire', - translate['Skip to Links']: '#links', - translate['Mod']: usersPath + '/moderation' + translate['Skip to Links']: '#links' } + if moderator: + navLinks[translate['Mod']] = usersPath + '/moderation' tlStr += htmlKeyboardNavigation(navLinks) # banner and row of buttons From 17a334bd29ef850c6368f51739d3419b8ed7c52f Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Fri, 5 Feb 2021 18:46:42 +0000 Subject: [PATCH 25/79] Indicate new followers during keyboard navigation --- webapp_timeline.py | 3 ++- webapp_utils.py | 13 ++++++++++++- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/webapp_timeline.py b/webapp_timeline.py index 2721adb14..c990ed1bb 100644 --- a/webapp_timeline.py +++ b/webapp_timeline.py @@ -392,7 +392,8 @@ def htmlTimeline(cssCache: {}, defaultTimeline: str, } if moderator: navLinks[translate['Mod']] = usersPath + '/moderation' - tlStr += htmlKeyboardNavigation(navLinks) + tlStr += htmlKeyboardNavigation(navLinks, + usersPath, translate, followApprovals) # banner and row of buttons tlStr += \ diff --git a/webapp_utils.py b/webapp_utils.py index 3cc8b655d..a241e1597 100644 --- a/webapp_utils.py +++ b/webapp_utils.py @@ -880,10 +880,21 @@ def getAvatarImageUrl(session, return avatarUrl -def htmlKeyboardNavigation(links: {}) -> str: +def htmlKeyboardNavigation(links: {}, + usersPath=None, translate=None, + followApprovals=False) -> str: """Given a set of links return the html for keyboard navigation """ htmlStr = '



' return htmlStr From d63aa8763f5944de9597d72d15f29fea3fefd680 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Fri, 5 Feb 2021 19:39:21 +0000 Subject: [PATCH 29/79] Copy text mode banner when changing theme --- theme.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/theme.py b/theme.py index e641b8829..c43000fd6 100644 --- a/theme.py +++ b/theme.py @@ -439,6 +439,15 @@ def _setThemeImages(baseDir: str, name: str) -> None: rightColImageFilename = \ baseDir + '/theme/' + themeNameLower + '/right_col_image.png' + textModeBannerFilename = \ + baseDir + '/theme/' + themeNameLower + '/banner.txt' + if os.path.isfile(textModeBannerFilename): + try: + copyfile(textModeBannerFilename, + baseDir + '/accounts/banner.txt') + except BaseException: + pass + backgroundNames = ('login', 'shares', 'delete', 'follow', 'options', 'block', 'search', 'calendar') extensions = getImageExtensions() From f3ce5cb492baeb999a925570cceb254f578c7622 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Fri, 5 Feb 2021 19:42:51 +0000 Subject: [PATCH 30/79] Remove previous text mode banner --- theme.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/theme.py b/theme.py index c43000fd6..e5e7aa583 100644 --- a/theme.py +++ b/theme.py @@ -441,6 +441,8 @@ def _setThemeImages(baseDir: str, name: str) -> None: textModeBannerFilename = \ baseDir + '/theme/' + themeNameLower + '/banner.txt' + if os.path.isfile(baseDir + '/accounts/banner.txt'): + os.remove(baseDir + '/accounts/banner.txt') if os.path.isfile(textModeBannerFilename): try: copyfile(textModeBannerFilename, From 715b69bafb33249cbdcb66ce880dd6ec94ffa0f2 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Fri, 5 Feb 2021 19:50:09 +0000 Subject: [PATCH 31/79] Load the text mode banner --- daemon.py | 7 ++++++- theme.py | 12 ++++++++++++ webapp_utils.py | 2 +- 3 files changed, 19 insertions(+), 2 deletions(-) diff --git a/daemon.py b/daemon.py index b05dfe6a2..275a65ddf 100644 --- a/daemon.py +++ b/daemon.py @@ -230,6 +230,7 @@ from media import removeMetaData from cache import storePersonInCache from cache import getPersonFromCache from httpsig import verifyPostHeaders +from theme import getTextModeBanner from theme import setNewsAvatar from theme import setTheme from theme import getTheme @@ -4171,6 +4172,8 @@ class PubServer(BaseHTTPRequestHandler): self.server.themeName = fields['themeDropdown'] setTheme(baseDir, self.server.themeName, domain, allowLocalNetworkAccess) + self.server.textModeBanner = \ + getTextModeBanner(self.server.baseDir) self.server.iconsCache = {} self.server.fontsCache = {} self.server.showPublishAsIcon = \ @@ -4620,6 +4623,8 @@ class PubServer(BaseHTTPRequestHandler): self.server.themeName = currTheme setTheme(baseDir, currTheme, domain, self.server.allowLocalNetworkAccess) + self.server.textModeBanner = \ + getTextModeBanner(self.server.baseDir) self.server.iconsCache = {} self.server.fontsCache = {} self.server.showPublishAsIcon = \ @@ -13880,7 +13885,7 @@ def runDaemon(verifyAllSignatures: bool, return False # ASCII/ANSI text banner used in shell browsers, such as Lynx - httpd.textModeBanner = None + httpd.textModeBanner = getTextModeBanner(baseDir) httpd.unitTest = unitTest httpd.allowLocalNetworkAccess = allowLocalNetworkAccess diff --git a/theme.py b/theme.py index e5e7aa583..031a68de7 100644 --- a/theme.py +++ b/theme.py @@ -422,6 +422,18 @@ def _setThemeFonts(baseDir: str, themeName: str) -> None: break +def getTextModeBanner(baseDir: str) -> str: + """Returns the banner used for shell browsers, like Lynx + """ + textModeBannerFilename = baseDir + '/accounts/banner.txt' + if os.path.isfile(textModeBannerFilename): + with open(textModeBannerFilename, 'r') as fp: + bannerStr = fp.read() + if bannerStr: + return bannerStr.replace('\n', '
') + return None + + def _setThemeImages(baseDir: str, name: str) -> None: """Changes the profile background image and banner to the defaults diff --git a/webapp_utils.py b/webapp_utils.py index 840f555d1..c5eef5454 100644 --- a/webapp_utils.py +++ b/webapp_utils.py @@ -888,7 +888,7 @@ def htmlKeyboardNavigation(banner: str, links: {}, htmlStr = '
    ' if banner: - htmlStr += banner.replace('\n', '
    ') + '
    ' + htmlStr += banner + '
    ' # show new follower approvals if usersPath and translate and followApprovals: From 037c5cfba479c097ac84d1d067054eafd3ea2d03 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Fri, 5 Feb 2021 19:55:00 +0000 Subject: [PATCH 32/79] Text mode banner for debian --- theme/debian/banner.txt | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 theme/debian/banner.txt diff --git a/theme/debian/banner.txt b/theme/debian/banner.txt new file mode 100644 index 000000000..ae6652c55 --- /dev/null +++ b/theme/debian/banner.txt @@ -0,0 +1,11 @@ + _, _, ,'`. + `$$' `$$' `. ,' E P I C Y O N + $$ $$ `' + $$ $$ _, _ + ,d$$$g$$ ,d$$$b. $$,d$$$b.`$$' g$$$$$b.`$$,d$$b. + ,$P' `$$ ,$P' `Y$. $$$' `$$ $$ "' `$$ $$$' `$$ + $$' $$ $$' `$$ $$' $$ $$ ,ggggg$$ $$' $$ + $$ $$ $$ggggg$$ $$ $$ $$ ,$P" $$ $$ $$ + $$ ,$$ $$. $$ ,$P $$ $$' ,$$ $$ $$ + `$g. ,$$$ `$$._ _., $$ _,g$P' $$ `$b. ,$$$ $$ $$ + `Y$$P'$$. `Y$$$$P',$$$$P"' ,$$. `Y$$P'$$.$$. ,$$. From 33be914ead130ee853fbe7a79d6da04f64e6d995 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Fri, 5 Feb 2021 19:57:21 +0000 Subject: [PATCH 33/79] Lines before end of div --- webapp_utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/webapp_utils.py b/webapp_utils.py index c5eef5454..b445f716a 100644 --- a/webapp_utils.py +++ b/webapp_utils.py @@ -902,5 +902,5 @@ def htmlKeyboardNavigation(banner: str, links: {}, htmlStr += '
  • ' - htmlStr += '



' + htmlStr += '


' return htmlStr From 599aeee35a7c3e861bd633b270bd2cf4d9dacd68 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Fri, 5 Feb 2021 20:05:04 +0000 Subject: [PATCH 34/79] Ascii art markup --- webapp_utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/webapp_utils.py b/webapp_utils.py index b445f716a..1083eddb7 100644 --- a/webapp_utils.py +++ b/webapp_utils.py @@ -888,7 +888,7 @@ def htmlKeyboardNavigation(banner: str, links: {}, htmlStr = '
    ' if banner: - htmlStr += banner + '
    ' + htmlStr += '
    ' + banner + '

    ' # show new follower approvals if usersPath and translate and followApprovals: From 4dcb0d2a8165811d89f624cdfa268de5632ee1ef Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Fri, 5 Feb 2021 20:07:51 +0000 Subject: [PATCH 35/79] Left margin --- theme/debian/banner.txt | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/theme/debian/banner.txt b/theme/debian/banner.txt index ae6652c55..2a43d236e 100644 --- a/theme/debian/banner.txt +++ b/theme/debian/banner.txt @@ -1,11 +1,11 @@ - _, _, ,'`. - `$$' `$$' `. ,' E P I C Y O N - $$ $$ `' - $$ $$ _, _ - ,d$$$g$$ ,d$$$b. $$,d$$$b.`$$' g$$$$$b.`$$,d$$b. - ,$P' `$$ ,$P' `Y$. $$$' `$$ $$ "' `$$ $$$' `$$ - $$' $$ $$' `$$ $$' $$ $$ ,ggggg$$ $$' $$ - $$ $$ $$ggggg$$ $$ $$ $$ ,$P" $$ $$ $$ - $$ ,$$ $$. $$ ,$P $$ $$' ,$$ $$ $$ - `$g. ,$$$ `$$._ _., $$ _,g$P' $$ `$b. ,$$$ $$ $$ - `Y$$P'$$. `Y$$$$P',$$$$P"' ,$$. `Y$$P'$$.$$. ,$$. + _, _, ,'`. + `$$' `$$' `. ,' E P I C Y O N + $$ $$ `' + $$ $$ _, _ + ,d$$$g$$ ,d$$$b. $$,d$$$b.`$$' g$$$$$b.`$$,d$$b. + ,$P' `$$ ,$P' `Y$. $$$' `$$ $$ "' `$$ $$$' `$$ + $$' $$ $$' `$$ $$' $$ $$ ,ggggg$$ $$' $$ + $$ $$ $$ggggg$$ $$ $$ $$ ,$P" $$ $$ $$ + $$ ,$$ $$. $$ ,$P $$ $$' ,$$ $$ $$ + `$g. ,$$$ `$$._ _., $$ _,g$P' $$ `$b. ,$$$ $$ $$ + `Y$$P'$$. `Y$$$$P',$$$$P"' ,$$. `Y$$P'$$.$$. ,$$. From cfdc912aff0db285172c96b2624a44f48a50cb8c Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Fri, 5 Feb 2021 20:24:48 +0000 Subject: [PATCH 36/79] Highlight new shares in text mode --- webapp_timeline.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/webapp_timeline.py b/webapp_timeline.py index e8534ba15..cecac724e 100644 --- a/webapp_timeline.py +++ b/webapp_timeline.py @@ -375,6 +375,9 @@ def htmlTimeline(cssCache: {}, defaultTimeline: str, repliesStr = translate['Replies'] if newReply: repliesStr = '*' + repliesStr + '*' + sharesStr = translate['Shares'] + if newShare: + sharesStr = '*' + sharesStr + '*' navLinks = { translate['Switch to profile view']: '/users/' + nickname, translate['Inbox']: usersPath + '/inbox#timeline', @@ -385,7 +388,7 @@ def htmlTimeline(cssCache: {}, defaultTimeline: str, repliesStr: usersPath + '/tlreplies#timeline', translate['Outbox']: usersPath + '/inbox#timeline', translate['Bookmarks']: usersPath + '/tlbookmarks#timeline', - translate['Shares']: usersPath + '/tlshares#timeline', + sharesStr: usersPath + '/tlshares#timeline', translate['Blogs']: usersPath + '/tlblogs#timeline', translate['Events']: usersPath + '/tlevents#timeline', translate['Skip to Newswire']: '#newswire', From 539ef691438d4f8b49bf06dc9afabd5e95c0b68b Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Fri, 5 Feb 2021 20:32:21 +0000 Subject: [PATCH 37/79] Default text mode banner --- theme/default/banner.txt | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 theme/default/banner.txt diff --git a/theme/default/banner.txt b/theme/default/banner.txt new file mode 100644 index 000000000..7c98be708 --- /dev/null +++ b/theme/default/banner.txt @@ -0,0 +1,8 @@ + __ + , ," e`--o + (( ( | __,' + \\~-------' \_;/ + ( / + /) .______. ) + (( ( (( ( + ``-' ``-' From 4eb4815324ba20bf7c651ad8558de7abb52cdf7a Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Fri, 5 Feb 2021 21:26:55 +0000 Subject: [PATCH 38/79] Theme text mode banners --- theme/blue/banner.txt | 8 ++++++++ theme/hacker/banner.txt | 8 ++++++++ theme/henge/banner.txt | 8 ++++++++ theme/indymediaclassic/banner.txt | 6 ++++++ theme/indymediamodern/banner.txt | 6 ++++++ theme/lcd/banner.txt | 8 ++++++++ theme/light/banner.txt | 8 ++++++++ theme/night/banner.txt | 8 ++++++++ theme/purple/banner.txt | 8 ++++++++ theme/rc3/banner.txt | 8 ++++++++ theme/solidaric/banner.txt | 8 ++++++++ theme/starlight/banner.txt | 8 ++++++++ theme/zen/banner.txt | 8 ++++++++ 13 files changed, 100 insertions(+) create mode 100644 theme/blue/banner.txt create mode 100644 theme/hacker/banner.txt create mode 100644 theme/henge/banner.txt create mode 100644 theme/indymediaclassic/banner.txt create mode 100644 theme/indymediamodern/banner.txt create mode 100644 theme/lcd/banner.txt create mode 100644 theme/light/banner.txt create mode 100644 theme/night/banner.txt create mode 100644 theme/purple/banner.txt create mode 100644 theme/rc3/banner.txt create mode 100644 theme/solidaric/banner.txt create mode 100644 theme/starlight/banner.txt create mode 100644 theme/zen/banner.txt diff --git a/theme/blue/banner.txt b/theme/blue/banner.txt new file mode 100644 index 000000000..ffe9419c0 --- /dev/null +++ b/theme/blue/banner.txt @@ -0,0 +1,8 @@ + __ + , ," e`--o + (( ( | __,' + \\~-------' \_;/ + ( / + /) .______. ) + (( ( (( ( + ``-' ``-' diff --git a/theme/hacker/banner.txt b/theme/hacker/banner.txt new file mode 100644 index 000000000..ffe9419c0 --- /dev/null +++ b/theme/hacker/banner.txt @@ -0,0 +1,8 @@ + __ + , ," e`--o + (( ( | __,' + \\~-------' \_;/ + ( / + /) .______. ) + (( ( (( ( + ``-' ``-' diff --git a/theme/henge/banner.txt b/theme/henge/banner.txt new file mode 100644 index 000000000..ffe9419c0 --- /dev/null +++ b/theme/henge/banner.txt @@ -0,0 +1,8 @@ + __ + , ," e`--o + (( ( | __,' + \\~-------' \_;/ + ( / + /) .______. ) + (( ( (( ( + ``-' ``-' diff --git a/theme/indymediaclassic/banner.txt b/theme/indymediaclassic/banner.txt new file mode 100644 index 000000000..9efbf6fae --- /dev/null +++ b/theme/indymediaclassic/banner.txt @@ -0,0 +1,6 @@ + ______ ______ + _/ Y \_ + // ~~ ~~ | ~~ ~ \\ + // ~ ~ ~~ | ~~~ ~~ \\ + //________.|.________\\ + `----------`-'----------' diff --git a/theme/indymediamodern/banner.txt b/theme/indymediamodern/banner.txt new file mode 100644 index 000000000..9efbf6fae --- /dev/null +++ b/theme/indymediamodern/banner.txt @@ -0,0 +1,6 @@ + ______ ______ + _/ Y \_ + // ~~ ~~ | ~~ ~ \\ + // ~ ~ ~~ | ~~~ ~~ \\ + //________.|.________\\ + `----------`-'----------' diff --git a/theme/lcd/banner.txt b/theme/lcd/banner.txt new file mode 100644 index 000000000..ffe9419c0 --- /dev/null +++ b/theme/lcd/banner.txt @@ -0,0 +1,8 @@ + __ + , ," e`--o + (( ( | __,' + \\~-------' \_;/ + ( / + /) .______. ) + (( ( (( ( + ``-' ``-' diff --git a/theme/light/banner.txt b/theme/light/banner.txt new file mode 100644 index 000000000..ffe9419c0 --- /dev/null +++ b/theme/light/banner.txt @@ -0,0 +1,8 @@ + __ + , ," e`--o + (( ( | __,' + \\~-------' \_;/ + ( / + /) .______. ) + (( ( (( ( + ``-' ``-' diff --git a/theme/night/banner.txt b/theme/night/banner.txt new file mode 100644 index 000000000..ffe9419c0 --- /dev/null +++ b/theme/night/banner.txt @@ -0,0 +1,8 @@ + __ + , ," e`--o + (( ( | __,' + \\~-------' \_;/ + ( / + /) .______. ) + (( ( (( ( + ``-' ``-' diff --git a/theme/purple/banner.txt b/theme/purple/banner.txt new file mode 100644 index 000000000..ffe9419c0 --- /dev/null +++ b/theme/purple/banner.txt @@ -0,0 +1,8 @@ + __ + , ," e`--o + (( ( | __,' + \\~-------' \_;/ + ( / + /) .______. ) + (( ( (( ( + ``-' ``-' diff --git a/theme/rc3/banner.txt b/theme/rc3/banner.txt new file mode 100644 index 000000000..ffe9419c0 --- /dev/null +++ b/theme/rc3/banner.txt @@ -0,0 +1,8 @@ + __ + , ," e`--o + (( ( | __,' + \\~-------' \_;/ + ( / + /) .______. ) + (( ( (( ( + ``-' ``-' diff --git a/theme/solidaric/banner.txt b/theme/solidaric/banner.txt new file mode 100644 index 000000000..ffe9419c0 --- /dev/null +++ b/theme/solidaric/banner.txt @@ -0,0 +1,8 @@ + __ + , ," e`--o + (( ( | __,' + \\~-------' \_;/ + ( / + /) .______. ) + (( ( (( ( + ``-' ``-' diff --git a/theme/starlight/banner.txt b/theme/starlight/banner.txt new file mode 100644 index 000000000..ffe9419c0 --- /dev/null +++ b/theme/starlight/banner.txt @@ -0,0 +1,8 @@ + __ + , ," e`--o + (( ( | __,' + \\~-------' \_;/ + ( / + /) .______. ) + (( ( (( ( + ``-' ``-' diff --git a/theme/zen/banner.txt b/theme/zen/banner.txt new file mode 100644 index 000000000..ffe9419c0 --- /dev/null +++ b/theme/zen/banner.txt @@ -0,0 +1,8 @@ + __ + , ," e`--o + (( ( | __,' + \\~-------' \_;/ + ( / + /) .______. ) + (( ( (( ( + ``-' ``-' From 7e9a41ee40a24d1be9548b6b134ad4384b7991df Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Fri, 5 Feb 2021 21:29:46 +0000 Subject: [PATCH 39/79] Remove space --- theme/default/banner.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/theme/default/banner.txt b/theme/default/banner.txt index 7c98be708..ffe9419c0 100644 --- a/theme/default/banner.txt +++ b/theme/default/banner.txt @@ -1,4 +1,4 @@ - __ + __ , ," e`--o (( ( | __,' \\~-------' \_;/ From ca77dd959a2dbf2c4bbb70788bdb276fe1e777cc Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Sat, 6 Feb 2021 10:35:47 +0000 Subject: [PATCH 40/79] Emoji icons for keyboard menus --- webapp_profile.py | 41 +++++++++++++++++++++++++-------- webapp_timeline.py | 57 ++++++++++++++++++++++++++++++++++------------ webapp_utils.py | 6 +++++ 3 files changed, 80 insertions(+), 24 deletions(-) diff --git a/webapp_profile.py b/webapp_profile.py index ece805d96..b9ea1948b 100644 --- a/webapp_profile.py +++ b/webapp_profile.py @@ -41,6 +41,7 @@ from filters import isFiltered from follow import isFollowerOfPerson from webapp_frontscreen import htmlFrontScreen from webapp_utils import htmlKeyboardNavigation +from webapp_utils import htmlHideFromScreenReader from webapp_utils import scheduledPostsExist from webapp_utils import getPersonAvatarUrl from webapp_utils import htmlHeaderWithExternalStyle @@ -712,15 +713,31 @@ def htmlProfile(rssIconAtTop: bool, # keyboard navigation userPathStr = '/users/' + nickname deft = defaultTimeline + menuTimeline = \ + htmlHideFromScreenReader('🏠 ') + translate['Switch to timeline view'] + menuEdit = \ + htmlHideFromScreenReader('✍ ') + translate['Edit'] + menuFollowing = \ + htmlHideFromScreenReader('👥 ') + translate['Following'] + menuFollowers = \ + htmlHideFromScreenReader('👪 ') + translate['Followers'] + menuRoles = \ + htmlHideFromScreenReader('🤚 ') + translate['Roles'] + menuSkills = \ + htmlHideFromScreenReader('🛠️') + translate['Skills'] + menuShares = \ + htmlHideFromScreenReader('🤝️') + translate['Shares'] + menuLogout = \ + htmlHideFromScreenReader('❎️') + translate['Logout'] navLinks = { - translate['Switch to timeline view']: userPathStr + '/' + deft, - translate['Edit']: userPathStr + '/editprofile', - translate['Following']: userPathStr + '/following#timeline', - translate['Followers']: userPathStr + '/followers#timeline', - translate['Roles']: userPathStr + '/roles#timeline', - translate['Skills']: userPathStr + '/skills#timeline', - translate['Shares']: userPathStr + '/shares#timeline', - translate['Logout']: '/logout' + menuTimeline: userPathStr + '/' + deft, + menuEdit: userPathStr + '/editprofile', + menuFollowing: userPathStr + '/following#timeline', + menuFollowers: userPathStr + '/followers#timeline', + menuRoles: userPathStr + '/roles#timeline', + menuSkills: userPathStr + '/skills#timeline', + menuShares: userPathStr + '/shares#timeline', + menuLogout: '/logout' } profileStr = htmlKeyboardNavigation(textModeBanner, navLinks) @@ -1347,9 +1364,13 @@ def htmlEditProfile(cssCache: {}, translate: {}, baseDir: str, path: str, # keyboard navigation userPathStr = '/users/' + nickname userTimalineStr = '/users/' + nickname + '/' + defaultTimeline + menuTimeline = \ + htmlHideFromScreenReader('🏠 ') + translate['Switch to timeline view'] + menuProfile = \ + htmlHideFromScreenReader('👤 ') + translate['Switch to profile view'] navLinks = { - translate['Switch to profile view']: userPathStr, - translate['Switch to timeline view']: userTimalineStr + menuProfile: userPathStr, + menuTimeline: userTimalineStr } editProfileForm += htmlKeyboardNavigation(textModeBanner, navLinks) diff --git a/webapp_timeline.py b/webapp_timeline.py index cecac724e..70f5d3451 100644 --- a/webapp_timeline.py +++ b/webapp_timeline.py @@ -15,6 +15,7 @@ from utils import removeIdEnding from follow import followerApprovalActive from person import isPersonSnoozed from webapp_utils import htmlKeyboardNavigation +from webapp_utils import htmlHideFromScreenReader from webapp_utils import htmlPostSeparator from webapp_utils import getBannerFile from webapp_utils import htmlHeaderWithExternalStyle @@ -378,21 +379,49 @@ def htmlTimeline(cssCache: {}, defaultTimeline: str, sharesStr = translate['Shares'] if newShare: sharesStr = '*' + sharesStr + '*' + menuProfile = \ + htmlHideFromScreenReader('👤 ') + translate['Switch to profile view'] + menuInbox = \ + htmlHideFromScreenReader('📥 ') + translate['Inbox'] + menuOutbox = \ + htmlHideFromScreenReader('📤 ') + translate['Outbox'] + menuSearch = \ + htmlHideFromScreenReader('🔍 ') + translate['Search and follow'] + menuCalendar = \ + htmlHideFromScreenReader('📅 ') + calendarStr + menuDM = \ + htmlHideFromScreenReader('✉ ') + dmStr + menuReplies = \ + htmlHideFromScreenReader('↩️') + repliesStr + menuBookmarks = \ + htmlHideFromScreenReader('🔖 ') + translate['Bookmarks'] + menuShares = \ + htmlHideFromScreenReader('🤝️') + sharesStr + menuEvents = \ + htmlHideFromScreenReader('🎫️') + translate['Events'] + menuBlogs = \ + htmlHideFromScreenReader('📝️') + translate['Blogs'] + menuNewswire = \ + htmlHideFromScreenReader('📰️') + translate['Newswire'] + menuLinks = \ + htmlHideFromScreenReader('🔗️') + translate['Links'] + menuNewPost = \ + htmlHideFromScreenReader('➕️') + translate['Create a new post'] navLinks = { - translate['Switch to profile view']: '/users/' + nickname, - translate['Inbox']: usersPath + '/inbox#timeline', - translate['Search and follow']: usersPath + '/search', - translate['Create a new post']: usersPath + '/newpost', - calendarStr: usersPath + '/calendar', - dmStr: usersPath + '/dm#timeline', - repliesStr: usersPath + '/tlreplies#timeline', - translate['Outbox']: usersPath + '/inbox#timeline', - translate['Bookmarks']: usersPath + '/tlbookmarks#timeline', - sharesStr: usersPath + '/tlshares#timeline', - translate['Blogs']: usersPath + '/tlblogs#timeline', - translate['Events']: usersPath + '/tlevents#timeline', - translate['Skip to Newswire']: '#newswire', - translate['Skip to Links']: '#links' + menuProfile: '/users/' + nickname, + menuInbox: usersPath + '/inbox#timeline', + menuSearch: usersPath + '/search', + menuNewPost: usersPath + '/newpost', + menuCalendar: usersPath + '/calendar', + menuDM: usersPath + '/dm#timeline', + menuReplies: usersPath + '/tlreplies#timeline', + menuOutbox: usersPath + '/inbox#timeline', + menuBookmarks: usersPath + '/tlbookmarks#timeline', + menuShares: usersPath + '/tlshares#timeline', + menuBlogs: usersPath + '/tlblogs#timeline', + menuEvents: usersPath + '/tlevents#timeline', + menuNewswire: '#newswire', + menuLinks: '#links' } if moderator: navLinks[translate['Mod']] = usersPath + '/moderation' diff --git a/webapp_utils.py b/webapp_utils.py index 1083eddb7..1bad83836 100644 --- a/webapp_utils.py +++ b/webapp_utils.py @@ -880,6 +880,12 @@ def getAvatarImageUrl(session, return avatarUrl +def htmlHideFromScreenReader(htmlStr: str) -> str: + """Returns html which is hidden from screen readers + """ + return '' + + def htmlKeyboardNavigation(banner: str, links: {}, usersPath=None, translate=None, followApprovals=False) -> str: From 2afe588a6a630cbcfe08e539ab3db12e52af27cc Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Sat, 6 Feb 2021 10:46:03 +0000 Subject: [PATCH 41/79] Move space --- webapp_profile.py | 23 +++++++++++++---------- webapp_timeline.py | 37 ++++++++++++++++++++++--------------- 2 files changed, 35 insertions(+), 25 deletions(-) diff --git a/webapp_profile.py b/webapp_profile.py index b9ea1948b..b4859a6d9 100644 --- a/webapp_profile.py +++ b/webapp_profile.py @@ -714,21 +714,22 @@ def htmlProfile(rssIconAtTop: bool, userPathStr = '/users/' + nickname deft = defaultTimeline menuTimeline = \ - htmlHideFromScreenReader('🏠 ') + translate['Switch to timeline view'] + htmlHideFromScreenReader('🏠') + ' ' + \ + translate['Switch to timeline view'] menuEdit = \ - htmlHideFromScreenReader('✍ ') + translate['Edit'] + htmlHideFromScreenReader('✍') + ' ' + translate['Edit'] menuFollowing = \ - htmlHideFromScreenReader('👥 ') + translate['Following'] + htmlHideFromScreenReader('👥') + ' ' + translate['Following'] menuFollowers = \ - htmlHideFromScreenReader('👪 ') + translate['Followers'] + htmlHideFromScreenReader('👪') + ' ' + translate['Followers'] menuRoles = \ - htmlHideFromScreenReader('🤚 ') + translate['Roles'] + htmlHideFromScreenReader('🤚') + ' ' + translate['Roles'] menuSkills = \ - htmlHideFromScreenReader('🛠️') + translate['Skills'] + htmlHideFromScreenReader('🛠') + ' ' + translate['Skills'] menuShares = \ - htmlHideFromScreenReader('🤝️') + translate['Shares'] + htmlHideFromScreenReader('🤝') + ' ' + translate['Shares'] menuLogout = \ - htmlHideFromScreenReader('❎️') + translate['Logout'] + htmlHideFromScreenReader('❎') + ' ' + translate['Logout'] navLinks = { menuTimeline: userPathStr + '/' + deft, menuEdit: userPathStr + '/editprofile', @@ -1365,9 +1366,11 @@ def htmlEditProfile(cssCache: {}, translate: {}, baseDir: str, path: str, userPathStr = '/users/' + nickname userTimalineStr = '/users/' + nickname + '/' + defaultTimeline menuTimeline = \ - htmlHideFromScreenReader('🏠 ') + translate['Switch to timeline view'] + htmlHideFromScreenReader('🏠') + ' ' + \ + translate['Switch to timeline view'] menuProfile = \ - htmlHideFromScreenReader('👤 ') + translate['Switch to profile view'] + htmlHideFromScreenReader('👤') + ' ' + \ + translate['Switch to profile view'] navLinks = { menuProfile: userPathStr, menuTimeline: userTimalineStr diff --git a/webapp_timeline.py b/webapp_timeline.py index 70f5d3451..ad892a07d 100644 --- a/webapp_timeline.py +++ b/webapp_timeline.py @@ -380,33 +380,40 @@ def htmlTimeline(cssCache: {}, defaultTimeline: str, if newShare: sharesStr = '*' + sharesStr + '*' menuProfile = \ - htmlHideFromScreenReader('👤 ') + translate['Switch to profile view'] + htmlHideFromScreenReader('👤') + ' ' + \ + translate['Switch to profile view'] menuInbox = \ - htmlHideFromScreenReader('📥 ') + translate['Inbox'] + htmlHideFromScreenReader('📥') + ' ' + translate['Inbox'] menuOutbox = \ - htmlHideFromScreenReader('📤 ') + translate['Outbox'] + htmlHideFromScreenReader('📤') + ' ' + translate['Outbox'] menuSearch = \ - htmlHideFromScreenReader('🔍 ') + translate['Search and follow'] + htmlHideFromScreenReader('🔍') + ' ' + \ + translate['Search and follow'] menuCalendar = \ - htmlHideFromScreenReader('📅 ') + calendarStr + htmlHideFromScreenReader('📅') + ' ' + calendarStr menuDM = \ - htmlHideFromScreenReader('✉ ') + dmStr + htmlHideFromScreenReader('✉') + ' ' + dmStr menuReplies = \ - htmlHideFromScreenReader('↩️') + repliesStr + htmlHideFromScreenReader('↩') + ' ' + repliesStr menuBookmarks = \ - htmlHideFromScreenReader('🔖 ') + translate['Bookmarks'] + htmlHideFromScreenReader('🔖') + ' ' + \ + translate['Bookmarks'] menuShares = \ - htmlHideFromScreenReader('🤝️') + sharesStr + htmlHideFromScreenReader('🤝') + ' ' + sharesStr menuEvents = \ - htmlHideFromScreenReader('🎫️') + translate['Events'] + htmlHideFromScreenReader('🎫') + ' ' + translate['Events'] menuBlogs = \ - htmlHideFromScreenReader('📝️') + translate['Blogs'] + htmlHideFromScreenReader('📝') + ' ' + translate['Blogs'] menuNewswire = \ - htmlHideFromScreenReader('📰️') + translate['Newswire'] + htmlHideFromScreenReader('📰') + ' ' + translate['Newswire'] menuLinks = \ - htmlHideFromScreenReader('🔗️') + translate['Links'] + htmlHideFromScreenReader('🔗') + ' ' + translate['Links'] menuNewPost = \ - htmlHideFromScreenReader('➕️') + translate['Create a new post'] + htmlHideFromScreenReader('➕') + ' ' + \ + translate['Create a new post'] + menuModeration = \ + htmlHideFromScreenReader('⚡️') + ' ' + \ + translate['Mod'] navLinks = { menuProfile: '/users/' + nickname, menuInbox: usersPath + '/inbox#timeline', @@ -424,7 +431,7 @@ def htmlTimeline(cssCache: {}, defaultTimeline: str, menuLinks: '#links' } if moderator: - navLinks[translate['Mod']] = usersPath + '/moderation' + navLinks[menuModeration] = usersPath + '/moderation' tlStr += htmlKeyboardNavigation(textModeBanner, navLinks, usersPath, translate, followApprovals) From f00741ec2812477561e2da6ae19543e3394ea8b9 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Sat, 6 Feb 2021 10:51:05 +0000 Subject: [PATCH 42/79] Change emoji --- webapp_timeline.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/webapp_timeline.py b/webapp_timeline.py index ad892a07d..397c3e8dd 100644 --- a/webapp_timeline.py +++ b/webapp_timeline.py @@ -392,9 +392,9 @@ def htmlTimeline(cssCache: {}, defaultTimeline: str, menuCalendar = \ htmlHideFromScreenReader('📅') + ' ' + calendarStr menuDM = \ - htmlHideFromScreenReader('✉') + ' ' + dmStr + htmlHideFromScreenReader('📩') + ' ' + dmStr menuReplies = \ - htmlHideFromScreenReader('↩') + ' ' + repliesStr + htmlHideFromScreenReader('📨') + ' ' + repliesStr menuBookmarks = \ htmlHideFromScreenReader('🔖') + ' ' + \ translate['Bookmarks'] From 7ce33cef20e63139d3ae043e79746c982fbfced0 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Sat, 6 Feb 2021 11:32:14 +0000 Subject: [PATCH 43/79] Semantic emphasis of menu items --- webapp_timeline.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/webapp_timeline.py b/webapp_timeline.py index 397c3e8dd..084918eae 100644 --- a/webapp_timeline.py +++ b/webapp_timeline.py @@ -369,16 +369,16 @@ def htmlTimeline(cssCache: {}, defaultTimeline: str, # keyboard navigation calendarStr = translate['Calendar'] if newCalendarEvent: - calendarStr = '*' + calendarStr + '*' + calendarStr = '' + calendarStr + '' dmStr = translate['DM'] if newDM: - dmStr = '*' + dmStr + '*' + dmStr = '' + dmStr + '' repliesStr = translate['Replies'] if newReply: - repliesStr = '*' + repliesStr + '*' + repliesStr = '' + repliesStr + '' sharesStr = translate['Shares'] if newShare: - sharesStr = '*' + sharesStr + '*' + sharesStr = '' + sharesStr + '' menuProfile = \ htmlHideFromScreenReader('👤') + ' ' + \ translate['Switch to profile view'] From 01920a04ee4b0cbed9e50f958099ffbf661cbde9 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Sat, 6 Feb 2021 11:39:32 +0000 Subject: [PATCH 44/79] Semantic highlight for follow request --- webapp_utils.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/webapp_utils.py b/webapp_utils.py index 1bad83836..f16b11bfb 100644 --- a/webapp_utils.py +++ b/webapp_utils.py @@ -898,10 +898,10 @@ def htmlKeyboardNavigation(banner: str, links: {}, # show new follower approvals if usersPath and translate and followApprovals: - htmlStr += '

    ' # show the list of links for title, url in links.items(): From 787169c74765121881e2cf7a781e0281863908e5 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Sat, 6 Feb 2021 11:56:22 +0000 Subject: [PATCH 45/79] Link to timeline --- webapp_timeline.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/webapp_timeline.py b/webapp_timeline.py index 084918eae..41e249dff 100644 --- a/webapp_timeline.py +++ b/webapp_timeline.py @@ -431,7 +431,7 @@ def htmlTimeline(cssCache: {}, defaultTimeline: str, menuLinks: '#links' } if moderator: - navLinks[menuModeration] = usersPath + '/moderation' + navLinks[menuModeration] = usersPath + '/moderation#timeline' tlStr += htmlKeyboardNavigation(textModeBanner, navLinks, usersPath, translate, followApprovals) From 4cb34487f1239e125b9c8c32644459c36c4681a3 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Sat, 6 Feb 2021 11:59:38 +0000 Subject: [PATCH 46/79] Separate moderation bookmark --- webapp_timeline.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/webapp_timeline.py b/webapp_timeline.py index 41e249dff..855204828 100644 --- a/webapp_timeline.py +++ b/webapp_timeline.py @@ -431,7 +431,7 @@ def htmlTimeline(cssCache: {}, defaultTimeline: str, menuLinks: '#links' } if moderator: - navLinks[menuModeration] = usersPath + '/moderation#timeline' + navLinks[menuModeration] = usersPath + '/moderation#modtimeline' tlStr += htmlKeyboardNavigation(textModeBanner, navLinks, usersPath, translate, followApprovals) @@ -507,7 +507,7 @@ def htmlTimeline(cssCache: {}, defaultTimeline: str, # second row of buttons for moderator actions if moderator and boxName == 'moderation': tlStr += \ - '' tlStr += '
    \n' idx = 'Nickname or URL. Block using *@domain or nickname@domain' From 2f63f5f19b20eaffcafedbb7b751ecddd1b2f0b7 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Sat, 6 Feb 2021 12:06:40 +0000 Subject: [PATCH 47/79] Change bookmark location --- webapp_timeline.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/webapp_timeline.py b/webapp_timeline.py index 855204828..b9ecf88c8 100644 --- a/webapp_timeline.py +++ b/webapp_timeline.py @@ -502,7 +502,7 @@ def htmlTimeline(cssCache: {}, defaultTimeline: str, calendarImage, followApprovals, iconsAsButtons) - tlStr += '
    \n' + tlStr += '
    \n' # second row of buttons for moderator actions if moderator and boxName == 'moderation': @@ -585,8 +585,6 @@ def htmlTimeline(cssCache: {}, defaultTimeline: str, translate['Page up'] + '">\n' + \ ' \n' - tlStr += '
    \n' - # show the posts itemCtr = 0 if timelineJson: From 69f14261c8edb347e8f3e0b281ca22438e5a4db4 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Sat, 6 Feb 2021 12:08:06 +0000 Subject: [PATCH 48/79] Remove main --- webapp_timeline.py | 1 - 1 file changed, 1 deletion(-) diff --git a/webapp_timeline.py b/webapp_timeline.py index b9ecf88c8..7f0333627 100644 --- a/webapp_timeline.py +++ b/webapp_timeline.py @@ -687,7 +687,6 @@ def htmlTimeline(cssCache: {}, defaultTimeline: str, rssIconAtTop, publishButtonAtTop, authorized, True, theme, defaultTimeline) - tlStr += '
    \n' tlStr += ' ' + \ rightColumnStr + ' \n' From d2633867a3552c43443349d9190d47ef794d9eee Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Sat, 6 Feb 2021 12:16:55 +0000 Subject: [PATCH 49/79] Remove unused markup if there are no timeline items --- webapp_timeline.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/webapp_timeline.py b/webapp_timeline.py index 7f0333627..8765d6005 100644 --- a/webapp_timeline.py +++ b/webapp_timeline.py @@ -671,11 +671,12 @@ def htmlTimeline(cssCache: {}, defaultTimeline: str, translate['Page down'] + '">\n' + \ ' \n' - # end of timeline-posts - tlStr += '
    \n' + if itemCtr > 0: + # end of timeline-posts + tlStr += '
    \n' - # end of column-center - tlStr += ' \n' + # end of column-center + tlStr += ' \n' # right column rightColumnStr = getRightColumnContent(baseDir, nickname, domainFull, From 9496db2bf32b5778eb1443dda645f7b61e485379 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Sat, 6 Feb 2021 12:30:58 +0000 Subject: [PATCH 50/79] Separators for shell browser --- webapp_timeline.py | 45 +++++++++++++++++++++++++++++++-------------- 1 file changed, 31 insertions(+), 14 deletions(-) diff --git a/webapp_timeline.py b/webapp_timeline.py index 8765d6005..82a42c4b5 100644 --- a/webapp_timeline.py +++ b/webapp_timeline.py @@ -524,40 +524,57 @@ def htmlTimeline(cssCache: {}, defaultTimeline: str, tlStr += \ ' \n' + '" alt="' + \ + translate['Information about current blocks/suspensions'] + \ + ' | " ' + \ + 'name="submitInfo" value="' + translate['Info'] + '">\n' tlStr += \ ' \n' tlStr += \ ' \n' + translate['Suspend the above account nickname'] + '" ' + \ + 'alt="' + \ + translate['Suspend the above account nickname'] + ' | " ' + \ + 'name="submitSuspend" value="' + translate['Suspend'] + '">\n' tlStr += \ ' \n' tlStr += \ ' \n' + translate['Block an account on another instance'] + '" ' + \ + 'alt="' + \ + translate['Block an account on another instance'] + ' | " ' + \ + 'name="submitBlock" value="' + translate['Block'] + '">\n' tlStr += \ ' \n' + translate['Unblock an account on another instance'] + '" ' + \ + 'alt="' + \ + translate['Unblock an account on another instance'] + ' | " ' + \ + 'name="submitUnblock" value="' + translate['Unblock'] + '">\n' tlStr += \ ' \n' + translate['Filter out words'] + '" ' + \ + 'alt="' + \ + translate['Filter out words'] + ' | " ' + \ + 'name="submitFilter" value="' + translate['Filter'] + '">\n' tlStr += \ ' \n' + translate['Unfilter words'] + '" ' + \ + 'alt="' + \ + translate['Unfilter words'] + ' | " ' + \ + 'name="submitUnfilter" value="' + translate['Unfilter'] + '">\n' tlStr += '
    \n\n' From a3f5b3345d1747fe2336f14cf8ccc9715ea53cf2 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Sat, 6 Feb 2021 12:52:14 +0000 Subject: [PATCH 51/79] Tidying --- webapp_timeline.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/webapp_timeline.py b/webapp_timeline.py index 82a42c4b5..de89d9b4a 100644 --- a/webapp_timeline.py +++ b/webapp_timeline.py @@ -688,12 +688,11 @@ def htmlTimeline(cssCache: {}, defaultTimeline: str, translate['Page down'] + '">\n' + \ ' \n' - if itemCtr > 0: - # end of timeline-posts - tlStr += '
\n' + # end of timeline-posts + tlStr += ' \n' - # end of column-center - tlStr += ' \n' + # end of column-center + tlStr += ' \n' # right column rightColumnStr = getRightColumnContent(baseDir, nickname, domainFull, From f4ba16484b1975fc1406e735b2ee8fa9b0bae77c Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Sat, 6 Feb 2021 12:58:05 +0000 Subject: [PATCH 52/79] Spaces --- webapp_timeline.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/webapp_timeline.py b/webapp_timeline.py index de89d9b4a..457753c79 100644 --- a/webapp_timeline.py +++ b/webapp_timeline.py @@ -530,7 +530,7 @@ def htmlTimeline(cssCache: {}, defaultTimeline: str, 'name="submitInfo" value="' + translate['Info'] + '">\n' tlStr += \ ' \n' @@ -543,7 +543,7 @@ def htmlTimeline(cssCache: {}, defaultTimeline: str, 'name="submitSuspend" value="' + translate['Suspend'] + '">\n' tlStr += \ ' Date: Sat, 6 Feb 2021 14:30:18 +0000 Subject: [PATCH 53/79] Text mode logo on login screen --- img/logo.txt | 8 ++++++++ theme.py | 14 ++++++++++++++ webapp_login.py | 6 ++++++ 3 files changed, 28 insertions(+) create mode 100644 img/logo.txt diff --git a/img/logo.txt b/img/logo.txt new file mode 100644 index 000000000..5589f25f8 --- /dev/null +++ b/img/logo.txt @@ -0,0 +1,8 @@ + 8888888888 8888888b. 8888888 .d8888b. Y88b d88P .d88888b. 888b 888 + 888 888 Y88b 888 d88P Y88b Y88b d88P d88P" "Y88b 8888b 888 + 888 888 888 888 888 888 Y88o88P 888 888 88888b 888 + 8888888 888 d88P 888 888 Y888P 888 888 888Y88b 888 + 888 8888888P" 888 888 888 888 888 888 Y88b888 + 888 888 888 888 888 888 888 888 888 Y88888 + 888 888 888 Y88b d88P 888 Y88b. .d88P 888 Y8888 + 8888888888 888 8888888 "Y8888P" 888 "Y88888P" 888 Y888 diff --git a/theme.py b/theme.py index 031a68de7..bf129a186 100644 --- a/theme.py +++ b/theme.py @@ -434,6 +434,20 @@ def getTextModeBanner(baseDir: str) -> str: return None +def getTextModeLogo(baseDir: str) -> str: + """Returns the login screen logo used for shell browsers, like Lynx + """ + textModeLogoFilename = baseDir + '/accounts/logo.txt' + if not os.path.isfile(textModeLogoFilename): + textModeLogoFilename = baseDir + '/img/logo.txt' + + with open(textModeLogoFilename, 'r') as fp: + logoStr = fp.read() + if logoStr: + return logoStr.replace('\n', '
') + return None + + def _setThemeImages(baseDir: str, name: str) -> None: """Changes the profile background image and banner to the defaults diff --git a/webapp_login.py b/webapp_login.py index 5e4188be8..115a3aecb 100644 --- a/webapp_login.py +++ b/webapp_login.py @@ -13,6 +13,8 @@ from utils import getConfigParam from utils import noOfAccounts from webapp_utils import htmlHeaderWithExternalStyle from webapp_utils import htmlFooter +from webapp_utils import htmlKeyboardNavigation +from theme import getTextModeLogo def htmlGetLoginCredentials(loginParams: str, @@ -75,6 +77,9 @@ def htmlLogin(cssCache: {}, translate: {}, loginImageFilename = baseDir + '/accounts/' + loginImage copyfile(baseDir + '/img/login.png', loginImageFilename) + textModeLogo = getTextModeLogo(baseDir) + textModeLogoHtml = htmlKeyboardNavigation(textModeLogo, {}) + if os.path.isfile(baseDir + '/accounts/login-background-custom.jpg'): if not os.path.isfile(baseDir + '/accounts/login-background.jpg'): copyfile(baseDir + '/accounts/login-background-custom.jpg', @@ -141,6 +146,7 @@ def htmlLogin(cssCache: {}, translate: {}, instanceTitle = getConfigParam(baseDir, 'instanceTitle') if not instanceTitle: instanceTitle = "Epicyon" + loginForm += textModeLogoHtml + '\n' loginForm += \ ' ' + instanceTitle + '\n' From 0376bda084e9fe6419ad315e3c528c8c315b8335 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Sat, 6 Feb 2021 14:36:29 +0000 Subject: [PATCH 54/79] Reduce indentation --- img/logo.txt | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/img/logo.txt b/img/logo.txt index 5589f25f8..388fef656 100644 --- a/img/logo.txt +++ b/img/logo.txt @@ -1,8 +1,8 @@ - 8888888888 8888888b. 8888888 .d8888b. Y88b d88P .d88888b. 888b 888 - 888 888 Y88b 888 d88P Y88b Y88b d88P d88P" "Y88b 8888b 888 - 888 888 888 888 888 888 Y88o88P 888 888 88888b 888 - 8888888 888 d88P 888 888 Y888P 888 888 888Y88b 888 - 888 8888888P" 888 888 888 888 888 888 Y88b888 - 888 888 888 888 888 888 888 888 888 Y88888 - 888 888 888 Y88b d88P 888 Y88b. .d88P 888 Y8888 - 8888888888 888 8888888 "Y8888P" 888 "Y88888P" 888 Y888 + 8888888888 8888888b. 8888888 .d8888b. Y88b d88P .d88888b. 888b 888 + 888 888 Y88b 888 d88P Y88b Y88b d88P d88P" "Y88b 8888b 888 + 888 888 888 888 888 888 Y88o88P 888 888 88888b 888 + 8888888 888 d88P 888 888 Y888P 888 888 888Y88b 888 + 888 8888888P" 888 888 888 888 888 888 Y88b888 + 888 888 888 888 888 888 888 888 888 Y88888 + 888 888 888 Y88b d88P 888 Y88b. .d88P 888 Y8888 + 8888888888 888 8888888 "Y8888P" 888 "Y88888P" 888 Y888 From db6d0d0ba2fab27b0461de59c97bbdc8795b8e04 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Sat, 6 Feb 2021 14:37:10 +0000 Subject: [PATCH 55/79] No default instance title --- webapp_login.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/webapp_login.py b/webapp_login.py index 115a3aecb..b0e893d08 100644 --- a/webapp_login.py +++ b/webapp_login.py @@ -144,8 +144,6 @@ def htmlLogin(cssCache: {}, translate: {}, loginForm += '
\n' loginForm += '
\n' instanceTitle = getConfigParam(baseDir, 'instanceTitle') - if not instanceTitle: - instanceTitle = "Epicyon" loginForm += textModeLogoHtml + '\n' loginForm += \ ' Date: Sat, 6 Feb 2021 21:05:09 +0000 Subject: [PATCH 59/79] Filter for obviously hostile domains --- utils.py | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/utils.py b/utils.py index 3e7c8c4ec..f024a2b98 100644 --- a/utils.py +++ b/utils.py @@ -494,10 +494,20 @@ def evilIncarnate() -> []: def isEvil(domain: str) -> bool: + # https://www.youtube.com/watch?v=5qw1hcevmdU if not isinstance(domain, str): print('WARN: Malformed domain ' + str(domain)) return True - # https://www.youtube.com/watch?v=5qw1hcevmdU + # if a domain contains any of these strings then it is + # declaring itself to be hostile + evilEmporium = ( + 'nazi', 'extremis', 'extreemis', 'gendercritic', + 'kiwifarm', 'illegal', 'raplst', 'rapist', + 'antivax', 'plandemic' + ) + for hostileStr in evilEmporium: + if hostileStr in domain: + return True evilDomains = evilIncarnate() for concentratedEvil in evilDomains: if domain.endswith(concentratedEvil): From 0fdb1dc2621a0e294a52e1b27687685104211b5e Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Sun, 7 Feb 2021 11:15:59 +0000 Subject: [PATCH 60/79] Themed text mode banners --- theme/blue/logo.txt | 8 ++++++++ theme/default/logo.txt | 8 ++++++++ theme/hacker/logo.txt | 8 ++++++++ theme/henge/banner.txt | 15 +++++++-------- theme/henge/logo.txt | 7 +++++++ theme/indymediaclassic/banner.txt | 14 ++++++++------ theme/indymediaclassic/logo.txt | 8 ++++++++ theme/indymediamodern/banner.txt | 14 ++++++++------ theme/indymediamodern/logo.txt | 8 ++++++++ theme/lcd/banner.txt | 14 ++++++-------- theme/lcd/logo.txt | 6 ++++++ theme/light/banner.txt | 14 ++++++-------- theme/light/logo.txt | 6 ++++++ theme/night/banner.txt | 22 ++++++++++++++-------- theme/night/logo.txt | 14 ++++++++++++++ theme/purple/banner.txt | 16 ++++++++-------- theme/purple/logo.txt | 8 ++++++++ theme/rc3/logo.txt | 8 ++++++++ theme/solidaric/logo.txt | 8 ++++++++ theme/starlight/banner.txt | 14 ++++++-------- theme/starlight/logo.txt | 6 ++++++ theme/zen/banner.txt | 14 ++++++-------- theme/zen/logo.txt | 6 ++++++ 23 files changed, 178 insertions(+), 68 deletions(-) create mode 100644 theme/blue/logo.txt create mode 100644 theme/default/logo.txt create mode 100644 theme/hacker/logo.txt create mode 100644 theme/henge/logo.txt create mode 100644 theme/indymediaclassic/logo.txt create mode 100644 theme/indymediamodern/logo.txt create mode 100644 theme/lcd/logo.txt create mode 100644 theme/light/logo.txt create mode 100644 theme/night/logo.txt create mode 100644 theme/purple/logo.txt create mode 100644 theme/rc3/logo.txt create mode 100644 theme/solidaric/logo.txt create mode 100644 theme/starlight/logo.txt create mode 100644 theme/zen/logo.txt diff --git a/theme/blue/logo.txt b/theme/blue/logo.txt new file mode 100644 index 000000000..388fef656 --- /dev/null +++ b/theme/blue/logo.txt @@ -0,0 +1,8 @@ + 8888888888 8888888b. 8888888 .d8888b. Y88b d88P .d88888b. 888b 888 + 888 888 Y88b 888 d88P Y88b Y88b d88P d88P" "Y88b 8888b 888 + 888 888 888 888 888 888 Y88o88P 888 888 88888b 888 + 8888888 888 d88P 888 888 Y888P 888 888 888Y88b 888 + 888 8888888P" 888 888 888 888 888 888 Y88b888 + 888 888 888 888 888 888 888 888 888 Y88888 + 888 888 888 Y88b d88P 888 Y88b. .d88P 888 Y8888 + 8888888888 888 8888888 "Y8888P" 888 "Y88888P" 888 Y888 diff --git a/theme/default/logo.txt b/theme/default/logo.txt new file mode 100644 index 000000000..388fef656 --- /dev/null +++ b/theme/default/logo.txt @@ -0,0 +1,8 @@ + 8888888888 8888888b. 8888888 .d8888b. Y88b d88P .d88888b. 888b 888 + 888 888 Y88b 888 d88P Y88b Y88b d88P d88P" "Y88b 8888b 888 + 888 888 888 888 888 888 Y88o88P 888 888 88888b 888 + 8888888 888 d88P 888 888 Y888P 888 888 888Y88b 888 + 888 8888888P" 888 888 888 888 888 888 Y88b888 + 888 888 888 888 888 888 888 888 888 Y88888 + 888 888 888 Y88b d88P 888 Y88b. .d88P 888 Y8888 + 8888888888 888 8888888 "Y8888P" 888 "Y88888P" 888 Y888 diff --git a/theme/hacker/logo.txt b/theme/hacker/logo.txt new file mode 100644 index 000000000..388fef656 --- /dev/null +++ b/theme/hacker/logo.txt @@ -0,0 +1,8 @@ + 8888888888 8888888b. 8888888 .d8888b. Y88b d88P .d88888b. 888b 888 + 888 888 Y88b 888 d88P Y88b Y88b d88P d88P" "Y88b 8888b 888 + 888 888 888 888 888 888 Y88o88P 888 888 88888b 888 + 8888888 888 d88P 888 888 Y888P 888 888 888Y88b 888 + 888 8888888P" 888 888 888 888 888 888 Y88b888 + 888 888 888 888 888 888 888 888 888 Y88888 + 888 888 888 Y88b d88P 888 Y88b. .d88P 888 Y8888 + 8888888888 888 8888888 "Y8888P" 888 "Y88888P" 888 Y888 diff --git a/theme/henge/banner.txt b/theme/henge/banner.txt index ffe9419c0..93c88b2f1 100644 --- a/theme/henge/banner.txt +++ b/theme/henge/banner.txt @@ -1,8 +1,7 @@ - __ - , ," e`--o - (( ( | __,' - \\~-------' \_;/ - ( / - /) .______. ) - (( ( (( ( - ``-' ``-' + ____ _________ __ _____ ___ ____ + / _]| \ | / ]| | | / \ | \ + | [_ | o ) | / / | | || || _ | + | _]| _/| |/ / | ~ || O || | | + | [_ | | | / \_ |___, || || | | + | || | | \ || || || | | + |_____||__| |____\____||____/ \___/ |__|__| diff --git a/theme/henge/logo.txt b/theme/henge/logo.txt new file mode 100644 index 000000000..93c88b2f1 --- /dev/null +++ b/theme/henge/logo.txt @@ -0,0 +1,7 @@ + ____ _________ __ _____ ___ ____ + / _]| \ | / ]| | | / \ | \ + | [_ | o ) | / / | | || || _ | + | _]| _/| |/ / | ~ || O || | | + | [_ | | | / \_ |___, || || | | + | || | | \ || || || | | + |_____||__| |____\____||____/ \___/ |__|__| diff --git a/theme/indymediaclassic/banner.txt b/theme/indymediaclassic/banner.txt index 9efbf6fae..8eb08d587 100644 --- a/theme/indymediaclassic/banner.txt +++ b/theme/indymediaclassic/banner.txt @@ -1,6 +1,8 @@ - ______ ______ - _/ Y \_ - // ~~ ~~ | ~~ ~ \\ - // ~ ~ ~~ | ~~~ ~~ \\ - //________.|.________\\ - `----------`-'----------' + / \ + | / ,--. \ | + \ \ `--' / / + ,------.,------. ,--. ,-----.,--. ,--.,-----. ,--. ,--. + | .---'| .--. '| |' .--./ \ `.' /' .-. '| ,'.| | + | `--, | '--' || || | '. / | | | || |' ' | + | `---.| | --' | |' '--'\ | | ' '-' '| | ` | + `------'`--' `--' `-----' `--' `-----' `--' `--' diff --git a/theme/indymediaclassic/logo.txt b/theme/indymediaclassic/logo.txt new file mode 100644 index 000000000..8eb08d587 --- /dev/null +++ b/theme/indymediaclassic/logo.txt @@ -0,0 +1,8 @@ + / \ + | / ,--. \ | + \ \ `--' / / + ,------.,------. ,--. ,-----.,--. ,--.,-----. ,--. ,--. + | .---'| .--. '| |' .--./ \ `.' /' .-. '| ,'.| | + | `--, | '--' || || | '. / | | | || |' ' | + | `---.| | --' | |' '--'\ | | ' '-' '| | ` | + `------'`--' `--' `-----' `--' `-----' `--' `--' diff --git a/theme/indymediamodern/banner.txt b/theme/indymediamodern/banner.txt index 9efbf6fae..8eb08d587 100644 --- a/theme/indymediamodern/banner.txt +++ b/theme/indymediamodern/banner.txt @@ -1,6 +1,8 @@ - ______ ______ - _/ Y \_ - // ~~ ~~ | ~~ ~ \\ - // ~ ~ ~~ | ~~~ ~~ \\ - //________.|.________\\ - `----------`-'----------' + / \ + | / ,--. \ | + \ \ `--' / / + ,------.,------. ,--. ,-----.,--. ,--.,-----. ,--. ,--. + | .---'| .--. '| |' .--./ \ `.' /' .-. '| ,'.| | + | `--, | '--' || || | '. / | | | || |' ' | + | `---.| | --' | |' '--'\ | | ' '-' '| | ` | + `------'`--' `--' `-----' `--' `-----' `--' `--' diff --git a/theme/indymediamodern/logo.txt b/theme/indymediamodern/logo.txt new file mode 100644 index 000000000..8eb08d587 --- /dev/null +++ b/theme/indymediamodern/logo.txt @@ -0,0 +1,8 @@ + / \ + | / ,--. \ | + \ \ `--' / / + ,------.,------. ,--. ,-----.,--. ,--.,-----. ,--. ,--. + | .---'| .--. '| |' .--./ \ `.' /' .-. '| ,'.| | + | `--, | '--' || || | '. / | | | || |' ' | + | `---.| | --' | |' '--'\ | | ' '-' '| | ` | + `------'`--' `--' `-----' `--' `-----' `--' `--' diff --git a/theme/lcd/banner.txt b/theme/lcd/banner.txt index ffe9419c0..ab13c6635 100644 --- a/theme/lcd/banner.txt +++ b/theme/lcd/banner.txt @@ -1,8 +1,6 @@ - __ - , ," e`--o - (( ( | __,' - \\~-------' \_;/ - ( / - /) .______. ) - (( ( (( ( - ``-' ``-' + _______ ______ _____ ______ _ _ _____ ______ + (_______|_____ (_____) _____) | | |/ ___ \| ___ \ + _____ _____) ) _ | / | |___| | | | | | | | + | ___) | ____/ | || | \_____/| | | | | | | + | |_____| | _| || \_____ ___ | |___| | | | | + |_______)_| (_____)______) (___) \_____/|_| |_| diff --git a/theme/lcd/logo.txt b/theme/lcd/logo.txt new file mode 100644 index 000000000..ab13c6635 --- /dev/null +++ b/theme/lcd/logo.txt @@ -0,0 +1,6 @@ + _______ ______ _____ ______ _ _ _____ ______ + (_______|_____ (_____) _____) | | |/ ___ \| ___ \ + _____ _____) ) _ | / | |___| | | | | | | | + | ___) | ____/ | || | \_____/| | | | | | | + | |_____| | _| || \_____ ___ | |___| | | | | + |_______)_| (_____)______) (___) \_____/|_| |_| diff --git a/theme/light/banner.txt b/theme/light/banner.txt index ffe9419c0..30208cbb8 100644 --- a/theme/light/banner.txt +++ b/theme/light/banner.txt @@ -1,8 +1,6 @@ - __ - , ," e`--o - (( ( | __,' - \\~-------' \_;/ - ( / - /) .______. ) - (( ( (( ( - ``-' ``-' + 88888888b 888888ba dP a88888b. dP dP .88888. 888888ba + 88 88 `8b 88 d8' `88 Y8. .8P d8' `8b 88 `8b + a88aaaa a88aaaa8P' 88 88 Y8aa8P 88 88 88 88 + 88 88 88 88 88 88 88 88 88 + 88 88 88 Y8. .88 88 Y8. .8P 88 88 + 88888888P dP dP Y88888P' dP `8888P' dP dP diff --git a/theme/light/logo.txt b/theme/light/logo.txt new file mode 100644 index 000000000..30208cbb8 --- /dev/null +++ b/theme/light/logo.txt @@ -0,0 +1,6 @@ + 88888888b 888888ba dP a88888b. dP dP .88888. 888888ba + 88 88 `8b 88 d8' `88 Y8. .8P d8' `8b 88 `8b + a88aaaa a88aaaa8P' 88 88 Y8aa8P 88 88 88 88 + 88 88 88 88 88 88 88 88 88 + 88 88 88 Y8. .88 88 Y8. .8P 88 88 + 88888888P dP dP Y88888P' dP `8888P' dP dP diff --git a/theme/night/banner.txt b/theme/night/banner.txt index ffe9419c0..1f8a0d9cb 100644 --- a/theme/night/banner.txt +++ b/theme/night/banner.txt @@ -1,8 +1,14 @@ - __ - , ," e`--o - (( ( | __,' - \\~-------' \_;/ - ( / - /) .______. ) - (( ( (( ( - ``-' ``-' + ( ( + ) ) + ___ ___ ___ _____ _____ _ _ ........ + | __| _ \_ _/ __\ \ / / _ \| \| | | |] + | _|| _/| | (__ \ V / (_) | .` | \ / + |___|_| |___\___| |_| \___/|_|\_| \____/ + + + + + + + + diff --git a/theme/night/logo.txt b/theme/night/logo.txt new file mode 100644 index 000000000..1f8a0d9cb --- /dev/null +++ b/theme/night/logo.txt @@ -0,0 +1,14 @@ + ( ( + ) ) + ___ ___ ___ _____ _____ _ _ ........ + | __| _ \_ _/ __\ \ / / _ \| \| | | |] + | _|| _/| | (__ \ V / (_) | .` | \ / + |___|_| |___\___| |_| \___/|_|\_| \____/ + + + + + + + + diff --git a/theme/purple/banner.txt b/theme/purple/banner.txt index ffe9419c0..7d86e2745 100644 --- a/theme/purple/banner.txt +++ b/theme/purple/banner.txt @@ -1,8 +1,8 @@ - __ - , ," e`--o - (( ( | __,' - \\~-------' \_;/ - ( / - /) .______. ) - (( ( (( ( - ``-' ``-' + 888888888b 888888ba dP a88888b. dP dP .88888. 888888ba + 88 88 `8b 88 d8' `88 Y8. .8P d8' `8b 88 `8b + a88aaaa a88aaaa8P' 88 88 Y8aa8P 88 88 88 88 + 88 88 88 88 88 88 88 88 88 + 88 88 88 Y8. .88 88 Y8. .8P 88 88 + 88888888P' dP dP Y88888P' 88 `8888P' dP dP + 88 + dP diff --git a/theme/purple/logo.txt b/theme/purple/logo.txt new file mode 100644 index 000000000..7d86e2745 --- /dev/null +++ b/theme/purple/logo.txt @@ -0,0 +1,8 @@ + 888888888b 888888ba dP a88888b. dP dP .88888. 888888ba + 88 88 `8b 88 d8' `88 Y8. .8P d8' `8b 88 `8b + a88aaaa a88aaaa8P' 88 88 Y8aa8P 88 88 88 88 + 88 88 88 88 88 88 88 88 88 + 88 88 88 Y8. .88 88 Y8. .8P 88 88 + 88888888P' dP dP Y88888P' 88 `8888P' dP dP + 88 + dP diff --git a/theme/rc3/logo.txt b/theme/rc3/logo.txt new file mode 100644 index 000000000..388fef656 --- /dev/null +++ b/theme/rc3/logo.txt @@ -0,0 +1,8 @@ + 8888888888 8888888b. 8888888 .d8888b. Y88b d88P .d88888b. 888b 888 + 888 888 Y88b 888 d88P Y88b Y88b d88P d88P" "Y88b 8888b 888 + 888 888 888 888 888 888 Y88o88P 888 888 88888b 888 + 8888888 888 d88P 888 888 Y888P 888 888 888Y88b 888 + 888 8888888P" 888 888 888 888 888 888 Y88b888 + 888 888 888 888 888 888 888 888 888 Y88888 + 888 888 888 Y88b d88P 888 Y88b. .d88P 888 Y8888 + 8888888888 888 8888888 "Y8888P" 888 "Y88888P" 888 Y888 diff --git a/theme/solidaric/logo.txt b/theme/solidaric/logo.txt new file mode 100644 index 000000000..388fef656 --- /dev/null +++ b/theme/solidaric/logo.txt @@ -0,0 +1,8 @@ + 8888888888 8888888b. 8888888 .d8888b. Y88b d88P .d88888b. 888b 888 + 888 888 Y88b 888 d88P Y88b Y88b d88P d88P" "Y88b 8888b 888 + 888 888 888 888 888 888 Y88o88P 888 888 88888b 888 + 8888888 888 d88P 888 888 Y888P 888 888 888Y88b 888 + 888 8888888P" 888 888 888 888 888 888 Y88b888 + 888 888 888 888 888 888 888 888 888 Y88888 + 888 888 888 Y88b d88P 888 Y88b. .d88P 888 Y8888 + 8888888888 888 8888888 "Y8888P" 888 "Y88888P" 888 Y888 diff --git a/theme/starlight/banner.txt b/theme/starlight/banner.txt index ffe9419c0..ab13c6635 100644 --- a/theme/starlight/banner.txt +++ b/theme/starlight/banner.txt @@ -1,8 +1,6 @@ - __ - , ," e`--o - (( ( | __,' - \\~-------' \_;/ - ( / - /) .______. ) - (( ( (( ( - ``-' ``-' + _______ ______ _____ ______ _ _ _____ ______ + (_______|_____ (_____) _____) | | |/ ___ \| ___ \ + _____ _____) ) _ | / | |___| | | | | | | | + | ___) | ____/ | || | \_____/| | | | | | | + | |_____| | _| || \_____ ___ | |___| | | | | + |_______)_| (_____)______) (___) \_____/|_| |_| diff --git a/theme/starlight/logo.txt b/theme/starlight/logo.txt new file mode 100644 index 000000000..ab13c6635 --- /dev/null +++ b/theme/starlight/logo.txt @@ -0,0 +1,6 @@ + _______ ______ _____ ______ _ _ _____ ______ + (_______|_____ (_____) _____) | | |/ ___ \| ___ \ + _____ _____) ) _ | / | |___| | | | | | | | + | ___) | ____/ | || | \_____/| | | | | | | + | |_____| | _| || \_____ ___ | |___| | | | | + |_______)_| (_____)______) (___) \_____/|_| |_| diff --git a/theme/zen/banner.txt b/theme/zen/banner.txt index ffe9419c0..79de0204a 100644 --- a/theme/zen/banner.txt +++ b/theme/zen/banner.txt @@ -1,8 +1,6 @@ - __ - , ," e`--o - (( ( | __,' - \\~-------' \_;/ - ( / - /) .______. ) - (( ( (( ( - ``-' ``-' + + _______ _____ _____ _______ __ __ _____ __ _ _=_ + | | | | | \ / | | |\ | q(-_-)p + |______ |_____| | | \_/ | | | \ | ,\___/\ + | | | | | | | | \ | ( _ _ ) + |______ | __|__ |_____ | |_____| | \| (_\_\_|_/_) diff --git a/theme/zen/logo.txt b/theme/zen/logo.txt new file mode 100644 index 000000000..79de0204a --- /dev/null +++ b/theme/zen/logo.txt @@ -0,0 +1,6 @@ + + _______ _____ _____ _______ __ __ _____ __ _ _=_ + | | | | | \ / | | |\ | q(-_-)p + |______ |_____| | | \_/ | | | \ | ,\___/\ + | | | | | | | | \ | ( _ _ ) + |______ | __|__ |_____ | |_____| | \| (_\_\_|_/_) From 8673cbe31548b2db8356e0e6f928dc87dca09d15 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Sun, 7 Feb 2021 11:27:36 +0000 Subject: [PATCH 61/79] Text mode banners --- theme/blue/banner.txt | 18 ++++++++++-------- theme/blue/logo.txt | 18 ++++++++++-------- theme/hacker/banner.txt | 18 ++++++++++-------- theme/hacker/logo.txt | 18 ++++++++++-------- theme/solidaric/banner.txt | 17 +++++++++-------- theme/solidaric/logo.txt | 17 +++++++++-------- 6 files changed, 58 insertions(+), 48 deletions(-) diff --git a/theme/blue/banner.txt b/theme/blue/banner.txt index ffe9419c0..db5cf9014 100644 --- a/theme/blue/banner.txt +++ b/theme/blue/banner.txt @@ -1,8 +1,10 @@ - __ - , ," e`--o - (( ( | __,' - \\~-------' \_;/ - ( / - /) .______. ) - (( ( (( ( - ``-' ``-' + 88888888888 88 + 88 "" + 88 + 88aaaaa 8b,dPPYba, 88 ,adPPYba, 8b d8 ,adPPYba, 8b,dPPYba, + 88""""" 88P' "8a 88 a8" "" `8b d8' a8" "8a 88P' `"8a + 88 88 d8 88 8b `8b d8' 8b d8 88 88 + 88 88b, ,a8" 88 "8a, ,aa `8b,d8' "8a, ,a8" 88 88 + 88888888888 88`YbbdP"' 88 `"Ybbd8"' Y88' `"YbbdP"' 88 88 + 88 d8' + 88 d8' diff --git a/theme/blue/logo.txt b/theme/blue/logo.txt index 388fef656..db5cf9014 100644 --- a/theme/blue/logo.txt +++ b/theme/blue/logo.txt @@ -1,8 +1,10 @@ - 8888888888 8888888b. 8888888 .d8888b. Y88b d88P .d88888b. 888b 888 - 888 888 Y88b 888 d88P Y88b Y88b d88P d88P" "Y88b 8888b 888 - 888 888 888 888 888 888 Y88o88P 888 888 88888b 888 - 8888888 888 d88P 888 888 Y888P 888 888 888Y88b 888 - 888 8888888P" 888 888 888 888 888 888 Y88b888 - 888 888 888 888 888 888 888 888 888 Y88888 - 888 888 888 Y88b d88P 888 Y88b. .d88P 888 Y8888 - 8888888888 888 8888888 "Y8888P" 888 "Y88888P" 888 Y888 + 88888888888 88 + 88 "" + 88 + 88aaaaa 8b,dPPYba, 88 ,adPPYba, 8b d8 ,adPPYba, 8b,dPPYba, + 88""""" 88P' "8a 88 a8" "" `8b d8' a8" "8a 88P' `"8a + 88 88 d8 88 8b `8b d8' 8b d8 88 88 + 88 88b, ,a8" 88 "8a, ,aa `8b,d8' "8a, ,a8" 88 88 + 88888888888 88`YbbdP"' 88 `"Ybbd8"' Y88' `"YbbdP"' 88 88 + 88 d8' + 88 d8' diff --git a/theme/hacker/banner.txt b/theme/hacker/banner.txt index ffe9419c0..db5cf9014 100644 --- a/theme/hacker/banner.txt +++ b/theme/hacker/banner.txt @@ -1,8 +1,10 @@ - __ - , ," e`--o - (( ( | __,' - \\~-------' \_;/ - ( / - /) .______. ) - (( ( (( ( - ``-' ``-' + 88888888888 88 + 88 "" + 88 + 88aaaaa 8b,dPPYba, 88 ,adPPYba, 8b d8 ,adPPYba, 8b,dPPYba, + 88""""" 88P' "8a 88 a8" "" `8b d8' a8" "8a 88P' `"8a + 88 88 d8 88 8b `8b d8' 8b d8 88 88 + 88 88b, ,a8" 88 "8a, ,aa `8b,d8' "8a, ,a8" 88 88 + 88888888888 88`YbbdP"' 88 `"Ybbd8"' Y88' `"YbbdP"' 88 88 + 88 d8' + 88 d8' diff --git a/theme/hacker/logo.txt b/theme/hacker/logo.txt index 388fef656..db5cf9014 100644 --- a/theme/hacker/logo.txt +++ b/theme/hacker/logo.txt @@ -1,8 +1,10 @@ - 8888888888 8888888b. 8888888 .d8888b. Y88b d88P .d88888b. 888b 888 - 888 888 Y88b 888 d88P Y88b Y88b d88P d88P" "Y88b 8888b 888 - 888 888 888 888 888 888 Y88o88P 888 888 88888b 888 - 8888888 888 d88P 888 888 Y888P 888 888 888Y88b 888 - 888 8888888P" 888 888 888 888 888 888 Y88b888 - 888 888 888 888 888 888 888 888 888 Y88888 - 888 888 888 Y88b d88P 888 Y88b. .d88P 888 Y8888 - 8888888888 888 8888888 "Y8888P" 888 "Y88888P" 888 Y888 + 88888888888 88 + 88 "" + 88 + 88aaaaa 8b,dPPYba, 88 ,adPPYba, 8b d8 ,adPPYba, 8b,dPPYba, + 88""""" 88P' "8a 88 a8" "" `8b d8' a8" "8a 88P' `"8a + 88 88 d8 88 8b `8b d8' 8b d8 88 88 + 88 88b, ,a8" 88 "8a, ,aa `8b,d8' "8a, ,a8" 88 88 + 88888888888 88`YbbdP"' 88 `"Ybbd8"' Y88' `"YbbdP"' 88 88 + 88 d8' + 88 d8' diff --git a/theme/solidaric/banner.txt b/theme/solidaric/banner.txt index ffe9419c0..3a8fd200d 100644 --- a/theme/solidaric/banner.txt +++ b/theme/solidaric/banner.txt @@ -1,8 +1,9 @@ - __ - , ," e`--o - (( ( | __,' - \\~-------' \_;/ - ( / - /) .______. ) - (( ( (( ( - ``-' ``-' + oooooooooooo o8o + `888' `8 `"' + 888 oo.ooooo. oooo .ooooo. oooo ooo .ooooo. ooo. .oo. + 888oooo8 888' `88b `888 d88' `"Y8 `88. .8' d88' `88b `888P"Y88b + 888 " 888 888 888 888 `88..8' 888 888 888 888 + 888 o 888 888 888 888 .o8 `888' 888 888 888 888 + o888ooooood8 888bod8P' o888o `Y8bod8P' .8' `Y8bod8P' o888o o888o + 888 .o..P' + o888o `Y8P' diff --git a/theme/solidaric/logo.txt b/theme/solidaric/logo.txt index 388fef656..3a8fd200d 100644 --- a/theme/solidaric/logo.txt +++ b/theme/solidaric/logo.txt @@ -1,8 +1,9 @@ - 8888888888 8888888b. 8888888 .d8888b. Y88b d88P .d88888b. 888b 888 - 888 888 Y88b 888 d88P Y88b Y88b d88P d88P" "Y88b 8888b 888 - 888 888 888 888 888 888 Y88o88P 888 888 88888b 888 - 8888888 888 d88P 888 888 Y888P 888 888 888Y88b 888 - 888 8888888P" 888 888 888 888 888 888 Y88b888 - 888 888 888 888 888 888 888 888 888 Y88888 - 888 888 888 Y88b d88P 888 Y88b. .d88P 888 Y8888 - 8888888888 888 8888888 "Y8888P" 888 "Y88888P" 888 Y888 + oooooooooooo o8o + `888' `8 `"' + 888 oo.ooooo. oooo .ooooo. oooo ooo .ooooo. ooo. .oo. + 888oooo8 888' `88b `888 d88' `"Y8 `88. .8' d88' `88b `888P"Y88b + 888 " 888 888 888 888 `88..8' 888 888 888 888 + 888 o 888 888 888 888 .o8 `888' 888 888 888 888 + o888ooooood8 888bod8P' o888o `Y8bod8P' .8' `Y8bod8P' o888o o888o + 888 .o..P' + o888o `Y8P' From 4c9e5d85446b267877a8c2ebfa809a523d8ce501 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Sun, 7 Feb 2021 13:33:30 +0000 Subject: [PATCH 62/79] Text mode banner on search screen --- daemon.py | 3 ++- epicyon-search.css | 8 ++++++++ webapp_search.py | 10 ++++++++-- 3 files changed, 18 insertions(+), 3 deletions(-) diff --git a/daemon.py b/daemon.py index 275a65ddf..675a205de 100644 --- a/daemon.py +++ b/daemon.py @@ -11043,7 +11043,8 @@ class PubServer(BaseHTTPRequestHandler): self.server.baseDir, self.path, self.server.domain, self.server.defaultTimeline, - self.server.themeName).encode('utf-8') + self.server.themeName, + self.server.textModeBanner).encode('utf-8') msglen = len(msg) self._set_headers('text/html', msglen, cookie, callingDomain) self._write(msg) diff --git a/epicyon-search.css b/epicyon-search.css index 9f61bcd1f..c2078c108 100644 --- a/epicyon-search.css +++ b/epicyon-search.css @@ -102,6 +102,14 @@ a:focus { border: 2px solid var(--focus-color); } +.transparent { + color: transparent; + background: transparent; + font-size: 0px; + line-height: 0px; + height: 0px; +} + .cw { font-style: var(--cw-style); color: var(--cw-color); diff --git a/webapp_search.py b/webapp_search.py index af512fe38..0912beb90 100644 --- a/webapp_search.py +++ b/webapp_search.py @@ -23,6 +23,7 @@ from utils import searchBoxPosts from categories import getHashtagCategory from feeds import rss2TagHeader from feeds import rss2TagFooter +from webapp_utils import htmlKeyboardNavigation from webapp_utils import getAltPath from webapp_utils import htmlHeaderWithExternalStyle from webapp_utils import htmlFooter @@ -317,7 +318,8 @@ def htmlSearchEmojiTextEntry(cssCache: {}, translate: {}, def htmlSearch(cssCache: {}, translate: {}, baseDir: str, path: str, domain: str, - defaultTimeline: str, theme: str) -> str: + defaultTimeline: str, theme: str, + textModeBanner: str) -> str: """Search called from the timeline icon """ actor = path.replace('/search', '') @@ -340,10 +342,14 @@ def htmlSearch(cssCache: {}, translate: {}, searchBannerFile, searchBannerFilename = \ getSearchBannerFile(baseDir, searchNickname, domain, theme) + textModeBannerStr = htmlKeyboardNavigation(textModeBanner, {}) + if textModeBannerStr is None: + textModeBannerStr = '' + if os.path.isfile(searchBannerFilename): usersPath = '/users/' + searchNickname followStr += \ - '
\n' + \ + '
\n' + textModeBannerStr + \ '\n' From a64b6b0a03ca9eeffcb65eb3e944c0e09070d88e Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Sun, 7 Feb 2021 15:22:06 +0000 Subject: [PATCH 63/79] Comments --- theme.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/theme.py b/theme.py index 00927ed5b..dba95d2e0 100644 --- a/theme.py +++ b/theme.py @@ -15,6 +15,8 @@ from content import dangerousCSS def _getThemeFiles() -> []: + """Gets the list of theme style sheets + """ return ('epicyon.css', 'login.css', 'follow.css', 'suspended.css', 'calendar.css', 'blog.css', 'options.css', 'search.css', 'links.css') @@ -39,6 +41,8 @@ def getThemesList(baseDir: str) -> []: def _setThemeInConfig(baseDir: str, name: str) -> bool: + """Sets the theme with the given name within config.json + """ configFilename = baseDir + '/config.json' if not os.path.isfile(configFilename): return False @@ -118,6 +122,8 @@ def _setFullWidthTimelineButtonHeader(baseDir: str, fullWidth: bool) -> bool: def getTheme(baseDir: str) -> str: + """Gets the current theme name from config.json + """ configFilename = baseDir + '/config.json' if os.path.isfile(configFilename): configJson = loadJson(configFilename, 0) @@ -128,6 +134,8 @@ def getTheme(baseDir: str) -> str: def _removeTheme(baseDir: str): + """Removes the current theme style sheets + """ themeFiles = _getThemeFiles() for filename in themeFiles: if os.path.isfile(baseDir + '/' + filename): @@ -606,6 +614,8 @@ def setNewsAvatar(baseDir: str, name: str, def setTheme(baseDir: str, name: str, domain: str, allowLocalNetworkAccess: bool) -> bool: + """Sets the theme with the given name as the current theme + """ result = False prevThemeName = getTheme(baseDir) From c788674a9cc2222f81e7acfaab4265a9ccc29239 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Sun, 7 Feb 2021 15:32:15 +0000 Subject: [PATCH 64/79] Tidying --- theme.py | 57 +++++++++++++++++++++++++++++++------------------------- 1 file changed, 32 insertions(+), 25 deletions(-) diff --git a/theme.py b/theme.py index dba95d2e0..9a27ec6e6 100644 --- a/theme.py +++ b/theme.py @@ -456,6 +456,37 @@ def getTextModeLogo(baseDir: str) -> str: return None +def _setTextModeTheme(baseDir: str, name: str) -> None: + # set the text mode logo which appears on the login screen + # in browsers such as Lynx + textModeLogoFilename = \ + baseDir + '/theme/' + name + '/logo.txt' + if os.path.isfile(textModeLogoFilename): + try: + copyfile(textModeLogoFilename, + baseDir + '/accounts/logo.txt') + except BaseException: + pass + else: + try: + copyfile(baseDir + '/img/logo.txt', + baseDir + '/accounts/logo.txt') + except BaseException: + pass + + # set the text mode banner which appears in browsers such as Lynx + textModeBannerFilename = \ + baseDir + '/theme/' + name + '/banner.txt' + if os.path.isfile(baseDir + '/accounts/banner.txt'): + os.remove(baseDir + '/accounts/banner.txt') + if os.path.isfile(textModeBannerFilename): + try: + copyfile(textModeBannerFilename, + baseDir + '/accounts/banner.txt') + except BaseException: + pass + + def _setThemeImages(baseDir: str, name: str) -> None: """Changes the profile background image and banner to the defaults @@ -473,31 +504,7 @@ def _setThemeImages(baseDir: str, name: str) -> None: rightColImageFilename = \ baseDir + '/theme/' + themeNameLower + '/right_col_image.png' - textModeLogoFilename = \ - baseDir + '/theme/' + themeNameLower + '/logo.txt' - if os.path.isfile(textModeLogoFilename): - try: - copyfile(textModeLogoFilename, - baseDir + '/accounts/logo.txt') - except BaseException: - pass - else: - try: - copyfile(baseDir + '/img/logo.txt', - baseDir + '/accounts/logo.txt') - except BaseException: - pass - - textModeBannerFilename = \ - baseDir + '/theme/' + themeNameLower + '/banner.txt' - if os.path.isfile(baseDir + '/accounts/banner.txt'): - os.remove(baseDir + '/accounts/banner.txt') - if os.path.isfile(textModeBannerFilename): - try: - copyfile(textModeBannerFilename, - baseDir + '/accounts/banner.txt') - except BaseException: - pass + _setTextModeTheme(baseDir, themeNameLower) backgroundNames = ('login', 'shares', 'delete', 'follow', 'options', 'block', 'search', 'calendar') From ff8d91316e7560f3db1ec3c2b48c17c1622f5d38 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Sun, 7 Feb 2021 18:33:37 +0000 Subject: [PATCH 65/79] lines after end of menu --- webapp_utils.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/webapp_utils.py b/webapp_utils.py index f16b11bfb..adc6138b8 100644 --- a/webapp_utils.py +++ b/webapp_utils.py @@ -908,5 +908,8 @@ def htmlKeyboardNavigation(banner: str, links: {}, htmlStr += '
  • ' + \ str(title) + '
  • ' - htmlStr += '


    ' + htmlStr += '' + for i in range(16): + htmlStr += '
    ' + htmlStr += '' return htmlStr From b7155f1488b99b7f59ff9897e9fb2ac8e5257c4b Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Sun, 7 Feb 2021 18:36:45 +0000 Subject: [PATCH 66/79] Newlines have no effect --- webapp_utils.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/webapp_utils.py b/webapp_utils.py index adc6138b8..1511b1408 100644 --- a/webapp_utils.py +++ b/webapp_utils.py @@ -908,8 +908,5 @@ def htmlKeyboardNavigation(banner: str, links: {}, htmlStr += '
  • ' - htmlStr += '' - for i in range(16): - htmlStr += '
    ' - htmlStr += '' + htmlStr += '' return htmlStr From 6817244da1b44a1fca69eb1e6bafe15a3fc5b735 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Sun, 7 Feb 2021 18:51:49 +0000 Subject: [PATCH 67/79] Like emoji on alt --- webapp_post.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/webapp_post.py b/webapp_post.py index c9ec866e0..f5d02b06e 100644 --- a/webapp_post.py +++ b/webapp_post.py @@ -48,6 +48,7 @@ from content import getMentionsFromHtml from content import switchWords from person import isPersonSnoozed from announce import announcedByPerson +from webapp_utils import htmlHideFromScreenReader from webapp_utils import getAvatarImageUrl from webapp_utils import getPersonAvatarUrl from webapp_utils import updateAvatarImageCache @@ -430,6 +431,7 @@ def _getLikeIconHtml(nickname: str, domainFull: str, likeIcon = 'like_inactive.png' likeLink = 'like' likeTitle = translate['Like this post'] + likeEmoji = '' likeCount = noOfLikes(postJsonObject) _logPostTiming(enableTimingLog, postStartTime, '12.1') @@ -447,6 +449,7 @@ def _getLikeIconHtml(nickname: str, domainFull: str, likeIcon = 'like.png' likeLink = 'unlike' likeTitle = translate['Undo the like'] + likeEmoji = htmlHideFromScreenReader('👍') + ' ' _logPostTiming(enableTimingLog, postStartTime, '12.2') @@ -467,7 +470,7 @@ def _getLikeIconHtml(nickname: str, domainFull: str, likeStr += \ ' ' + \ '' + likeTitle + \
+            '\n' return likeStr From 84a9416bb4faa951389360a82d8a742b64ffb8d5 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Sun, 7 Feb 2021 19:00:47 +0000 Subject: [PATCH 68/79] Remove markup --- webapp_post.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/webapp_post.py b/webapp_post.py index f5d02b06e..a7e96cf44 100644 --- a/webapp_post.py +++ b/webapp_post.py @@ -48,7 +48,6 @@ from content import getMentionsFromHtml from content import switchWords from person import isPersonSnoozed from announce import announcedByPerson -from webapp_utils import htmlHideFromScreenReader from webapp_utils import getAvatarImageUrl from webapp_utils import getPersonAvatarUrl from webapp_utils import updateAvatarImageCache @@ -449,7 +448,7 @@ def _getLikeIconHtml(nickname: str, domainFull: str, likeIcon = 'like.png' likeLink = 'unlike' likeTitle = translate['Undo the like'] - likeEmoji = htmlHideFromScreenReader('👍') + ' ' + likeEmoji = '👍 ' _logPostTiming(enableTimingLog, postStartTime, '12.2') From 24cd4d56f59abd6f16196284c350d1a51b31c011 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Sun, 7 Feb 2021 19:11:30 +0000 Subject: [PATCH 69/79] Extra emoji within alt --- webapp_post.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/webapp_post.py b/webapp_post.py index a7e96cf44..dc9800488 100644 --- a/webapp_post.py +++ b/webapp_post.py @@ -388,12 +388,14 @@ def _getAnnounceIconHtml(nickname: str, domainFull: str, # don't allow announce/repeat of your own posts announceIcon = 'repeat_inactive.png' announceLink = 'repeat' + announceEmoji = '' if not isPublicRepeat: announceLink = 'repeatprivate' announceTitle = translate['Repeat this post'] if announcedByPerson(postJsonObject, nickname, domainFull): announceIcon = 'repeat.png' + announceEmoji = '🔁 ' if not isPublicRepeat: announceLink = 'unrepeatprivate' announceTitle = translate['Undo the repeat'] @@ -409,7 +411,7 @@ def _getAnnounceIconHtml(nickname: str, domainFull: str, announceStr += \ ' ' + \ '' + translate['Repeat this post'] + \
+            '\n' return announceStr @@ -491,10 +493,12 @@ def _getBookmarkIconHtml(nickname: str, domainFull: str, bookmarkIcon = 'bookmark_inactive.png' bookmarkLink = 'bookmark' + bookmarkEmoji = '' bookmarkTitle = translate['Bookmark this post'] if bookmarkedByPerson(postJsonObject, nickname, domainFull): bookmarkIcon = 'bookmark.png' bookmarkLink = 'unbookmark' + bookmarkEmoji = '🔖 ' bookmarkTitle = translate['Undo the bookmark'] _logPostTiming(enableTimingLog, postStartTime, '12.6') bookmarkStr = \ @@ -507,7 +511,7 @@ def _getBookmarkIconHtml(nickname: str, domainFull: str, bookmarkStr += \ ' ' + \ '' + \
-        bookmarkTitle + ' |\n' return bookmarkStr @@ -550,7 +554,7 @@ def _getMuteIconHtml(isMuted: bool, translate['Undo mute'] + '">\n' muteStr += \ ' ' + \ - '' + translate['Undo mute'] + \
+            '<img loading=\n' return muteStr From 1e3ca2b6229c6c96997364295a24db4dc87dc509 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Sun, 7 Feb 2021 21:10:21 +0000 Subject: [PATCH 70/79] Profile emoji on alt --- webapp_post.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/webapp_post.py b/webapp_post.py index dc9800488..dd4c9a24b 100644 --- a/webapp_post.py +++ b/webapp_post.py @@ -244,15 +244,19 @@ def _getAvatarImageHtml(showAvatarOptions: bool, ';' + str(pageNumber) + ';' + avatarUrl + messageIdStr + '">\n' avatarLink += \ ' \n' else: # don't link to the person options for the news account avatarLink += \ ' \n' return avatarLink.strip() From d3390d59a73dc6cf812366eded637d407d43bcb9 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Sun, 7 Feb 2021 21:27:20 +0000 Subject: [PATCH 71/79] Text mode post separator --- webapp_timeline.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/webapp_timeline.py b/webapp_timeline.py index 457753c79..12b59a137 100644 --- a/webapp_timeline.py +++ b/webapp_timeline.py @@ -602,6 +602,12 @@ def htmlTimeline(cssCache: {}, defaultTimeline: str, translate['Page up'] + '">\n' + \ ' \n' + # separator between posts which only appears in shell browsers + # such as Lynx and is not read by screen readers + textModeSeparator = \ + '
    ' + \ + '

    ' + # show the posts itemCtr = 0 if timelineJson: @@ -670,7 +676,7 @@ def htmlTimeline(cssCache: {}, defaultTimeline: str, if currTlStr: itemCtr += 1 - tlStr += currTlStr + tlStr += textModeSeparator + currTlStr if separatorStr: tlStr += separatorStr if boxName == 'tlmedia': From 6e4e50ac5bfe13905b18ea3bfe8dcbcfa063a184 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Sun, 7 Feb 2021 21:34:20 +0000 Subject: [PATCH 72/79] Transparent hr on timeline --- epicyon-profile.css | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/epicyon-profile.css b/epicyon-profile.css index 1fa683db6..db3f8de9a 100644 --- a/epicyon-profile.css +++ b/epicyon-profile.css @@ -702,6 +702,14 @@ input[type=number] { height: 0px; } +.transparent hr { + color: transparent; + background: transparent; + font-size: 0px; + line-height: 0px; + height: 0px; +} + .labelsright { float: right; font-size: var(--font-size); From 9f11d348d6d814c56bc51596b32c266cf2d108f3 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Sun, 7 Feb 2021 21:37:44 +0000 Subject: [PATCH 73/79] Simplify --- webapp_timeline.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/webapp_timeline.py b/webapp_timeline.py index 12b59a137..ad248d969 100644 --- a/webapp_timeline.py +++ b/webapp_timeline.py @@ -604,9 +604,7 @@ def htmlTimeline(cssCache: {}, defaultTimeline: str, # separator between posts which only appears in shell browsers # such as Lynx and is not read by screen readers - textModeSeparator = \ - '
    ' + \ - '

    ' + textModeSeparator = '
    ' # show the posts itemCtr = 0 From 4148c684709d00958597dd6d61f6f88c5df2b00a Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Sun, 7 Feb 2021 21:39:13 +0000 Subject: [PATCH 74/79] Simplification was too simple --- webapp_timeline.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/webapp_timeline.py b/webapp_timeline.py index ad248d969..52e20d9e7 100644 --- a/webapp_timeline.py +++ b/webapp_timeline.py @@ -604,7 +604,8 @@ def htmlTimeline(cssCache: {}, defaultTimeline: str, # separator between posts which only appears in shell browsers # such as Lynx and is not read by screen readers - textModeSeparator = '
    ' + textModeSeparator = \ + '

    ' # show the posts itemCtr = 0 From 033dc4a238afad4aa729310d3d2687168347d685 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Sun, 7 Feb 2021 21:41:57 +0000 Subject: [PATCH 75/79] Separator before and after page down --- webapp_timeline.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/webapp_timeline.py b/webapp_timeline.py index 52e20d9e7..0888698ef 100644 --- a/webapp_timeline.py +++ b/webapp_timeline.py @@ -683,6 +683,7 @@ def htmlTimeline(cssCache: {}, defaultTimeline: str, # page down arrow if itemCtr > 2: + tlStr += textModeSeparator tlStr += \ '
    \n' + \ ' \n' + \ '
    \n' + tlStr += textModeSeparator # end of timeline-posts tlStr += ' \n' From 3d5ff0ececd671f7435e0ae2391e4b880cba434e Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Sun, 7 Feb 2021 21:45:31 +0000 Subject: [PATCH 76/79] Separator above page up --- webapp_timeline.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/webapp_timeline.py b/webapp_timeline.py index 0888698ef..07c1843fa 100644 --- a/webapp_timeline.py +++ b/webapp_timeline.py @@ -590,8 +590,14 @@ def htmlTimeline(cssCache: {}, defaultTimeline: str, _logTimelineTiming(enableTimingLog, timelineStartTime, boxName, '7') + # separator between posts which only appears in shell browsers + # such as Lynx and is not read by screen readers + textModeSeparator = \ + '

    ' + # page up arrow if pageNumber > 1: + tlStr += textModeSeparator tlStr += \ '
    \n' + \ ' \n' + \ '
    \n' - # separator between posts which only appears in shell browsers - # such as Lynx and is not read by screen readers - textModeSeparator = \ - '

    ' - # show the posts itemCtr = 0 if timelineJson: From d47df568037bfda7cd0f938b45207d2f4c3b0d0e Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Sun, 7 Feb 2021 21:51:31 +0000 Subject: [PATCH 77/79] No border --- epicyon-profile.css | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/epicyon-profile.css b/epicyon-profile.css index db3f8de9a..282aed28f 100644 --- a/epicyon-profile.css +++ b/epicyon-profile.css @@ -703,6 +703,7 @@ input[type=number] { } .transparent hr { + border: 0; color: transparent; background: transparent; font-size: 0px; @@ -1153,7 +1154,7 @@ div.container { filter: brightness(var(--icon-brightness-change)); } .col-right img.rightColEdit { - float: right; + float: right; background: transparent; width: var(--column-right-icon-size); } From 5eeca981dad6cca8a71154c317b3da36b1397eb6 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Sun, 7 Feb 2021 21:57:48 +0000 Subject: [PATCH 78/79] Try a different approach with menus --- webapp_utils.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/webapp_utils.py b/webapp_utils.py index 1511b1408..37b015f46 100644 --- a/webapp_utils.py +++ b/webapp_utils.py @@ -908,5 +908,11 @@ def htmlKeyboardNavigation(banner: str, links: {}, htmlStr += '
  • ' - htmlStr += '' + htmlStr += '' + if links: + htmlStr += '
    '
    +        for i in range(20):
    +            htmlStr += '
    ' + htmlStr += '
    ' + htmlStr += '' return htmlStr From ddb7d15d2a5351100abe2681a3b5a74f24ef6503 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Sun, 7 Feb 2021 21:59:05 +0000 Subject: [PATCH 79/79] Makes no difference --- webapp_utils.py | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/webapp_utils.py b/webapp_utils.py index 37b015f46..1511b1408 100644 --- a/webapp_utils.py +++ b/webapp_utils.py @@ -908,11 +908,5 @@ def htmlKeyboardNavigation(banner: str, links: {}, htmlStr += '
  • ' - htmlStr += '' - if links: - htmlStr += '
    '
    -        for i in range(20):
    -            htmlStr += '
    ' - htmlStr += '
    ' - htmlStr += '' + htmlStr += '' return htmlStr