Default to jpeg backgrounds

merge-requests/8/head
Bob Mottram 2020-07-25 20:07:06 +01:00
parent d8bedb8e40
commit d9644adedd
4 changed files with 35 additions and 25 deletions

View File

@ -75,7 +75,7 @@ a:link {
} }
.follow { .follow {
background-image: url("follow-background.png"); background-image: url("follow-background.jpg");
background-size: cover; background-size: cover;
-webkit-background-size: cover; -webkit-background-size: cover;
-moz-background-size: cover; -moz-background-size: cover;

View File

@ -33,7 +33,7 @@ body, html {
background-color: var(--main-bg-color); background-color: var(--main-bg-color);
color: var(--main-fg-color); color: var(--main-fg-color);
background-image: url("/login-background.png"); background-image: url("/login-background.jpg");
background-size: cover; background-size: cover;
-webkit-background-size: cover; -webkit-background-size: cover;
-moz-background-size: cover; -moz-background-size: cover;
@ -130,7 +130,12 @@ span.psw {
background-color: var(--main-bg-color); background-color: var(--main-bg-color);
color: var(--main-fg-color); color: var(--main-fg-color);
background-image: url("/login-background.png"); background-image: url("/login-background.jpg");
background-size: cover;
-webkit-background-size: cover;
-moz-background-size: cover;
background-repeat: no-repeat;
background-position: center;
height: 100%; height: 100%;
font-family: Arial, Helvetica, sans-serif; font-family: Arial, Helvetica, sans-serif;
max-width: 60%; max-width: 60%;
@ -173,7 +178,12 @@ span.psw {
background-color: var(--main-bg-color); background-color: var(--main-bg-color);
color: var(--main-fg-color); color: var(--main-fg-color);
background-image: url("/login-background.png"); background-image: url("/login-background.jpg");
background-size: cover;
-webkit-background-size: cover;
-moz-background-size: cover;
background-repeat: no-repeat;
background-position: center;
height: 100%; height: 100%;
font-family: Arial, Helvetica, sans-serif; font-family: Arial, Helvetica, sans-serif;
max-width: 95%; max-width: 95%;

View File

@ -112,7 +112,7 @@ def setThemeFromDict(baseDir: str, name: str, themeParams: {}) -> None:
def setBackgroundFormat(baseDir: str, name: str, extension: str) -> None: def setBackgroundFormat(baseDir: str, name: str, extension: str) -> None:
"""Sets the background file extension """Sets the background file extension
""" """
if extension == 'png': if extension == 'jpg':
return return
themeFiles = getThemeFiles() themeFiles = getThemeFiles()
for filename in themeFiles: for filename in themeFiles:

View File

@ -1581,10 +1581,10 @@ def htmlLogin(translate: {}, baseDir: str, autocomplete=True) -> str:
loginImageFilename = baseDir + '/accounts/' + loginImage loginImageFilename = baseDir + '/accounts/' + loginImage
copyfile(baseDir + '/img/login.png', loginImageFilename) copyfile(baseDir + '/img/login.png', loginImageFilename)
if os.path.isfile(baseDir + '/accounts/login-background-custom.png'): if os.path.isfile(baseDir + '/accounts/login-background-custom.jpg'):
if not os.path.isfile(baseDir + '/accounts/login-background.png'): if not os.path.isfile(baseDir + '/accounts/login-background.jpg'):
copyfile(baseDir + '/accounts/login-background-custom.png', copyfile(baseDir + '/accounts/login-background-custom.jpg',
baseDir + '/accounts/login-background.png') baseDir + '/accounts/login-background.jpg')
if accounts > 0: if accounts > 0:
loginText = \ loginText = \
@ -1682,10 +1682,10 @@ def htmlTermsOfService(baseDir: str, httpPrefix: str, domainFull: str) -> str:
copyfile(baseDir + '/default_tos.txt', copyfile(baseDir + '/default_tos.txt',
baseDir + '/accounts/tos.txt') baseDir + '/accounts/tos.txt')
if os.path.isfile(baseDir + '/accounts/login-background-custom.png'): if os.path.isfile(baseDir + '/accounts/login-background-custom.jpg'):
if not os.path.isfile(baseDir + '/accounts/login-background.png'): if not os.path.isfile(baseDir + '/accounts/login-background.jpg'):
copyfile(baseDir + '/accounts/login-background-custom.png', copyfile(baseDir + '/accounts/login-background-custom.jpg',
baseDir + '/accounts/login-background.png') baseDir + '/accounts/login-background.jpg')
TOSText = 'Terms of Service go here.' TOSText = 'Terms of Service go here.'
if os.path.isfile(baseDir + '/accounts/tos.txt'): if os.path.isfile(baseDir + '/accounts/tos.txt'):
@ -1723,10 +1723,10 @@ def htmlAbout(baseDir: str, httpPrefix: str,
copyfile(baseDir + '/default_about.txt', copyfile(baseDir + '/default_about.txt',
baseDir + '/accounts/about.txt') baseDir + '/accounts/about.txt')
if os.path.isfile(baseDir + '/accounts/login-background-custom.png'): if os.path.isfile(baseDir + '/accounts/login-background-custom.jpg'):
if not os.path.isfile(baseDir + '/accounts/login-background.png'): if not os.path.isfile(baseDir + '/accounts/login-background.jpg'):
copyfile(baseDir + '/accounts/login-background-custom.png', copyfile(baseDir + '/accounts/login-background-custom.jpg',
baseDir + '/accounts/login-background.png') baseDir + '/accounts/login-background.jpg')
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'):
@ -5343,10 +5343,10 @@ def htmlFollowConfirm(translate: {}, baseDir: str,
""" """
followDomain, port = getDomainFromActor(followActor) followDomain, port = getDomainFromActor(followActor)
if os.path.isfile(baseDir + '/accounts/follow-background-custom.png'): if os.path.isfile(baseDir + '/accounts/follow-background-custom.jpg'):
if not os.path.isfile(baseDir + '/accounts/follow-background.png'): if not os.path.isfile(baseDir + '/accounts/follow-background.jpg'):
copyfile(baseDir + '/accounts/follow-background-custom.png', copyfile(baseDir + '/accounts/follow-background-custom.jpg',
baseDir + '/accounts/follow-background.png') baseDir + '/accounts/follow-background.jpg')
cssFilename = baseDir + '/epicyon-follow.css' cssFilename = baseDir + '/epicyon-follow.css'
if os.path.isfile(baseDir + '/follow.css'): if os.path.isfile(baseDir + '/follow.css'):
@ -5388,10 +5388,10 @@ def htmlUnfollowConfirm(translate: {}, baseDir: str,
""" """
followDomain, port = getDomainFromActor(followActor) followDomain, port = getDomainFromActor(followActor)
if os.path.isfile(baseDir + '/accounts/follow-background-custom.png'): if os.path.isfile(baseDir + '/accounts/follow-background-custom.jpg'):
if not os.path.isfile(baseDir + '/accounts/follow-background.png'): if not os.path.isfile(baseDir + '/accounts/follow-background.jpg'):
copyfile(baseDir + '/accounts/follow-background-custom.png', copyfile(baseDir + '/accounts/follow-background-custom.jpg',
baseDir + '/accounts/follow-background.png') baseDir + '/accounts/follow-background.jpg')
cssFilename = baseDir + '/epicyon-follow.css' cssFilename = baseDir + '/epicyon-follow.css'
if os.path.isfile(baseDir + '/follow.css'): if os.path.isfile(baseDir + '/follow.css'):