From 4d042dbeca4eb9f74d061eda7168369995d0bc62 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Wed, 3 Nov 2021 11:18:30 +0000 Subject: [PATCH 01/16] Tidying --- webapp_create_post.py | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/webapp_create_post.py b/webapp_create_post.py index 9128983ff..ace3a47ce 100644 --- a/webapp_create_post.py +++ b/webapp_create_post.py @@ -289,11 +289,14 @@ def htmlNewPost(cssCache: {}, mediaInstance: bool, translate: {}, if '?' in path: path = path.split('?')[0] - pathBase = path.replace('/newreport', '').replace('/newpost', '') - pathBase = pathBase.replace('/newblog', '').replace('/newshare', '') - pathBase = pathBase.replace('/newunlisted', '').replace('/newwanted', '') - pathBase = pathBase.replace('/newreminder', '') - pathBase = pathBase.replace('/newfollowers', '').replace('/newdm', '') + newPostEndpoints = ( + '/newreport', '/newpost', '/newblog', '/newshare', + '/newunlisted', '/newwanted', '/newreminder', + '/newfollowers', '/newdm' + ) + pathBase = path + for newPostReplace in newPostEndpoints: + pathBase = pathBase.replace(newPostReplace, '') newPostImageSection = '
' newPostImageSection += \ From 0fc18cc7dd8278fadc689780fac29857e37a27dd Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Wed, 3 Nov 2021 11:25:26 +0000 Subject: [PATCH 02/16] Tidying --- daemon.py | 6 ++---- utils.py | 9 +++++++++ webapp_create_post.py | 9 +++------ 3 files changed, 14 insertions(+), 10 deletions(-) diff --git a/daemon.py b/daemon.py index 0f50cf71e..3eb96e9ba 100644 --- a/daemon.py +++ b/daemon.py @@ -238,6 +238,7 @@ from categories import updateHashtagCategories from languages import getActorLanguages from languages import setActorLanguages from like import updateLikesCollection +from utils import getNewPostEndpoints from utils import malformedCiphertext from utils import hasActor from utils import setReplyIntervalHours @@ -11893,10 +11894,7 @@ class PubServer(BaseHTTPRequestHandler): isNewPostEndpoint = False if '/users/' in path and '/new' in path: # Various types of new post in the web interface - newPostEnd = ('newpost', 'newblog', 'newunlisted', - 'newfollowers', 'newdm', 'newreminder', - 'newreport', 'newquestion', - 'newshare', 'newwanted') + newPostEnd = getNewPostEndpoints() for postType in newPostEnd: if path.endswith('/' + postType): isNewPostEndpoint = True diff --git a/utils.py b/utils.py index 5ec417ef2..0a47f7919 100644 --- a/utils.py +++ b/utils.py @@ -3145,3 +3145,12 @@ def hasObjectString(postJsonObject: {}, debug: bool) -> bool: if debug: print('No object field within post ' + postJsonObject['id']) return False + + +def getNewPostEndpoints() -> []: + """Returns a list of endpoints for new posts + """ + return ( + 'newpost', 'newblog', 'newunlisted', 'newfollowers', 'newdm', + 'newreminder', 'newreport', 'newquestion', 'newshare', 'newwanted' + ) diff --git a/webapp_create_post.py b/webapp_create_post.py index ace3a47ce..8de72c025 100644 --- a/webapp_create_post.py +++ b/webapp_create_post.py @@ -8,6 +8,7 @@ __status__ = "Production" __module_group__ = "Web Interface" import os +from utils import getNewPostEndpoints from utils import isPublicPostFromUrl from utils import getNicknameFromActor from utils import getDomainFromActor @@ -289,14 +290,10 @@ def htmlNewPost(cssCache: {}, mediaInstance: bool, translate: {}, if '?' in path: path = path.split('?')[0] - newPostEndpoints = ( - '/newreport', '/newpost', '/newblog', '/newshare', - '/newunlisted', '/newwanted', '/newreminder', - '/newfollowers', '/newdm' - ) + newPostEndpoints = getNewPostEndpoints() pathBase = path for newPostReplace in newPostEndpoints: - pathBase = pathBase.replace(newPostReplace, '') + pathBase = pathBase.replace('/' + newPostReplace, '') newPostImageSection = '
' newPostImageSection += \ From b65f7722d4ac1e773910f8cc0b1e744bd60a127f Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Wed, 3 Nov 2021 11:32:38 +0000 Subject: [PATCH 03/16] Tidying of new post endpoints --- daemon.py | 4 +--- utils.py | 3 ++- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/daemon.py b/daemon.py index 3eb96e9ba..d7b71d7c0 100644 --- a/daemon.py +++ b/daemon.py @@ -16697,9 +16697,7 @@ class PubServer(BaseHTTPRequestHandler): self.server.debug) # receive different types of post created by htmlNewPost - postTypes = ("newpost", "newblog", "newunlisted", "newfollowers", - "newdm", "newreport", "newshare", "newwanted", - "newquestion", "editblogpost", "newreminder") + postTypes = getNewPostEndpoints() for currPostType in postTypes: if not authorized: if self.server.debug: diff --git a/utils.py b/utils.py index 0a47f7919..e67a22a59 100644 --- a/utils.py +++ b/utils.py @@ -3152,5 +3152,6 @@ def getNewPostEndpoints() -> []: """ return ( 'newpost', 'newblog', 'newunlisted', 'newfollowers', 'newdm', - 'newreminder', 'newreport', 'newquestion', 'newshare', 'newwanted' + 'newreminder', 'newreport', 'newquestion', 'newshare', 'newwanted', + 'editblogpost' ) From b677b018590a8907293f3aa6fa38a483ee46b70e Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Wed, 3 Nov 2021 11:51:53 +0000 Subject: [PATCH 04/16] Same name for variables --- daemon.py | 10 +++++----- webapp_create_post.py | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/daemon.py b/daemon.py index d7b71d7c0..4a5f14d94 100644 --- a/daemon.py +++ b/daemon.py @@ -11894,9 +11894,9 @@ class PubServer(BaseHTTPRequestHandler): isNewPostEndpoint = False if '/users/' in path and '/new' in path: # Various types of new post in the web interface - newPostEnd = getNewPostEndpoints() - for postType in newPostEnd: - if path.endswith('/' + postType): + newPostEndpoints = getNewPostEndpoints() + for currPostType in newPostEndpoints: + if path.endswith('/' + currPostType): isNewPostEndpoint = True break if isNewPostEndpoint: @@ -16697,8 +16697,8 @@ class PubServer(BaseHTTPRequestHandler): self.server.debug) # receive different types of post created by htmlNewPost - postTypes = getNewPostEndpoints() - for currPostType in postTypes: + newPostEndpoints = getNewPostEndpoints() + for currPostType in newPostEndpoints: if not authorized: if self.server.debug: print('POST was not authorized') diff --git a/webapp_create_post.py b/webapp_create_post.py index 8de72c025..5b92ac602 100644 --- a/webapp_create_post.py +++ b/webapp_create_post.py @@ -292,8 +292,8 @@ def htmlNewPost(cssCache: {}, mediaInstance: bool, translate: {}, path = path.split('?')[0] newPostEndpoints = getNewPostEndpoints() pathBase = path - for newPostReplace in newPostEndpoints: - pathBase = pathBase.replace('/' + newPostReplace, '') + for currPostType in newPostEndpoints: + pathBase = pathBase.replace('/' + currPostType, '') newPostImageSection = '
' newPostImageSection += \ From 38544a8afd4133f829ab849ca4fccc9bfe79361b Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Wed, 3 Nov 2021 12:53:49 +0000 Subject: [PATCH 05/16] Show date and time at top of new reminders --- webapp_create_post.py | 41 +++++++++++++++++++++++++++-------------- 1 file changed, 27 insertions(+), 14 deletions(-) diff --git a/webapp_create_post.py b/webapp_create_post.py index 5b92ac602..a74850cc3 100644 --- a/webapp_create_post.py +++ b/webapp_create_post.py @@ -200,6 +200,24 @@ def htmlNewPost(cssCache: {}, mediaInstance: bool, translate: {}, """ replyStr = '' + isNewReminder = False + if path.endswith('/newreminder'): + isNewReminder = True + + # the date and time + dateAndTimeStr = \ + '

\n' + # select a date and time for this post + dateAndTimeStr += '\n' + dateAndTimeStr += '\n' + dateAndTimeStr += '

\n' + showPublicOnDropdown = True messageBoxHeight = 400 @@ -209,7 +227,7 @@ def htmlNewPost(cssCache: {}, mediaInstance: bool, translate: {}, if not path.endswith('/newshare') and not path.endswith('/newwanted'): if not path.endswith('/newreport'): - if not inReplyTo or path.endswith('/newreminder'): + if not inReplyTo or isNewReminder: newPostText = '

' + \ translate['Write your post text below.'] + '

\n' else: @@ -351,7 +369,7 @@ def htmlNewPost(cssCache: {}, mediaInstance: bool, translate: {}, scopeIcon = 'scope_dm.png' scopeDescription = translate['DM'] endpoint = 'newdm' - elif path.endswith('/newreminder'): + elif isNewReminder: scopeIcon = 'scope_reminder.png' scopeDescription = translate['Reminder'] endpoint = 'newreminder' @@ -563,18 +581,8 @@ def htmlNewPost(cssCache: {}, mediaInstance: bool, translate: {}, 'name="schedulePost">

\n' - dateAndLocation += \ - '

\n' - # select a date and time for this post - dateAndLocation += '\n' - dateAndLocation += '\n' - dateAndLocation += '

\n' + if not isNewReminder: + dateAndLocation += dateAndTimeStr dateAndLocation += '
\n' dateAndLocation += '
\n' @@ -730,6 +738,11 @@ def htmlNewPost(cssCache: {}, mediaInstance: bool, translate: {}, if not shareDescription: shareDescription = '' + + # for reminders show the date and time at the top + if path.endswith('/newreminder'): + newPostForm += dateAndTimeStr + newPostForm += \ editTextField(placeholderSubject, 'subject', shareDescription) newPostForm += '' From c6f5ede526c7ff463e43cae54e05c1d240783c2f Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Wed, 3 Nov 2021 12:58:22 +0000 Subject: [PATCH 06/16] Date and time within container --- webapp_create_post.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/webapp_create_post.py b/webapp_create_post.py index a74850cc3..99941abb6 100644 --- a/webapp_create_post.py +++ b/webapp_create_post.py @@ -740,8 +740,10 @@ def htmlNewPost(cssCache: {}, mediaInstance: bool, translate: {}, shareDescription = '' # for reminders show the date and time at the top - if path.endswith('/newreminder'): + if isNewReminder: + newPostForm += '
\n' newPostForm += dateAndTimeStr + newPostForm += '
\n' newPostForm += \ editTextField(placeholderSubject, 'subject', shareDescription) From 9cd875b6ad0215de5cd042f069c1bbfbcf8e7842 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Wed, 3 Nov 2021 13:07:42 +0000 Subject: [PATCH 07/16] Space --- webapp_create_post.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/webapp_create_post.py b/webapp_create_post.py index 99941abb6..acebed500 100644 --- a/webapp_create_post.py +++ b/webapp_create_post.py @@ -214,7 +214,7 @@ def htmlNewPost(cssCache: {}, mediaInstance: bool, translate: {}, translate['Date'] + ': \n' dateAndTimeStr += '\n' dateAndTimeStr += '

\n' From 2ac67351134b72660aee157836e4b2a2dfb46b26 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Wed, 3 Nov 2021 13:28:35 +0000 Subject: [PATCH 08/16] Don't show some fields on new reminder --- webapp_create_post.py | 54 +++++++++++++++++++++++-------------------- 1 file changed, 29 insertions(+), 25 deletions(-) diff --git a/webapp_create_post.py b/webapp_create_post.py index acebed500..ed0021d59 100644 --- a/webapp_create_post.py +++ b/webapp_create_post.py @@ -558,33 +558,37 @@ def htmlNewPost(cssCache: {}, mediaInstance: bool, translate: {}, endpoint != 'newwanted' and \ endpoint != 'newreport' and \ endpoint != 'newquestion': - dateAndLocation = \ - '
\n' - if category != 'accommodation': - dateAndLocation += \ - '

\n' - else: - dateAndLocation += \ - '\n' - - if endpoint == 'newpost': - dateAndLocation += \ - '

\n' - - if not inReplyTo: - dateAndLocation += \ - '

\n' - + if not isNewReminder: - dateAndLocation += dateAndTimeStr + dateAndLocation = \ + '
\n' + if category != 'accommodation': + dateAndLocation += \ + '

\n' + else: + dateAndLocation += \ + '\n' + + if endpoint == 'newpost': + dateAndLocation += \ + '

\n' + + if not inReplyTo: + dateAndLocation += \ + '

\n' + + dateAndLocation += dateAndTimeStr + dateAndLocation += '
\n' - dateAndLocation += '
\n' dateAndLocation += '
\n' dateAndLocation += \ editTextField(translate['Location'], 'location', '') From 95207fb958ad7da6180a8bad3041947f29ab44c4 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Wed, 3 Nov 2021 13:44:19 +0000 Subject: [PATCH 09/16] Tidying --- webapp_create_post.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/webapp_create_post.py b/webapp_create_post.py index ed0021d59..90b9b046d 100644 --- a/webapp_create_post.py +++ b/webapp_create_post.py @@ -558,7 +558,7 @@ def htmlNewPost(cssCache: {}, mediaInstance: bool, translate: {}, endpoint != 'newwanted' and \ endpoint != 'newreport' and \ endpoint != 'newquestion': - + if not isNewReminder: dateAndLocation = \ '
\n' From bd54ff6de8c37745f4ba52d2908ce1499360ae63 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Wed, 3 Nov 2021 16:41:23 +0000 Subject: [PATCH 10/16] Link to create new calendar event --- 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/ku.json | 3 ++- translations/oc.json | 3 ++- translations/pt.json | 3 ++- translations/ru.json | 3 ++- translations/sw.json | 3 ++- translations/zh.json | 3 ++- webapp_calendar.py | 10 +++++++++- 18 files changed, 43 insertions(+), 18 deletions(-) diff --git a/translations/ar.json b/translations/ar.json index 4b46432fb..f71b30e40 100644 --- a/translations/ar.json +++ b/translations/ar.json @@ -490,5 +490,6 @@ "Leave": "يترك", "System Monitor": "مراقب النظام", "Add content warnings for the following sites": "أضف تحذيرات المحتوى للمواقع التالية", - "Known Web Crawlers": "برامج زحف الويب المعروفة" + "Known Web Crawlers": "برامج زحف الويب المعروفة", + "Add to the calendar": "أضف إلى التقويم" } diff --git a/translations/ca.json b/translations/ca.json index 59fbdc8d1..07205607c 100644 --- a/translations/ca.json +++ b/translations/ca.json @@ -490,5 +490,6 @@ "Leave": "Marxa", "System Monitor": "Monitor del sistema", "Add content warnings for the following sites": "Afegiu advertiments de contingut per als llocs següents", - "Known Web Crawlers": "Exploradors web coneguts" + "Known Web Crawlers": "Exploradors web coneguts", + "Add to the calendar": "Afegeix al calendari" } diff --git a/translations/cy.json b/translations/cy.json index 79339634a..6a3715cb6 100644 --- a/translations/cy.json +++ b/translations/cy.json @@ -490,5 +490,6 @@ "Leave": "Gadewch", "System Monitor": "Monitor System", "Add content warnings for the following sites": "Ychwanegwch rybuddion cynnwys ar gyfer y gwefannau canlynol", - "Known Web Crawlers": "Crawlers Gwe Hysbys" + "Known Web Crawlers": "Crawlers Gwe Hysbys", + "Add to the calendar": "Ychwanegwch at y calendr" } diff --git a/translations/de.json b/translations/de.json index 9852d7703..da33ff00f 100644 --- a/translations/de.json +++ b/translations/de.json @@ -490,5 +490,6 @@ "Leave": "Verlassen", "System Monitor": "Systemmonitor", "Add content warnings for the following sites": "Inhaltswarnungen für die folgenden Websites hinzufügen", - "Known Web Crawlers": "Bekannte Web-Crawler" + "Known Web Crawlers": "Bekannte Web-Crawler", + "Add to the calendar": "Zum Kalender hinzufügen" } diff --git a/translations/en.json b/translations/en.json index 1efb610ef..551749a49 100644 --- a/translations/en.json +++ b/translations/en.json @@ -490,5 +490,6 @@ "Leave": "Leave", "System Monitor": "System Monitor", "Add content warnings for the following sites": "Add content warnings for the following sites", - "Known Web Crawlers": "Known Web Crawlers" + "Known Web Crawlers": "Known Web Crawlers", + "Add to the calendar": "Add to the calendar" } diff --git a/translations/es.json b/translations/es.json index 0c88b4250..d89b835ec 100644 --- a/translations/es.json +++ b/translations/es.json @@ -490,5 +490,6 @@ "Leave": "Dejar", "System Monitor": "Monitor del sistema", "Add content warnings for the following sites": "Agregue advertencias de contenido para los siguientes sitios", - "Known Web Crawlers": "Rastreadores web conocidos" + "Known Web Crawlers": "Rastreadores web conocidos", + "Add to the calendar": "Agregar al calendario" } diff --git a/translations/fr.json b/translations/fr.json index 05f4284bd..73982bb9e 100644 --- a/translations/fr.json +++ b/translations/fr.json @@ -490,5 +490,6 @@ "Leave": "Laisser", "System Monitor": "Moniteur système", "Add content warnings for the following sites": "Ajouter des avertissements de contenu pour les sites suivants", - "Known Web Crawlers": "Crawlers Web connus" + "Known Web Crawlers": "Crawlers Web connus", + "Add to the calendar": "Ajouter au calendrier" } diff --git a/translations/ga.json b/translations/ga.json index dc0e6f802..8af1069ed 100644 --- a/translations/ga.json +++ b/translations/ga.json @@ -490,5 +490,6 @@ "Leave": "Fág", "System Monitor": "Monatóir Córais", "Add content warnings for the following sites": "Cuir rabhaidh ábhair leis na suíomhanna seo a leanas", - "Known Web Crawlers": "Crawlers Gréasáin Aitheanta" + "Known Web Crawlers": "Crawlers Gréasáin Aitheanta", + "Add to the calendar": "Cuir leis an bhféilire" } diff --git a/translations/hi.json b/translations/hi.json index bf52fae8b..e044eb261 100644 --- a/translations/hi.json +++ b/translations/hi.json @@ -490,5 +490,6 @@ "Leave": "छोड़ना", "System Monitor": "सिस्टम मॉनिटर", "Add content warnings for the following sites": "निम्नलिखित साइटों के लिए सामग्री चेतावनियाँ जोड़ें", - "Known Web Crawlers": "ज्ञात वेब क्रॉलर" + "Known Web Crawlers": "ज्ञात वेब क्रॉलर", + "Add to the calendar": "कैलेंडर में जोड़ें" } diff --git a/translations/it.json b/translations/it.json index 41341a01d..c847b5dc5 100644 --- a/translations/it.json +++ b/translations/it.json @@ -490,5 +490,6 @@ "Leave": "Lasciare", "System Monitor": "Monitor di sistema", "Add content warnings for the following sites": "Aggiungi avvisi sui contenuti per i seguenti siti", - "Known Web Crawlers": "Crawler Web conosciuti" + "Known Web Crawlers": "Crawler Web conosciuti", + "Add to the calendar": "Aggiungi al calendario" } diff --git a/translations/ja.json b/translations/ja.json index d96250ced..17f939fbe 100644 --- a/translations/ja.json +++ b/translations/ja.json @@ -490,5 +490,6 @@ "Leave": "離れる", "System Monitor": "システムモニター", "Add content warnings for the following sites": "次のサイトのコンテンツ警告を追加します", - "Known Web Crawlers": "既知のWebクローラー" + "Known Web Crawlers": "既知のWebクローラー", + "Add to the calendar": "カレンダーに追加" } diff --git a/translations/ku.json b/translations/ku.json index 946d077be..36698735f 100644 --- a/translations/ku.json +++ b/translations/ku.json @@ -490,5 +490,6 @@ "Leave": "Terikandin", "System Monitor": "System Monitor", "Add content warnings for the following sites": "Ji bo malperên jêrîn hişyariyên naverokê zêde bikin", - "Known Web Crawlers": "Crawlerên Webê yên naskirî" + "Known Web Crawlers": "Crawlerên Webê yên naskirî", + "Add to the calendar": "Di salnameyê de zêde bike" } diff --git a/translations/oc.json b/translations/oc.json index d8f72b430..dc898e1e4 100644 --- a/translations/oc.json +++ b/translations/oc.json @@ -486,5 +486,6 @@ "Leave": "Leave", "System Monitor": "System Monitor", "Add content warnings for the following sites": "Add content warnings for the following sites", - "Known Web Crawlers": "Known Web Crawlers" + "Known Web Crawlers": "Known Web Crawlers", + "Add to the calendar": "Add to the calendar" } diff --git a/translations/pt.json b/translations/pt.json index b1056b4f4..936c7f095 100644 --- a/translations/pt.json +++ b/translations/pt.json @@ -490,5 +490,6 @@ "Leave": "Sair", "System Monitor": "Monitor de Sistema", "Add content warnings for the following sites": "Adicione avisos de conteúdo para os seguintes sites", - "Known Web Crawlers": "Rastreadores da Web conhecidos" + "Known Web Crawlers": "Rastreadores da Web conhecidos", + "Add to the calendar": "Adicionar ao calendário" } diff --git a/translations/ru.json b/translations/ru.json index eb71190d0..bb92161d9 100644 --- a/translations/ru.json +++ b/translations/ru.json @@ -490,5 +490,6 @@ "Leave": "Оставлять", "System Monitor": "Системный монитор", "Add content warnings for the following sites": "Добавить предупреждения о содержании для следующих сайтов", - "Known Web Crawlers": "Известные веб-сканеры" + "Known Web Crawlers": "Известные веб-сканеры", + "Add to the calendar": "Добавить в календарь" } diff --git a/translations/sw.json b/translations/sw.json index a7e078946..aace5f87e 100644 --- a/translations/sw.json +++ b/translations/sw.json @@ -490,5 +490,6 @@ "Leave": "Ondoka", "System Monitor": "Ufuatiliaji wa Mfumo", "Add content warnings for the following sites": "Ongeza maonyo ya yaliyomo kwa wavuti zifuatazo", - "Known Web Crawlers": "Watambaji Wavuti Wanaojulikana" + "Known Web Crawlers": "Watambaji Wavuti Wanaojulikana", + "Add to the calendar": "Ongeza kwenye kalenda" } diff --git a/translations/zh.json b/translations/zh.json index 3be4afa78..bde6635db 100644 --- a/translations/zh.json +++ b/translations/zh.json @@ -490,5 +490,6 @@ "Leave": "离开", "System Monitor": "系统监视器", "Add content warnings for the following sites": "为以下网站添加内容警告", - "Known Web Crawlers": "已知的网络爬虫" + "Known Web Crawlers": "已知的网络爬虫", + "Add to the calendar": "添加到日历" } diff --git a/webapp_calendar.py b/webapp_calendar.py index 161cd63b1..84f767939 100644 --- a/webapp_calendar.py +++ b/webapp_calendar.py @@ -453,4 +453,12 @@ def htmlCalendar(personCache: {}, cssCache: {}, translate: {}, htmlKeyboardNavigation(textModeBanner, navLinks, navAccessKeys, monthName) - return headerStr + screenReaderCal + calendarStr + htmlFooter() + newEventStr = \ + '
\n

\n' + \ + '📅 ' + \ + translate['Add to the calendar'] + '\n

\n
\n' + + calStr = \ + headerStr + screenReaderCal + calendarStr + newEventStr + htmlFooter() + + return calStr From 2124c0dbb4de6a4dd65f889c516c20ea30858c3c Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Wed, 3 Nov 2021 16:43:41 +0000 Subject: [PATCH 11/16] Extra line --- webapp_calendar.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/webapp_calendar.py b/webapp_calendar.py index 84f767939..faecd091f 100644 --- a/webapp_calendar.py +++ b/webapp_calendar.py @@ -454,7 +454,7 @@ def htmlCalendar(personCache: {}, cssCache: {}, translate: {}, monthName) newEventStr = \ - '
\n

\n' + \ + '

\n

\n' + \ '📅 ' + \ translate['Add to the calendar'] + '\n

\n
\n' From 8ff4b1fd745c22da786f29779ebf871791d2edfe Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Wed, 3 Nov 2021 16:44:34 +0000 Subject: [PATCH 12/16] Tidying --- webapp_calendar.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/webapp_calendar.py b/webapp_calendar.py index faecd091f..d16c596cd 100644 --- a/webapp_calendar.py +++ b/webapp_calendar.py @@ -284,9 +284,10 @@ def htmlCalendar(personCache: {}, cssCache: {}, translate: {}, setCustomBackground(baseDir, 'calendar-background', 'calendar-background') - months = ('January', 'February', 'March', 'April', - 'May', 'June', 'July', 'August', 'September', - 'October', 'November', 'December') + months = ( + 'January', 'February', 'March', 'April', 'May', 'June', + 'July', 'August', 'September', 'October', 'November', 'December' + ) monthName = translate[months[monthNumber - 1]] if dayNumber: From ebc9c02e6e0ddc7445436db822b22f2dafbd227e Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Wed, 3 Nov 2021 16:50:22 +0000 Subject: [PATCH 13/16] Calendar font size --- epicyon-calendar.css | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/epicyon-calendar.css b/epicyon-calendar.css index a1fb0f9be..ffed3df26 100644 --- a/epicyon-calendar.css +++ b/epicyon-calendar.css @@ -19,6 +19,8 @@ --calendar-horizontal-padding: 0; --calendar-cell-size: 1.5vw; --calendar-cell-size-mobile: 1.5vw; + --font-size-calendar: 20px; + --font-size-calendar-mobile: 30px; --font-size-calendar-header: 3rem; --font-size-calendar-day: 1rem; --font-size-calendar-cell: 2rem; @@ -248,6 +250,9 @@ tr:nth-child(even) > .calendar__day__cell:nth-child(even) { .calendar__day__cell { padding: var(--calendar-cell-size) 0 var(--calendar-cell-size); } + body { + font-size: var(--font-size-calendar); + } } @media screen and (max-width: 1000px) { @@ -265,4 +270,7 @@ tr:nth-child(even) > .calendar__day__cell:nth-child(even) { .calendar__day__cell { padding: var(--calendar-cell-size-mobile) 0 var(--calendar-cell-size-mobile); } + body { + font-size: var(--font-size-calendar-mobile); + } } From 023300c0c50bdfd2db0aa2a7814b35d4e047201d Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Wed, 3 Nov 2021 16:55:14 +0000 Subject: [PATCH 14/16] Plus symbol --- webapp_calendar.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/webapp_calendar.py b/webapp_calendar.py index d16c596cd..2fc19edfa 100644 --- a/webapp_calendar.py +++ b/webapp_calendar.py @@ -456,7 +456,7 @@ def htmlCalendar(personCache: {}, cssCache: {}, translate: {}, newEventStr = \ '
\n

\n' + \ - '📅 ' + \ + '➕ ' + \ translate['Add to the calendar'] + '\n

\n
\n' calStr = \ From 76daecd095e6e4e8c0c1d78f9bca952105d0071a Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Wed, 3 Nov 2021 17:02:46 +0000 Subject: [PATCH 15/16] Newline --- webapp_create_post.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/webapp_create_post.py b/webapp_create_post.py index 90b9b046d..079f1d92c 100644 --- a/webapp_create_post.py +++ b/webapp_create_post.py @@ -313,7 +313,7 @@ def htmlNewPost(cssCache: {}, mediaInstance: bool, translate: {}, for currPostType in newPostEndpoints: pathBase = pathBase.replace('/' + currPostType, '') - newPostImageSection = '
' + newPostImageSection = '
\n' newPostImageSection += \ editTextField(translate['Image description'], 'imageDescription', '') From 487e9685d0e6181085af9151dd230bd78199d870 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Wed, 3 Nov 2021 17:07:02 +0000 Subject: [PATCH 16/16] New post style --- epicyon-profile.css | 27 ++++++++++++++++++++------- 1 file changed, 20 insertions(+), 7 deletions(-) diff --git a/epicyon-profile.css b/epicyon-profile.css index 192d648fd..5580786be 100644 --- a/epicyon-profile.css +++ b/epicyon-profile.css @@ -513,13 +513,6 @@ a:focus { color: var(--button-text-hover); } -.containerNewPost { - border: var(--border-width) solid var(--border-color); - border-radius: var(--timeline-border-radius); - background-color: var(--main-bg-color); - margin: var(--vertical-between-posts); -} - .containerSubmitNewPost { border: 0; background-color: var(--main-bg-color); @@ -1058,6 +1051,16 @@ div.container { padding-bottom: var(--container-padding-bottom); margin: var(--vertical-between-posts); } + .containerNewPost { + border: var(--border-width) solid var(--border-color); + background-color: var(--main-bg-color); + border-radius: var(--timeline-border-radius); + padding-left: var(--container-padding); + padding-right: var(--container-padding); + padding-top: var(--container-padding); + padding-bottom: var(--container-padding-bottom); + margin: var(--vertical-between-posts); + } h3.linksHeader { background-color: var(--column-left-header-background); color: var(--column-left-header-color); @@ -1754,6 +1757,16 @@ div.container { padding-bottom: var(--container-padding-bottom-mobile); margin: var(--vertical-between-posts); } + .containerNewPost { + border: var(--border-width) solid var(--border-color); + background-color: var(--main-bg-color); + border-radius: var(--timeline-border-radius); + padding-left: var(--container-padding); + padding-right: var(--container-padding); + padding-top: var(--container-padding); + padding-bottom: var(--container-padding-bottom-mobile); + margin: var(--vertical-between-posts); + } h3.linksHeader { background-color: var(--column-left-header-background); color: var(--column-left-header-color);