try fixing weather image

This commit is contained in:
2024-12-16 13:43:38 -06:00
parent 4e7fce8ba3
commit 82d0389db4
2 changed files with 6 additions and 7 deletions

View File

@@ -1,7 +1,4 @@
@import url('http://127.0.0.1:5000/fonts/dinpro/dinpro.css');
@import url('http://127.0.0.1:5000/fonts/noto-emoji.css');
@import url('http://127.0.0.1:5000/fonts/openmoji.css');
@import url('http://10.0.1.128:56733/fonts/weather-icons/weather-icons.css');
@import url('{{ HOST }}:{{ HOST_PORT }}/fonts/weather-icons/weather-icons.css');
* {
box-sizing: border-box; /* Include padding and borders in size calculations */
}
@@ -52,7 +49,7 @@ html, body {
font-size: 60px;
font-weight: bold;
vertical-align: top;
text-align: right;
text-align: right !important;
}
.splitpanel .weather-icon {

View File

@@ -94,7 +94,9 @@ def dashboard():
days=days,
today=today,
weather=weather(),
extra_debug=extra_debug
extra_debug=extra_debug,
HOST = os.getenv('HOST'),
HOST_PORT = os.getenv('HOST_PORT')
)
@app.route('/image')
@@ -120,6 +122,6 @@ def dashboard_image():
# css=os.path.join(os.path.dirname(__file__),'static','style.css')
)
image_file = Image.open(out_file) # open colour image
image_file = ImageOps.grayscale(image_file)
# image_file = ImageOps.grayscale(image_file)
image_file.save(out_file, 'BMP')
return send_from_directory(directory = 'static', path=f'out.{extension}', as_attachment=False, attachment_filename=f'out.{extension}')