diff --git a/daemon.py b/daemon.py index 79566d31e..21e156be7 100644 --- a/daemon.py +++ b/daemon.py @@ -154,6 +154,7 @@ from blog import htmlBlogPage from blog import htmlBlogPost from blog import htmlEditBlog from blog import getBlogAddress +from webapp_themeDesigner import htmlThemeDesigner from webapp_minimalbutton import setMinimal from webapp_minimalbutton import isMinimal from webapp_utils import getAvatarImageUrl @@ -10849,6 +10850,7 @@ class PubServer(BaseHTTPRequestHandler): currNickname = currNickname.split('/')[0] moderator = isModerator(baseDir, currNickname) editor = isEditor(baseDir, currNickname) + artist = isArtist(baseDir, currNickname) fullWidthTimelineButtonHeader = \ self.server.fullWidthTimelineButtonHeader minimalNick = isMinimal(baseDir, domain, nickname) @@ -10881,7 +10883,7 @@ class PubServer(BaseHTTPRequestHandler): self.server.twitterReplacementDomain, self.server.showPublishedDateOnly, self.server.newswire, - moderator, editor, + moderator, editor, artist, self.server.positiveVoting, self.server.showPublishAsIcon, fullWidthTimelineButtonHeader, @@ -14363,6 +14365,32 @@ class PubServer(BaseHTTPRequestHandler): self.server.debug) return + if htmlGET and usersInPath and authorized and \ + self.path.endswith('/themedesigner'): + nickname = self.path.split('/users/')[1] + if '/' in nickname: + nickname = nickname.split('/')[0] + + if not isArtist(self.server.baseDir, nickname): + self._403() + return + + msg = \ + htmlThemeDesigner(self.server.cssCache, + self.server.baseDir, + nickname, self.server.domain, + self.server.translate, + self.server.defaultTimeline, + self.server.themeName) + msg = msg.encode('utf-8') + msglen = len(msg) + self._login_headers('text/html', msglen, callingDomain) + self._write(msg) + fitnessPerformance(GETstartTime, self.server.fitness, + '_GET', 'show theme designer screen', + self.server.debug) + return + fitnessPerformance(GETstartTime, self.server.fitness, '_GET', 'show about screen done', self.server.debug) @@ -18330,6 +18358,7 @@ def runDaemon(contentLicenseUrl: str, 'enterNotes': 'n', 'menuTimeline': 't', 'menuEdit': 'e', + 'menuThemeDesigner': 'z', 'menuProfile': 'p', 'menuInbox': 'i', 'menuSearch': '/', diff --git a/theme/blue/icons/theme.png b/theme/blue/icons/theme.png new file mode 100644 index 000000000..582cca0e2 Binary files /dev/null and b/theme/blue/icons/theme.png differ diff --git a/theme/debian/icons/theme.png b/theme/debian/icons/theme.png new file mode 100644 index 000000000..582cca0e2 Binary files /dev/null and b/theme/debian/icons/theme.png differ diff --git a/theme/default/icons/theme.png b/theme/default/icons/theme.png new file mode 100644 index 000000000..582cca0e2 Binary files /dev/null and b/theme/default/icons/theme.png differ diff --git a/theme/hacker/icons/theme.png b/theme/hacker/icons/theme.png new file mode 100644 index 000000000..56c199451 Binary files /dev/null and b/theme/hacker/icons/theme.png differ diff --git a/theme/henge/icons/theme.png b/theme/henge/icons/theme.png new file mode 100644 index 000000000..11aeabe1f Binary files /dev/null and b/theme/henge/icons/theme.png differ diff --git a/theme/indymediaclassic/icons/theme.png b/theme/indymediaclassic/icons/theme.png new file mode 100644 index 000000000..cde1e634f Binary files /dev/null and b/theme/indymediaclassic/icons/theme.png differ diff --git a/theme/indymediamodern/icons/theme.png b/theme/indymediamodern/icons/theme.png new file mode 100644 index 000000000..dda60a3dd Binary files /dev/null and b/theme/indymediamodern/icons/theme.png differ diff --git a/theme/lcd/icons/theme.png b/theme/lcd/icons/theme.png new file mode 100644 index 000000000..2fd9398c3 Binary files /dev/null and b/theme/lcd/icons/theme.png differ diff --git a/theme/light/icons/theme.png b/theme/light/icons/theme.png new file mode 100644 index 000000000..d29e0b7b2 Binary files /dev/null and b/theme/light/icons/theme.png differ diff --git a/theme/night/icons/theme.png b/theme/night/icons/theme.png new file mode 100644 index 000000000..582cca0e2 Binary files /dev/null and b/theme/night/icons/theme.png differ diff --git a/theme/pixel/icons/theme.png b/theme/pixel/icons/theme.png new file mode 100644 index 000000000..8a976ae6f Binary files /dev/null and b/theme/pixel/icons/theme.png differ diff --git a/theme/purple/icons/theme.png b/theme/purple/icons/theme.png new file mode 100644 index 000000000..29edd3cd5 Binary files /dev/null and b/theme/purple/icons/theme.png differ diff --git a/theme/rc3/icons/theme.png b/theme/rc3/icons/theme.png new file mode 100644 index 000000000..b85a3f0c0 Binary files /dev/null and b/theme/rc3/icons/theme.png differ diff --git a/theme/solidaric/icons/theme.png b/theme/solidaric/icons/theme.png new file mode 100644 index 000000000..5e067f572 Binary files /dev/null and b/theme/solidaric/icons/theme.png differ diff --git a/theme/starlight/icons/theme.png b/theme/starlight/icons/theme.png new file mode 100644 index 000000000..16ec012ce Binary files /dev/null and b/theme/starlight/icons/theme.png differ diff --git a/theme/zen/icons/theme.png b/theme/zen/icons/theme.png new file mode 100644 index 000000000..042af0260 Binary files /dev/null and b/theme/zen/icons/theme.png differ diff --git a/translations/ar.json b/translations/ar.json index 6be457d55..c6f23ac8d 100644 --- a/translations/ar.json +++ b/translations/ar.json @@ -498,5 +498,6 @@ "Select reaction": "حدد رد الفعل", "Don't show the Reaction button": "لا تظهر زر رد الفعل", "New feed URL": "موجز جديد URL", - "New link title and URL": "عنوان الارتباط الجديد وعنوان URL" + "New link title and URL": "عنوان الارتباط الجديد وعنوان URL", + "Theme Designer": "مصمم المظهر" } diff --git a/translations/ca.json b/translations/ca.json index eff74f19f..30485a60a 100644 --- a/translations/ca.json +++ b/translations/ca.json @@ -498,5 +498,6 @@ "Select reaction": "Seleccioneu la reacció", "Don't show the Reaction button": "No mostris el botó de reacció", "New feed URL": "URL de feed nou", - "New link title and URL": "Títol i URL de l'enllaç nous" + "New link title and URL": "Títol i URL de l'enllaç nous", + "Theme Designer": "Dissenyador temàtic" } diff --git a/translations/cy.json b/translations/cy.json index 1f581c474..93db171d7 100644 --- a/translations/cy.json +++ b/translations/cy.json @@ -498,5 +498,6 @@ "Select reaction": "Dewiswch adwaith", "Don't show the Reaction button": "Peidiwch â dangos y botwm Adwaith", "New feed URL": "URL porthiant newydd", - "New link title and URL": "Teitl dolen ac URL newydd" + "New link title and URL": "Teitl dolen ac URL newydd", + "Theme Designer": "Dylunydd Thema" } diff --git a/translations/de.json b/translations/de.json index 32ecda261..2895e5151 100644 --- a/translations/de.json +++ b/translations/de.json @@ -498,5 +498,6 @@ "Select reaction": "Reaktion auswählen", "Don't show the Reaction button": "Reaktionstaste nicht anzeigen", "New feed URL": "Neue Feed-URL", - "New link title and URL": "Neuer Linktitel und URL" + "New link title and URL": "Neuer Linktitel und URL", + "Theme Designer": "Themendesigner" } diff --git a/translations/en.json b/translations/en.json index 69b356595..04686722d 100644 --- a/translations/en.json +++ b/translations/en.json @@ -498,5 +498,6 @@ "Select reaction": "Select reaction", "Don't show the Reaction button": "Don't show the Reaction button", "New feed URL": "New feed URL", - "New link title and URL": "New link title and URL" + "New link title and URL": "New link title and URL", + "Theme Designer": "Theme Designer" } diff --git a/translations/es.json b/translations/es.json index abefe5114..7caf8cb01 100644 --- a/translations/es.json +++ b/translations/es.json @@ -498,5 +498,6 @@ "Select reaction": "Seleccionar reacción", "Don't show the Reaction button": "No mostrar el botón de reacción", "New feed URL": "URL de nuevo feed", - "New link title and URL": "Nuevo título de enlace y URL" + "New link title and URL": "Nuevo título de enlace y URL", + "Theme Designer": "Diseñadora de temas" } diff --git a/translations/fr.json b/translations/fr.json index ddeeec4ff..bf554f562 100644 --- a/translations/fr.json +++ b/translations/fr.json @@ -498,5 +498,6 @@ "Select reaction": "Sélectionnez la réaction", "Don't show the Reaction button": "Ne pas afficher le bouton Réaction", "New feed URL": "Nouvelle URL de flux", - "New link title and URL": "Nouveau titre et URL du lien" + "New link title and URL": "Nouveau titre et URL du lien", + "Theme Designer": "Concepteur de thème" } diff --git a/translations/ga.json b/translations/ga.json index f4a56899c..a6d60229f 100644 --- a/translations/ga.json +++ b/translations/ga.json @@ -498,5 +498,6 @@ "Select reaction": "Roghnaigh imoibriú", "Don't show the Reaction button": "Ná taispeáin an cnaipe Imoibriú", "New feed URL": "URL beathaithe nua", - "New link title and URL": "Teideal nasc nua agus URL" + "New link title and URL": "Teideal nasc nua agus URL", + "Theme Designer": "Dearthóir Téama" } diff --git a/translations/hi.json b/translations/hi.json index a84efb9ba..49170c32b 100644 --- a/translations/hi.json +++ b/translations/hi.json @@ -498,5 +498,6 @@ "Select reaction": "प्रतिक्रिया का चयन करें", "Don't show the Reaction button": "प्रतिक्रिया बटन न दिखाएं", "New feed URL": "नया फ़ीड URL", - "New link title and URL": "नया लिंक शीर्षक और URL" + "New link title and URL": "नया लिंक शीर्षक और URL", + "Theme Designer": "थीम डिजाइनर" } diff --git a/translations/it.json b/translations/it.json index aef9a5bc8..432b6894d 100644 --- a/translations/it.json +++ b/translations/it.json @@ -498,5 +498,6 @@ "Select reaction": "Seleziona reazione", "Don't show the Reaction button": "Non mostrare il pulsante Reazione", "New feed URL": "Nuovo URL del feed", - "New link title and URL": "Nuovo titolo e URL del collegamento" + "New link title and URL": "Nuovo titolo e URL del collegamento", + "Theme Designer": "Progettista di temi" } diff --git a/translations/ja.json b/translations/ja.json index 0c3931b82..09c263667 100644 --- a/translations/ja.json +++ b/translations/ja.json @@ -498,5 +498,6 @@ "Select reaction": "反応を選択", "Don't show the Reaction button": "反応ボタンを表示しない", "New feed URL": "新しいフィードURL", - "New link title and URL": "新しいリンクのタイトルとURL" + "New link title and URL": "新しいリンクのタイトルとURL", + "Theme Designer": "テーマデザイナー" } diff --git a/translations/ku.json b/translations/ku.json index 2e2734eaa..3131bed1f 100644 --- a/translations/ku.json +++ b/translations/ku.json @@ -498,5 +498,6 @@ "Select reaction": "Reaksiyonê hilbijêrin", "Don't show the Reaction button": "Bişkoka Reaksiyonê nîşan nede", "New feed URL": "URL-ya feed nû", - "New link title and URL": "Sernav û URL-ya girêdana nû" + "New link title and URL": "Sernav û URL-ya girêdana nû", + "Theme Designer": "Theme Designer" } diff --git a/translations/oc.json b/translations/oc.json index 06ba6a7c7..a6201995b 100644 --- a/translations/oc.json +++ b/translations/oc.json @@ -494,5 +494,6 @@ "Select reaction": "Select reaction", "Don't show the Reaction button": "Don't show the Reaction button", "New feed URL": "New feed URL", - "New link title and URL": "New link title and URL" + "New link title and URL": "New link title and URL", + "Theme Designer": "Theme Designer" } diff --git a/translations/pt.json b/translations/pt.json index c94d0ce55..165aaec3c 100644 --- a/translations/pt.json +++ b/translations/pt.json @@ -498,5 +498,6 @@ "Select reaction": "Selecione a reação", "Don't show the Reaction button": "Não mostrar o botão de reação", "New feed URL": "Novo URL de feed", - "New link title and URL": "Novo título e URL do link" + "New link title and URL": "Novo título e URL do link", + "Theme Designer": "Designer de Tema" } diff --git a/translations/ru.json b/translations/ru.json index 8a35c0d59..34e694884 100644 --- a/translations/ru.json +++ b/translations/ru.json @@ -498,5 +498,6 @@ "Select reaction": "Выберите реакцию", "Don't show the Reaction button": "Не показывать кнопку реакции", "New feed URL": "URL нового канала", - "New link title and URL": "Новое название ссылки и URL" + "New link title and URL": "Новое название ссылки и URL", + "Theme Designer": "Дизайнер тем" } diff --git a/translations/sw.json b/translations/sw.json index 63b5b571c..36805799f 100644 --- a/translations/sw.json +++ b/translations/sw.json @@ -498,5 +498,6 @@ "Select reaction": "Chagua majibu", "Don't show the Reaction button": "Usionyeshe kitufe cha Majibu", "New feed URL": "URL mpya ya mipasho", - "New link title and URL": "Kichwa kipya cha kiungo na URL" + "New link title and URL": "Kichwa kipya cha kiungo na URL", + "Theme Designer": "Mbuni wa Mandhari" } diff --git a/translations/zh.json b/translations/zh.json index d7cf7ddd7..67ff91f31 100644 --- a/translations/zh.json +++ b/translations/zh.json @@ -498,5 +498,6 @@ "Select reaction": "选择反应", "Don't show the Reaction button": "不显示“反应”按钮", "New feed URL": "新供稿网址", - "New link title and URL": "新链接标题和 URL" + "New link title and URL": "新链接标题和 URL", + "Theme Designer": "主题设计师" } diff --git a/webapp_column_left.py b/webapp_column_left.py index 333f48ee9..bbdf93d5d 100644 --- a/webapp_column_left.py +++ b/webapp_column_left.py @@ -11,6 +11,7 @@ import os from utils import getConfigParam from utils import getNicknameFromActor from utils import isEditor +from utils import isArtist from utils import removeDomainPort from utils import localActorUrl from webapp_utils import sharesTimelineJson @@ -113,7 +114,7 @@ def _getLeftColumnWanted(baseDir: str, def getLeftColumnContent(baseDir: str, nickname: str, domainFull: str, httpPrefix: str, translate: {}, - editor: bool, + editor: bool, artist: bool, showBackButton: bool, timelinePath: str, rssIconAtTop: bool, showHeaderImage: bool, frontPage: bool, theme: str, @@ -154,6 +155,7 @@ def getLeftColumnContent(baseDir: str, nickname: str, domainFull: str, htmlStr += '\n