diff --git a/Makefile b/Makefile index 034be8abb..7a54fd9db 100644 --- a/Makefile +++ b/Makefile @@ -17,6 +17,9 @@ source: clean: rm -f *.*~ *~ *.dot rm -f orgs/*~ + rm -f defaultwelcome/*~ + rm -f theme/indymediaclassic/welcome/*~ + rm -f theme/indymediamodern/welcome/*~ rm -f website/EN/*~ rm -f gemini/EN/*~ rm -f scripts/*~ diff --git a/daemon.py b/daemon.py index cb1c75e2d..0cfd5a2ca 100644 --- a/daemon.py +++ b/daemon.py @@ -239,6 +239,7 @@ from cache import checkForChangedActor from cache import storePersonInCache from cache import getPersonFromCache from httpsig import verifyPostHeaders +from theme import isNewsThemeName from theme import getTextModeBanner from theme import setNewsAvatar from theme import setTheme @@ -3898,7 +3899,8 @@ class PubServer(BaseHTTPRequestHandler): baseDir: str, httpPrefix: str, domain: str, domainFull: str, onionDomain: str, i2pDomain: str, - debug: bool, allowLocalNetworkAccess: bool) -> None: + debug: bool, allowLocalNetworkAccess: bool, + systemLanguage: str) -> None: """Updates your user profile after editing via the Edit button on the profile screen """ @@ -4227,6 +4229,11 @@ class PubServer(BaseHTTPRequestHandler): "mediaInstance", self.server.mediaInstance) + # is this a news theme? + if isNewsThemeName(self.server.baseDir, + self.server.themeName): + fields['newsInstance'] = 'on' + # change news instance status if fields.get('newsInstance'): self.server.newsInstance = False @@ -4283,7 +4290,7 @@ class PubServer(BaseHTTPRequestHandler): if fields.get('themeDropdown'): self.server.themeName = fields['themeDropdown'] setTheme(baseDir, self.server.themeName, domain, - allowLocalNetworkAccess) + allowLocalNetworkAccess, systemLanguage) self.server.textModeBanner = \ getTextModeBanner(self.server.baseDir) self.server.iconsCache = {} @@ -4753,7 +4760,8 @@ class PubServer(BaseHTTPRequestHandler): if currTheme: self.server.themeName = currTheme setTheme(baseDir, currTheme, domain, - self.server.allowLocalNetworkAccess) + self.server.allowLocalNetworkAccess, + systemLanguage) self.server.textModeBanner = \ getTextModeBanner(self.server.baseDir) self.server.iconsCache = {} @@ -10800,7 +10808,8 @@ class PubServer(BaseHTTPRequestHandler): msg = \ htmlWelcomeScreen(self.server.baseDir, nickname, self.server.systemLanguage, - self.server.translate) + self.server.translate, + self.server.themeName) msg = msg.encode('utf-8') msglen = len(msg) self._login_headers('text/html', msglen, callingDomain) @@ -10827,7 +10836,8 @@ class PubServer(BaseHTTPRequestHandler): self.server.httpPrefix, self.server.domainFull, self.server.systemLanguage, - self.server.translate) + self.server.translate, + self.server.themeName) msg = msg.encode('utf-8') msglen = len(msg) self._login_headers('text/html', msglen, callingDomain) @@ -10854,7 +10864,8 @@ class PubServer(BaseHTTPRequestHandler): self.server.httpPrefix, self.server.domainFull, self.server.systemLanguage, - self.server.translate) + self.server.translate, + self.server.themeName) msg = msg.encode('utf-8') msglen = len(msg) self._login_headers('text/html', msglen, callingDomain) @@ -13534,7 +13545,8 @@ class PubServer(BaseHTTPRequestHandler): self.server.domainFull, self.server.onionDomain, self.server.i2pDomain, self.server.debug, - self.server.allowLocalNetworkAccess) + self.server.allowLocalNetworkAccess, + self.server.systemLanguage) return if authorized and self.path.endswith('/linksdata'): @@ -14271,14 +14283,6 @@ def runDaemon(brochMode: bool, httpd.i2pDomain = i2pDomain httpd.mediaInstance = mediaInstance httpd.blogsInstance = blogsInstance - httpd.newsInstance = newsInstance - httpd.defaultTimeline = 'inbox' - if mediaInstance: - httpd.defaultTimeline = 'tlmedia' - if blogsInstance: - httpd.defaultTimeline = 'tlblogs' - if newsInstance: - httpd.defaultTimeline = 'tlfeatures' # load translations dictionary httpd.translate = {} @@ -14442,6 +14446,18 @@ def runDaemon(brochMode: bool, httpd.themeName = getConfigParam(baseDir, 'theme') if not httpd.themeName: httpd.themeName = 'default' + if isNewsThemeName(baseDir, httpd.themeName): + newsInstance = True + + httpd.newsInstance = newsInstance + httpd.defaultTimeline = 'inbox' + if mediaInstance: + httpd.defaultTimeline = 'tlmedia' + if blogsInstance: + httpd.defaultTimeline = 'tlblogs' + if newsInstance: + httpd.defaultTimeline = 'tlfeatures' + setNewsAvatar(baseDir, httpd.themeName, httpPrefix, diff --git a/defaultwelcome/help_tlblogs_en.md b/defaultwelcome/help_tlblogs_en.md new file mode 100644 index 000000000..0636712b4 --- /dev/null +++ b/defaultwelcome/help_tlblogs_en.md @@ -0,0 +1,5 @@ +This timeline contains any blogs written by you or anyone that you're following. + +You can create a new blog post using the **publish** icon at the top of the right column. + +Blog posts are different from ordinary fediverse posts. They use the ActivityPub *Article* type, which is intended for long-form writing. They can also have citations, selected from items in the newswire. diff --git a/epicyon.py b/epicyon.py index 5b5d01b8b..ea958dd75 100644 --- a/epicyon.py +++ b/epicyon.py @@ -2325,7 +2325,8 @@ if YTDomain: if '.' in YTDomain: args.YTReplacementDomain = YTDomain -if setTheme(baseDir, themeName, domain, args.allowLocalNetworkAccess): +if setTheme(baseDir, themeName, domain, + args.allowLocalNetworkAccess, args.language): print('Theme set to ' + themeName) if __name__ == "__main__": diff --git a/theme.py b/theme.py index 008d0a7f3..de444a90f 100644 --- a/theme.py +++ b/theme.py @@ -23,6 +23,15 @@ def _getThemeFiles() -> []: 'welcome.css') +def isNewsThemeName(baseDir: str, themeName: str) -> bool: + """Returns true if the given theme is a news instance + """ + themeDir = baseDir + '/theme/' + themeName + if os.path.isfile(themeDir + '/is_news_instance'): + return True + return False + + def getThemesList(baseDir: str) -> []: """Returns the list of available themes Note that these should be capitalized, since they're @@ -41,6 +50,29 @@ def getThemesList(baseDir: str) -> []: return themes +def _copyThemeHelpFiles(baseDir: str, themeName: str, + systemLanguage: str) -> None: + """Copies any theme specific help files from the welcome subdirectory + """ + if not systemLanguage: + systemLanguage = 'en' + themeDir = baseDir + '/theme/' + themeName + '/welcome' + if not os.path.isdir(themeDir): + themeDir = baseDir + '/defaultwelcome' + for subdir, dirs, files in os.walk(themeDir): + for helpMarkdownFile in files: + if not helpMarkdownFile.endswith('_' + systemLanguage + '.md'): + continue + destHelpMarkdownFile = \ + helpMarkdownFile.replace('_' + systemLanguage + '.md', '.md') + if destHelpMarkdownFile == 'profile.md' or \ + destHelpMarkdownFile == 'final.md': + destHelpMarkdownFile = 'welcome_' + destHelpMarkdownFile + copyfile(themeDir + '/' + helpMarkdownFile, + baseDir + '/accounts/' + destHelpMarkdownFile) + break + + def _setThemeInConfig(baseDir: str, name: str) -> bool: """Sets the theme with the given name within config.json """ @@ -633,7 +665,7 @@ def _setClearCacheFlag(baseDir: str) -> None: def setTheme(baseDir: str, name: str, domain: str, - allowLocalNetworkAccess: bool) -> bool: + allowLocalNetworkAccess: bool, systemLanguage: str) -> bool: """Sets the theme with the given name as the current theme """ result = False @@ -686,6 +718,7 @@ def setTheme(baseDir: str, name: str, domain: str, else: disableGrayscale(baseDir) + _copyThemeHelpFiles(baseDir, name, systemLanguage) _setThemeInConfig(baseDir, name) _setClearCacheFlag(baseDir) return result diff --git a/theme/hacker/banner.png b/theme/hacker/banner.png index 5d181aa52..8abfb9f97 100644 Binary files a/theme/hacker/banner.png and b/theme/hacker/banner.png differ diff --git a/theme/hacker/helpimages/welcome.jpg b/theme/hacker/helpimages/welcome.jpg index 688320ac4..939c7b591 100644 Binary files a/theme/hacker/helpimages/welcome.jpg and b/theme/hacker/helpimages/welcome.jpg differ diff --git a/theme/hacker/icons/add.png b/theme/hacker/icons/add.png index c5b008fa1..3b1e726c0 100644 Binary files a/theme/hacker/icons/add.png and b/theme/hacker/icons/add.png differ diff --git a/theme/hacker/icons/avatar_default.png b/theme/hacker/icons/avatar_default.png index 66c11c47b..9c50078f5 100644 Binary files a/theme/hacker/icons/avatar_default.png and b/theme/hacker/icons/avatar_default.png differ diff --git a/theme/hacker/icons/avatar_news.png b/theme/hacker/icons/avatar_news.png index cc9b1a71c..0b5b4dd49 100644 Binary files a/theme/hacker/icons/avatar_news.png and b/theme/hacker/icons/avatar_news.png differ diff --git a/theme/hacker/icons/bookmark_inactive.png b/theme/hacker/icons/bookmark_inactive.png index f031d94d6..c96d9ca0f 100644 Binary files a/theme/hacker/icons/bookmark_inactive.png and b/theme/hacker/icons/bookmark_inactive.png differ diff --git a/theme/hacker/icons/calendar.png b/theme/hacker/icons/calendar.png index c70130d9f..856674c8a 100644 Binary files a/theme/hacker/icons/calendar.png and b/theme/hacker/icons/calendar.png differ diff --git a/theme/hacker/icons/categoriesrss.png b/theme/hacker/icons/categoriesrss.png index a746c2337..8085b431d 100644 Binary files a/theme/hacker/icons/categoriesrss.png and b/theme/hacker/icons/categoriesrss.png differ diff --git a/theme/hacker/icons/delete.png b/theme/hacker/icons/delete.png index 11977e1be..5ac4a3fb7 100644 Binary files a/theme/hacker/icons/delete.png and b/theme/hacker/icons/delete.png differ diff --git a/theme/hacker/icons/dm.png b/theme/hacker/icons/dm.png index 646c65a23..5e1331675 100644 Binary files a/theme/hacker/icons/dm.png and b/theme/hacker/icons/dm.png differ diff --git a/theme/hacker/icons/download.png b/theme/hacker/icons/download.png index c31d75b29..aa9067110 100644 Binary files a/theme/hacker/icons/download.png and b/theme/hacker/icons/download.png differ diff --git a/theme/hacker/icons/edit.png b/theme/hacker/icons/edit.png index 02ee8c7b3..ff6ade968 100644 Binary files a/theme/hacker/icons/edit.png and b/theme/hacker/icons/edit.png differ diff --git a/theme/hacker/icons/like_inactive.png b/theme/hacker/icons/like_inactive.png index adc5b1855..6dcf4ee89 100644 Binary files a/theme/hacker/icons/like_inactive.png and b/theme/hacker/icons/like_inactive.png differ diff --git a/theme/hacker/icons/links.png b/theme/hacker/icons/links.png index 965033d5c..90df1fad5 100644 Binary files a/theme/hacker/icons/links.png and b/theme/hacker/icons/links.png differ diff --git a/theme/hacker/icons/logorss.png b/theme/hacker/icons/logorss.png index 4d9db882c..a8eff40dd 100644 Binary files a/theme/hacker/icons/logorss.png and b/theme/hacker/icons/logorss.png differ diff --git a/theme/hacker/icons/logout.png b/theme/hacker/icons/logout.png index 8ae5bee69..901334b00 100644 Binary files a/theme/hacker/icons/logout.png and b/theme/hacker/icons/logout.png differ diff --git a/theme/hacker/icons/mute.png b/theme/hacker/icons/mute.png index 6969e74d3..cce158ecf 100644 Binary files a/theme/hacker/icons/mute.png and b/theme/hacker/icons/mute.png differ diff --git a/theme/hacker/icons/newpost.png b/theme/hacker/icons/newpost.png index d5017855b..aa3aaf679 100644 Binary files a/theme/hacker/icons/newpost.png and b/theme/hacker/icons/newpost.png differ diff --git a/theme/hacker/icons/newswire.png b/theme/hacker/icons/newswire.png index 1ca69d635..245d044b3 100644 Binary files a/theme/hacker/icons/newswire.png and b/theme/hacker/icons/newswire.png differ diff --git a/theme/hacker/icons/pagedown.png b/theme/hacker/icons/pagedown.png index e1027f9a8..4eb89a48f 100644 Binary files a/theme/hacker/icons/pagedown.png and b/theme/hacker/icons/pagedown.png differ diff --git a/theme/hacker/icons/pageup.png b/theme/hacker/icons/pageup.png index 1b4ce3216..06140dfdc 100644 Binary files a/theme/hacker/icons/pageup.png and b/theme/hacker/icons/pageup.png differ diff --git a/theme/hacker/icons/prev.png b/theme/hacker/icons/prev.png index 0c7a3ecbf..f9c50964c 100644 Binary files a/theme/hacker/icons/prev.png and b/theme/hacker/icons/prev.png differ diff --git a/theme/hacker/icons/publish.png b/theme/hacker/icons/publish.png index 6cd724fd8..194180c27 100644 Binary files a/theme/hacker/icons/publish.png and b/theme/hacker/icons/publish.png differ diff --git a/theme/hacker/icons/repeat_inactive.png b/theme/hacker/icons/repeat_inactive.png index a08227403..e9da71aa3 100644 Binary files a/theme/hacker/icons/repeat_inactive.png and b/theme/hacker/icons/repeat_inactive.png differ diff --git a/theme/hacker/icons/reply.png b/theme/hacker/icons/reply.png index c0b3fb8f2..1cc0ac457 100644 Binary files a/theme/hacker/icons/reply.png and b/theme/hacker/icons/reply.png differ diff --git a/theme/hacker/icons/scope_blog.png b/theme/hacker/icons/scope_blog.png index 6cd724fd8..cbeec5c3c 100644 Binary files a/theme/hacker/icons/scope_blog.png and b/theme/hacker/icons/scope_blog.png differ diff --git a/theme/hacker/icons/scope_dm.png b/theme/hacker/icons/scope_dm.png index ca11f79a9..160f7c2c8 100644 Binary files a/theme/hacker/icons/scope_dm.png and b/theme/hacker/icons/scope_dm.png differ diff --git a/theme/hacker/icons/scope_event.png b/theme/hacker/icons/scope_event.png index c70130d9f..856674c8a 100644 Binary files a/theme/hacker/icons/scope_event.png and b/theme/hacker/icons/scope_event.png differ diff --git a/theme/hacker/icons/scope_followers.png b/theme/hacker/icons/scope_followers.png index dd19c92f5..4f0854aa1 100644 Binary files a/theme/hacker/icons/scope_followers.png and b/theme/hacker/icons/scope_followers.png differ diff --git a/theme/hacker/icons/scope_public.png b/theme/hacker/icons/scope_public.png index dc8d371b0..80f7f4af2 100644 Binary files a/theme/hacker/icons/scope_public.png and b/theme/hacker/icons/scope_public.png differ diff --git a/theme/hacker/icons/scope_question.png b/theme/hacker/icons/scope_question.png index 846d11e21..9010c548c 100644 Binary files a/theme/hacker/icons/scope_question.png and b/theme/hacker/icons/scope_question.png differ diff --git a/theme/hacker/icons/scope_reminder.png b/theme/hacker/icons/scope_reminder.png index ac56a4c4f..644071bd0 100644 Binary files a/theme/hacker/icons/scope_reminder.png and b/theme/hacker/icons/scope_reminder.png differ diff --git a/theme/hacker/icons/scope_report.png b/theme/hacker/icons/scope_report.png index a3e0952a5..4fd8bb059 100644 Binary files a/theme/hacker/icons/scope_report.png and b/theme/hacker/icons/scope_report.png differ diff --git a/theme/hacker/icons/scope_share.png b/theme/hacker/icons/scope_share.png index 250b2bc39..d44b708e4 100644 Binary files a/theme/hacker/icons/scope_share.png and b/theme/hacker/icons/scope_share.png differ diff --git a/theme/hacker/icons/scope_unlisted.png b/theme/hacker/icons/scope_unlisted.png index 31fd5402b..34d5407ed 100644 Binary files a/theme/hacker/icons/scope_unlisted.png and b/theme/hacker/icons/scope_unlisted.png differ diff --git a/theme/hacker/icons/search.png b/theme/hacker/icons/search.png index 7317eeb13..a9a7552f5 100644 Binary files a/theme/hacker/icons/search.png and b/theme/hacker/icons/search.png differ diff --git a/theme/hacker/icons/showhide.png b/theme/hacker/icons/showhide.png index 0c7a3ecbf..082225dae 100644 Binary files a/theme/hacker/icons/showhide.png and b/theme/hacker/icons/showhide.png differ diff --git a/theme/hacker/image.png b/theme/hacker/image.png index 2976fa338..6006b96fb 100644 Binary files a/theme/hacker/image.png and b/theme/hacker/image.png differ diff --git a/theme/hacker/search_banner.png b/theme/hacker/search_banner.png index 5d181aa52..8abfb9f97 100644 Binary files a/theme/hacker/search_banner.png and b/theme/hacker/search_banner.png differ diff --git a/theme/hacker/theme.json b/theme/hacker/theme.json index b4ceed266..7c2b120dd 100644 --- a/theme/hacker/theme.json +++ b/theme/hacker/theme.json @@ -18,14 +18,14 @@ "main-bg-color-reply": "#030202", "main-bg-color-report": "#050202", "main-header-color-roles": "#1f192d", - "cw-color": "#00ff00", - "main-fg-color": "#00ff00", - "login-fg-color": "#00ff00", - "welcome-fg-color": "#00ff00", - "options-fg-color": "#00ff00", - "column-left-fg-color": "#00ff00", + "cw-color": "#9ad791", + "main-fg-color": "#9ad791", + "login-fg-color": "#9ad791", + "welcome-fg-color": "#9ad791", + "options-fg-color": "#9ad791", + "column-left-fg-color": "#9ad791", "border-color": "#035103", - "main-link-color": "#2fff2f", + "main-link-color": "#9ad791", "main-link-color-hover": "#afff2f", "options-main-link-color": "#2fff2f", "options-main-link-color-hover": "#afff2f", @@ -34,14 +34,14 @@ "options-main-visited-color": "#3c8234", "button-selected": "#063200", "button-background-hover": "#a62200", - "button-text-hover": "#00ff00", + "button-text-hover": "#9ad791", "publish-button-background": "#062200", "button-background": "#062200", "button-small-background": "#062200", - "button-text": "#00ff00", - "button-selected-text": "#00ff00", - "publish-button-text": "#00ff00", - "button-small-text": "#00ff00", + "button-text": "#9ad791", + "button-selected-text": "#9ad791", + "publish-button-text": "#9ad791", + "button-small-text": "#9ad791", "button-corner-radius": "4px", "timeline-border-radius": "4px", "header-font": "'Bedstead'", @@ -59,8 +59,8 @@ "title-text": "black", "title-background": "darkgreen", "gallery-text-color": "green", - "time-color": "#00ff00", - "place-color": "#00ff00", - "event-color": "#00ff00", + "time-color": "#9ad791", + "place-color": "#9ad791", + "event-color": "#9ad791", "image-corners": "0%" } diff --git a/theme/henge/theme.json b/theme/henge/theme.json index 4f6fce492..8bcaadad6 100644 --- a/theme/henge/theme.json +++ b/theme/henge/theme.json @@ -4,7 +4,7 @@ "time-color": "grey", "event-color": "white", "login-bg-color": "#567726", - "welcome-bg-color": "#567726", + "welcome-bg-color": "#ccc", "login-fg-color": "black", "welcome-fg-color": "black", "options-bg-color": "black", diff --git a/theme/indymediaclassic/helpimages/journalist.jpg b/theme/indymediaclassic/helpimages/journalist.jpg new file mode 100644 index 000000000..a9bdd19b8 Binary files /dev/null and b/theme/indymediaclassic/helpimages/journalist.jpg differ diff --git a/theme/indymediaclassic/helpimages/welcome.jpg b/theme/indymediaclassic/helpimages/welcome.jpg new file mode 100644 index 000000000..3d70dc731 Binary files /dev/null and b/theme/indymediaclassic/helpimages/welcome.jpg differ diff --git a/theme/indymediaclassic/is_news_instance b/theme/indymediaclassic/is_news_instance new file mode 100644 index 000000000..0519ecba6 --- /dev/null +++ b/theme/indymediaclassic/is_news_instance @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/theme/indymediaclassic/welcome/final_en.md b/theme/indymediaclassic/welcome/final_en.md new file mode 100644 index 000000000..2fd063cff --- /dev/null +++ b/theme/indymediaclassic/welcome/final_en.md @@ -0,0 +1,10 @@ +![Journalist image](/helpimages/journalist.jpg) +### You are now a journalist! +Welcome onboard the team. This is a moderated news instance, so please ensure that anything you write is in accordance with our [editorial policy](/terms). + +#### Hints +Use the **magnifier** icon 🔍 to search for fediverse handles and follow people. + +Selecting the **banner at the top** of the screen switches between timeline view and your profile. + +The screen will not automatically refresh when articles arrive, so use **F5** or the **Features** button to refresh. diff --git a/theme/indymediaclassic/welcome/help_tlblogs_en.md b/theme/indymediaclassic/welcome/help_tlblogs_en.md new file mode 100644 index 000000000..b5752f41d --- /dev/null +++ b/theme/indymediaclassic/welcome/help_tlblogs_en.md @@ -0,0 +1,3 @@ +This timeline contains any articles published by you or anyone that you're following. + +You can create a new article using the **publish** icon at the top of the newswire column, or on mobile via the newswire icon. diff --git a/theme/indymediaclassic/welcome/profile_en.md b/theme/indymediaclassic/welcome/profile_en.md new file mode 100644 index 000000000..21cf17613 --- /dev/null +++ b/theme/indymediaclassic/welcome/profile_en.md @@ -0,0 +1,2 @@ +### Journalist Setup +Select your avatar image and add your name and description. Use a small avatar image (eg. 128x128 pixels) so that it's quick to download. diff --git a/theme/indymediaclassic/welcome/welcome_en.md b/theme/indymediaclassic/welcome/welcome_en.md new file mode 100644 index 000000000..cc812899e --- /dev/null +++ b/theme/indymediaclassic/welcome/welcome_en.md @@ -0,0 +1,7 @@ +![Welcome image](/helpimages/welcome.jpg) +### Welcome to INSTANCE +This is an ActivityPub server designed for publishing in the Indymedia network. It can run on low power single board computers or old laptops. + +Don't complain about the media. *Be the media*. + +Now, lets get going... diff --git a/theme/indymediamodern/helpimages/journalist.jpg b/theme/indymediamodern/helpimages/journalist.jpg new file mode 100644 index 000000000..a9bdd19b8 Binary files /dev/null and b/theme/indymediamodern/helpimages/journalist.jpg differ diff --git a/theme/indymediamodern/helpimages/welcome.jpg b/theme/indymediamodern/helpimages/welcome.jpg new file mode 100644 index 000000000..145d424a5 Binary files /dev/null and b/theme/indymediamodern/helpimages/welcome.jpg differ diff --git a/theme/indymediamodern/is_news_instance b/theme/indymediamodern/is_news_instance new file mode 100644 index 000000000..0519ecba6 --- /dev/null +++ b/theme/indymediamodern/is_news_instance @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/theme/indymediamodern/welcome/final_en.md b/theme/indymediamodern/welcome/final_en.md new file mode 100644 index 000000000..2fd063cff --- /dev/null +++ b/theme/indymediamodern/welcome/final_en.md @@ -0,0 +1,10 @@ +![Journalist image](/helpimages/journalist.jpg) +### You are now a journalist! +Welcome onboard the team. This is a moderated news instance, so please ensure that anything you write is in accordance with our [editorial policy](/terms). + +#### Hints +Use the **magnifier** icon 🔍 to search for fediverse handles and follow people. + +Selecting the **banner at the top** of the screen switches between timeline view and your profile. + +The screen will not automatically refresh when articles arrive, so use **F5** or the **Features** button to refresh. diff --git a/theme/indymediamodern/welcome/help_tlblogs_en.md b/theme/indymediamodern/welcome/help_tlblogs_en.md new file mode 100644 index 000000000..b5752f41d --- /dev/null +++ b/theme/indymediamodern/welcome/help_tlblogs_en.md @@ -0,0 +1,3 @@ +This timeline contains any articles published by you or anyone that you're following. + +You can create a new article using the **publish** icon at the top of the newswire column, or on mobile via the newswire icon. diff --git a/theme/indymediamodern/welcome/profile_en.md b/theme/indymediamodern/welcome/profile_en.md new file mode 100644 index 000000000..21cf17613 --- /dev/null +++ b/theme/indymediamodern/welcome/profile_en.md @@ -0,0 +1,2 @@ +### Journalist Setup +Select your avatar image and add your name and description. Use a small avatar image (eg. 128x128 pixels) so that it's quick to download. diff --git a/theme/indymediamodern/welcome/welcome_en.md b/theme/indymediamodern/welcome/welcome_en.md new file mode 100644 index 000000000..cc812899e --- /dev/null +++ b/theme/indymediamodern/welcome/welcome_en.md @@ -0,0 +1,7 @@ +![Welcome image](/helpimages/welcome.jpg) +### Welcome to INSTANCE +This is an ActivityPub server designed for publishing in the Indymedia network. It can run on low power single board computers or old laptops. + +Don't complain about the media. *Be the media*. + +Now, lets get going... diff --git a/theme/starlight/welcome_background.jpg b/theme/starlight/welcome_background.jpg new file mode 100644 index 000000000..f7a3f5dd0 Binary files /dev/null and b/theme/starlight/welcome_background.jpg differ diff --git a/webapp_timeline.py b/webapp_timeline.py index cf0e17719..be498f826 100644 --- a/webapp_timeline.py +++ b/webapp_timeline.py @@ -55,9 +55,19 @@ def _getHelpForTimeline(baseDir: str, boxName: str) -> str: getConfigParam(baseDir, 'language') if not language: language = 'en' - defaultFilename = \ - baseDir + '/defaultwelcome/' + \ - 'help_' + boxName + '_' + language + '.md' + themeName = \ + getConfigParam(baseDir, 'theme') + defaultFilename = None + if themeName: + defaultFilename = \ + baseDir + '/theme/' + themeName + '/welcome/' + \ + 'help_' + boxName + '_' + language + '.md' + if not os.path.isfile(defaultFilename): + defaultFilename = None + if not defaultFilename: + defaultFilename = \ + baseDir + '/defaultwelcome/' + \ + 'help_' + boxName + '_' + language + '.md' if not os.path.isfile(defaultFilename): defaultFilename = \ baseDir + '/defaultwelcome/help_' + boxName + '_en.md' diff --git a/webapp_welcome.py b/webapp_welcome.py index 77c868707..60d69612b 100644 --- a/webapp_welcome.py +++ b/webapp_welcome.py @@ -41,6 +41,7 @@ def welcomeScreenIsComplete(baseDir: str, def htmlWelcomeScreen(baseDir: str, nickname: str, language: str, translate: {}, + themeName: str, currScreen='welcome') -> str: """Returns the welcome screen """ @@ -53,8 +54,17 @@ def htmlWelcomeScreen(baseDir: str, nickname: str, welcomeText = 'Welcome to Epicyon' welcomeFilename = baseDir + '/accounts/' + currScreen + '.md' if not os.path.isfile(welcomeFilename): - defaultFilename = \ - baseDir + '/defaultwelcome/' + currScreen + '_' + language + '.md' + defaultFilename = None + if themeName: + defaultFilename = \ + baseDir + '/theme/' + themeName + '/welcome/' + \ + 'welcome_' + language + '.md' + if not os.path.isfile(defaultFilename): + defaultFilename = None + if not defaultFilename: + defaultFilename = \ + baseDir + '/defaultwelcome/' + \ + currScreen + '_' + language + '.md' if not os.path.isfile(defaultFilename): defaultFilename = \ baseDir + '/defaultwelcome/' + currScreen + '_en.md' diff --git a/webapp_welcome_final.py b/webapp_welcome_final.py index 2ae2c8996..b1635cd29 100644 --- a/webapp_welcome_final.py +++ b/webapp_welcome_final.py @@ -17,7 +17,8 @@ from webapp_utils import markdownToHtml def htmlWelcomeFinal(baseDir: str, nickname: str, domain: str, httpPrefix: str, domainFull: str, - language: str, translate: {}) -> str: + language: str, translate: {}, + themeName: str) -> str: """Returns the final welcome screen after first login """ # set a custom background for the welcome screen @@ -29,8 +30,16 @@ def htmlWelcomeFinal(baseDir: str, nickname: str, domain: str, finalText = 'Welcome to Epicyon' finalFilename = baseDir + '/accounts/welcome_final.md' if not os.path.isfile(finalFilename): - defaultFilename = \ - baseDir + '/defaultwelcome/final_' + language + '.md' + defaultFilename = None + if themeName: + defaultFilename = \ + baseDir + '/theme/' + themeName + '/welcome/' + \ + 'final_' + language + '.md' + if not os.path.isfile(defaultFilename): + defaultFilename = None + if not defaultFilename: + defaultFilename = \ + baseDir + '/defaultwelcome/final_' + language + '.md' if not os.path.isfile(defaultFilename): defaultFilename = baseDir + '/defaultwelcome/final_en.md' copyfile(defaultFilename, finalFilename) diff --git a/webapp_welcome_profile.py b/webapp_welcome_profile.py index 341ad5b55..fa78dcfce 100644 --- a/webapp_welcome_profile.py +++ b/webapp_welcome_profile.py @@ -20,7 +20,8 @@ from webapp_utils import markdownToHtml def htmlWelcomeProfile(baseDir: str, nickname: str, domain: str, httpPrefix: str, domainFull: str, - language: str, translate: {}) -> str: + language: str, translate: {}, + themeName: str) -> str: """Returns the welcome profile screen to set avatar and bio """ # set a custom background for the welcome screen @@ -32,8 +33,16 @@ def htmlWelcomeProfile(baseDir: str, nickname: str, domain: str, profileText = 'Welcome to Epicyon' profileFilename = baseDir + '/accounts/welcome_profile.md' if not os.path.isfile(profileFilename): - defaultFilename = \ - baseDir + '/defaultwelcome/profile_' + language + '.md' + defaultFilename = None + if themeName: + defaultFilename = \ + baseDir + '/theme/' + themeName + '/welcome/' + \ + 'profile_' + language + '.md' + if not os.path.isfile(defaultFilename): + defaultFilename = None + if not defaultFilename: + defaultFilename = \ + baseDir + '/defaultwelcome/profile_' + language + '.md' if not os.path.isfile(defaultFilename): defaultFilename = baseDir + '/defaultwelcome/profile_en.md' copyfile(defaultFilename, profileFilename)