From 64a19df0bc120c14cd923e6816fc0abb13e0fe2b Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Tue, 22 Oct 2024 13:51:24 +0100 Subject: [PATCH] Preload banner image on theme designer screen --- webapp_theme_designer.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/webapp_theme_designer.py b/webapp_theme_designer.py index 5b36c3453..946bf0c94 100644 --- a/webapp_theme_designer.py +++ b/webapp_theme_designer.py @@ -191,21 +191,23 @@ def html_theme_designer(base_dir: str, if os.path.isfile(base_dir + '/epicyon.css'): css_filename = base_dir + '/epicyon.css' + banner_file, _ = \ + get_banner_file(base_dir, nickname, domain, theme_name) + banner_path = '/users/' + nickname + '/' + banner_file + instance_title = \ get_config_param(base_dir, 'instanceTitle') - preload_images = [] + preload_images = [banner_path] theme_form = \ html_header_with_external_style(css_filename, instance_title, None, preload_images) - banner_file, _ = \ - get_banner_file(base_dir, nickname, domain, theme_name) theme_form += \ '' + \ '\n' + 'src="' + banner_path + '" />\n' theme_form += '
\n' theme_form += \