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']:
|
||||
favType = 'image/avif'
|
||||
favFilename = 'favicon.avif'
|
||||
themeName = getConfigParam(baseDir, 'theme')
|
||||
if not themeName:
|
||||
themeName = 'default'
|
||||
# custom favicon
|
||||
faviconFilename = baseDir + '/' + favFilename
|
||||
faviconFilename = \
|
||||
baseDir + '/theme/' + themeName + '/icons/' + favFilename
|
||||
if not os.path.isfile(faviconFilename):
|
||||
# default favicon
|
||||
faviconFilename = \
|
||||
|
|
|
@ -483,6 +483,8 @@ def createPerson(baseDir: str, nickname: str, domain: str, port: int,
|
|||
baseDir + '/accounts/' + nickname + '@' + domain +
|
||||
'/avatar.png')
|
||||
theme = getConfigParam(baseDir, 'theme')
|
||||
if not theme:
|
||||
theme = 'default'
|
||||
defaultProfileImageFilename = baseDir + '/img/image.png'
|
||||
if theme:
|
||||
if os.path.isfile(baseDir + '/img/image_' + theme + '.png'):
|
||||
|
|
Loading…
Reference in New Issue