try fixing weather image
This commit is contained in:
@@ -1,7 +1,4 @@
|
|||||||
@import url('http://127.0.0.1:5000/fonts/dinpro/dinpro.css');
|
@import url('{{ HOST }}:{{ HOST_PORT }}/fonts/weather-icons/weather-icons.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');
|
|
||||||
* {
|
* {
|
||||||
box-sizing: border-box; /* Include padding and borders in size calculations */
|
box-sizing: border-box; /* Include padding and borders in size calculations */
|
||||||
}
|
}
|
||||||
@@ -52,7 +49,7 @@ html, body {
|
|||||||
font-size: 60px;
|
font-size: 60px;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
vertical-align: top;
|
vertical-align: top;
|
||||||
text-align: right;
|
text-align: right !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.splitpanel .weather-icon {
|
.splitpanel .weather-icon {
|
||||||
|
|||||||
@@ -94,7 +94,9 @@ def dashboard():
|
|||||||
days=days,
|
days=days,
|
||||||
today=today,
|
today=today,
|
||||||
weather=weather(),
|
weather=weather(),
|
||||||
extra_debug=extra_debug
|
extra_debug=extra_debug,
|
||||||
|
HOST = os.getenv('HOST'),
|
||||||
|
HOST_PORT = os.getenv('HOST_PORT')
|
||||||
)
|
)
|
||||||
|
|
||||||
@app.route('/image')
|
@app.route('/image')
|
||||||
@@ -120,6 +122,6 @@ def dashboard_image():
|
|||||||
# css=os.path.join(os.path.dirname(__file__),'static','style.css')
|
# css=os.path.join(os.path.dirname(__file__),'static','style.css')
|
||||||
)
|
)
|
||||||
image_file = Image.open(out_file) # open colour image
|
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')
|
image_file.save(out_file, 'BMP')
|
||||||
return send_from_directory(directory = 'static', path=f'out.{extension}', as_attachment=False, attachment_filename=f'out.{extension}')
|
return send_from_directory(directory = 'static', path=f'out.{extension}', as_attachment=False, attachment_filename=f'out.{extension}')
|
||||||
|
|||||||
Reference in New Issue
Block a user