forked from indymedia/epicyon
Tidying
parent
4088d3907c
commit
f5aeae9afa
|
@ -1697,7 +1697,7 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
self._write(msg.encode('utf-8'))
|
self._write(msg.encode('utf-8'))
|
||||||
return
|
return
|
||||||
|
|
||||||
if self.path.startswith('/about'):
|
if self.path.endswith('/about'):
|
||||||
if callingDomain.endswith('.onion'):
|
if callingDomain.endswith('.onion'):
|
||||||
msg = \
|
msg = \
|
||||||
htmlAbout(self.server.baseDir, 'http',
|
htmlAbout(self.server.baseDir, 'http',
|
||||||
|
|
|
@ -1730,28 +1730,27 @@ def htmlAbout(baseDir: str, httpPrefix: str,
|
||||||
|
|
||||||
aboutText = 'Information about this instance goes here.'
|
aboutText = 'Information about this instance goes here.'
|
||||||
if os.path.isfile(baseDir + '/accounts/about.txt'):
|
if os.path.isfile(baseDir + '/accounts/about.txt'):
|
||||||
with open(baseDir + '/accounts/about.txt', 'r') as file:
|
with open(baseDir + '/accounts/about.txt', 'r') as aboutFile:
|
||||||
aboutText = file.read()
|
aboutText = aboutFile.read()
|
||||||
|
|
||||||
aboutForm = ''
|
aboutForm = ''
|
||||||
cssFilename = baseDir + '/epicyon-profile.css'
|
cssFilename = baseDir + '/epicyon-profile.css'
|
||||||
if os.path.isfile(baseDir + '/epicyon.css'):
|
if os.path.isfile(baseDir + '/epicyon.css'):
|
||||||
cssFilename = baseDir + '/epicyon.css'
|
cssFilename = baseDir + '/epicyon.css'
|
||||||
with open(cssFilename, 'r') as cssFile:
|
with open(cssFilename, 'r') as cssFile:
|
||||||
termsCSS = cssFile.read()
|
aboutCSS = cssFile.read()
|
||||||
if httpPrefix != 'http':
|
if httpPrefix != 'http':
|
||||||
termsCSS = termsCSS.replace('https://',
|
aboutCSS = aboutCSS.replace('https://',
|
||||||
httpPrefix + '://')
|
httpPrefix + '://')
|
||||||
|
|
||||||
aboutForm = htmlHeader(cssFilename, termsCSS)
|
aboutForm = htmlHeader(cssFilename, aboutCSS)
|
||||||
aboutForm += '<div class="container">' + aboutText + '</div>'
|
aboutForm += '<div class="container">' + aboutText + '</div>'
|
||||||
if onionDomain:
|
if onionDomain:
|
||||||
aboutForm += \
|
aboutForm += \
|
||||||
'<div class="container"><center><p class="administeredby">' + \
|
'<div class="container"><center><p class="administeredby">' + \
|
||||||
'http://' + onionDomain + '</p></center></div>'
|
'http://' + onionDomain + '</p></center></div>'
|
||||||
if adminNickname:
|
if adminNickname:
|
||||||
adminActor = \
|
adminActor = '/users/' + adminNickname
|
||||||
httpPrefix + '://' + domainFull + '/users/' + adminNickname
|
|
||||||
aboutForm += \
|
aboutForm += \
|
||||||
'<div class="container"><center>' + \
|
'<div class="container"><center>' + \
|
||||||
'<p class="administeredby">Administered by <a href="' + \
|
'<p class="administeredby">Administered by <a href="' + \
|
||||||
|
|
Loading…
Reference in New Issue