mirror of https://gitlab.com/bashrc2/epicyon
Substitute instance title within welcome screens
parent
864bd5a8c2
commit
6c6618fa3b
|
@ -1,5 +1,5 @@
|
|||
# Welcome
|
||||
Epicyon is an ActivityPub server designed for easy self-hosting of a few people on low power systems, such as single board computers or old laptops.
|
||||
# Welcome to INSTANCE
|
||||
This is an ActivityPub server designed for easy self-hosting of a few people on low power systems, such as single board computers or old laptops.
|
||||
|
||||
Run your own social network presence the way you want to, and say goodbye to Big Tech.
|
||||
|
||||
|
|
|
@ -59,17 +59,23 @@ def htmlWelcomeScreen(baseDir: str, nickname: str,
|
|||
defaultFilename = \
|
||||
baseDir + '/defaultwelcome/' + currScreen + '_en.md'
|
||||
copyfile(defaultFilename, welcomeFilename)
|
||||
|
||||
instanceTitle = \
|
||||
getConfigParam(baseDir, 'instanceTitle')
|
||||
if not instanceTitle:
|
||||
instanceTitle = 'Epicyon'
|
||||
|
||||
if os.path.isfile(welcomeFilename):
|
||||
with open(welcomeFilename, 'r') as welcomeFile:
|
||||
welcomeText = markdownToHtml(removeHtml(welcomeFile.read()))
|
||||
welcomeText = welcomeFile.read()
|
||||
welcomeText = welcomeText.replace('INSTANCE', instanceTitle)
|
||||
welcomeText = markdownToHtml(removeHtml(welcomeText))
|
||||
|
||||
welcomeForm = ''
|
||||
cssFilename = baseDir + '/epicyon-welcome.css'
|
||||
if os.path.isfile(baseDir + '/welcome.css'):
|
||||
cssFilename = baseDir + '/welcome.css'
|
||||
|
||||
instanceTitle = \
|
||||
getConfigParam(baseDir, 'instanceTitle')
|
||||
welcomeForm = htmlHeaderWithExternalStyle(cssFilename, instanceTitle)
|
||||
welcomeForm += \
|
||||
'<form enctype="multipart/form-data" method="POST" ' + \
|
||||
|
|
|
@ -34,17 +34,23 @@ def htmlWelcomeFinal(baseDir: str, nickname: str, domain: str,
|
|||
if not os.path.isfile(defaultFilename):
|
||||
defaultFilename = baseDir + '/defaultwelcome/final_en.md'
|
||||
copyfile(defaultFilename, finalFilename)
|
||||
|
||||
instanceTitle = \
|
||||
getConfigParam(baseDir, 'instanceTitle')
|
||||
if not instanceTitle:
|
||||
instanceTitle = 'Epicyon'
|
||||
|
||||
if os.path.isfile(finalFilename):
|
||||
with open(finalFilename, 'r') as finalFile:
|
||||
finalText = markdownToHtml(removeHtml(finalFile.read()))
|
||||
finalText = finalFile.read()
|
||||
finalText = finalText.replace('INSTANCE', instanceTitle)
|
||||
finalText = markdownToHtml(removeHtml(finalText))
|
||||
|
||||
finalForm = ''
|
||||
cssFilename = baseDir + '/epicyon-welcome.css'
|
||||
if os.path.isfile(baseDir + '/welcome.css'):
|
||||
cssFilename = baseDir + '/welcome.css'
|
||||
|
||||
instanceTitle = \
|
||||
getConfigParam(baseDir, 'instanceTitle')
|
||||
finalForm = htmlHeaderWithExternalStyle(cssFilename, instanceTitle)
|
||||
|
||||
finalForm += '<div class="container">' + finalText + '</div>\n'
|
||||
|
|
|
@ -37,17 +37,23 @@ def htmlWelcomeProfile(baseDir: str, nickname: str, domain: str,
|
|||
if not os.path.isfile(defaultFilename):
|
||||
defaultFilename = baseDir + '/defaultwelcome/profile_en.md'
|
||||
copyfile(defaultFilename, profileFilename)
|
||||
|
||||
instanceTitle = \
|
||||
getConfigParam(baseDir, 'instanceTitle')
|
||||
if not instanceTitle:
|
||||
instanceTitle = 'Epicyon'
|
||||
|
||||
if os.path.isfile(profileFilename):
|
||||
with open(profileFilename, 'r') as profileFile:
|
||||
profileText = markdownToHtml(removeHtml(profileFile.read()))
|
||||
profileText = profileFile.read()
|
||||
profileText = profileText.replace('INSTANCE', instanceTitle)
|
||||
profileText = markdownToHtml(removeHtml(profileText))
|
||||
|
||||
profileForm = ''
|
||||
cssFilename = baseDir + '/epicyon-welcome.css'
|
||||
if os.path.isfile(baseDir + '/welcome.css'):
|
||||
cssFilename = baseDir + '/welcome.css'
|
||||
|
||||
instanceTitle = \
|
||||
getConfigParam(baseDir, 'instanceTitle')
|
||||
profileForm = htmlHeaderWithExternalStyle(cssFilename, instanceTitle)
|
||||
|
||||
# get the url of the avatar
|
||||
|
|
Loading…
Reference in New Issue