From 971e96a7ec901894057e63742e404ac3d2dc8e58 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Tue, 22 Oct 2024 13:41:15 +0100 Subject: [PATCH] Preload banner image for calendar day screen --- webapp_calendar.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/webapp_calendar.py b/webapp_calendar.py index 77d35f1d1..e66b942a3 100644 --- a/webapp_calendar.py +++ b/webapp_calendar.py @@ -139,8 +139,12 @@ def _html_calendar_day(person_cache: {}, translate: {}, if '/users/' in actor: cal_actor = '/users/' + actor.split('/users/')[1] + banner_file, _ = \ + get_banner_file(base_dir, nickname, domain, theme) + banner_path = '/users/' + nickname + '/' + banner_file + instance_title = get_config_param(base_dir, 'instanceTitle') - preload_images = [] + preload_images = [banner_path] calendar_str = \ html_header_with_external_style(css_filename, instance_title, None, preload_images) @@ -149,8 +153,6 @@ def _html_calendar_day(person_cache: {}, translate: {}, '/calendar?year=' + str(year) + '?month=' + str(month_number) # show banner - banner_file, _ = \ - get_banner_file(base_dir, nickname, domain, theme) calendar_str += \ '
\n\n' + \ + 'src="' + banner_path + '" />\n' + \ '
\n
\n' calendar_str += '
\n'