Remove formatting

main2
Bob Mottram 2019-10-23 14:03:56 +01:00
parent 0d51425110
commit 222f5b8217
2 changed files with 4 additions and 4 deletions

View File

@ -979,9 +979,9 @@ class PubServer(BaseHTTPRequestHandler):
imageFilename=imageFilename.split('?')[0]
imageDescription=None
if '?desc=' in self.path:
imageDescription=self.path.split('?desc=')[1]
imageDescription=self.path.split('?desc=')[1].replace('%20',' ').replace('%40','@').replace('%3A',':').replace('%23','#')
if '?' in imageDescription:
imageDescription=imageDescription.split('?')[0]
imageDescription=imageDescription.split('?')[0]
msg=htmlFullScreenImage(imageFilename,imageDescription).encode('utf-8')
self._set_headers('text/html',len(msg),cookie)
self._write(msg)

View File

@ -68,9 +68,9 @@ def htmlFullScreenImage(imageFilename: str,description: str) -> str:
htmlStr+=' background-image: url("'+imageFilename+'");\n'
htmlStr+='\n'
if description:
htmlStr+=' width: 90%;\n'
htmlStr+=' height: 90%;\n'
else:
htmlStr+=' width: 100%;\n'
htmlStr+=' height: 100%;\n'
htmlStr+=''
htmlStr+=' background-position: center;\n'
htmlStr+=' background-repeat: no-repeat;\n'