mirror of https://gitlab.com/bashrc2/epicyon
Getting themed favicon
parent
5cb12b106b
commit
7dbf5bd939
|
@ -4382,8 +4382,12 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
if 'image/avif' in self.headers['Accept']:
|
if 'image/avif' in self.headers['Accept']:
|
||||||
favType = 'image/avif'
|
favType = 'image/avif'
|
||||||
favFilename = 'favicon.avif'
|
favFilename = 'favicon.avif'
|
||||||
|
themeName = getConfigParam(baseDir, 'theme')
|
||||||
|
if not themeName:
|
||||||
|
themeName = 'default'
|
||||||
# custom favicon
|
# custom favicon
|
||||||
faviconFilename = baseDir + '/' + favFilename
|
faviconFilename = \
|
||||||
|
baseDir + '/theme/' + themeName + '/icons/' + favFilename
|
||||||
if not os.path.isfile(faviconFilename):
|
if not os.path.isfile(faviconFilename):
|
||||||
# default favicon
|
# default favicon
|
||||||
faviconFilename = \
|
faviconFilename = \
|
||||||
|
|
|
@ -483,6 +483,8 @@ def createPerson(baseDir: str, nickname: str, domain: str, port: int,
|
||||||
baseDir + '/accounts/' + nickname + '@' + domain +
|
baseDir + '/accounts/' + nickname + '@' + domain +
|
||||||
'/avatar.png')
|
'/avatar.png')
|
||||||
theme = getConfigParam(baseDir, 'theme')
|
theme = getConfigParam(baseDir, 'theme')
|
||||||
|
if not theme:
|
||||||
|
theme = 'default'
|
||||||
defaultProfileImageFilename = baseDir + '/img/image.png'
|
defaultProfileImageFilename = baseDir + '/img/image.png'
|
||||||
if theme:
|
if theme:
|
||||||
if os.path.isfile(baseDir + '/img/image_' + theme + '.png'):
|
if os.path.isfile(baseDir + '/img/image_' + theme + '.png'):
|
||||||
|
|
Loading…
Reference in New Issue