# HG changeset patch # User Goffi # Date 1516607586 -3600 # Node ID ad97d7e7de3b8ad995dce88b93517db99902a8a1 # Parent 46ce20494a1bbd3649245e398d42527dffe3ff5f pages (g/e): replaced background_image by new dynamic_style template variable diff -r 46ce20494a1b -r ad97d7e7de3b src/pages/g/e/page_meta.py --- a/src/pages/g/e/page_meta.py Mon Jan 22 08:53:03 2018 +0100 +++ b/src/pages/g/e/page_meta.py Mon Jan 22 08:53:06 2018 +0100 @@ -7,7 +7,9 @@ from twisted.words.protocols.jabber import jid from libervia.server import session_iface from sat.tools.common import uri +from sat.tools.common.template import safe import time +import cgi from sat.core.log import getLogger log = getLogger('pages/g/e') @@ -43,7 +45,12 @@ except KeyError: pass else: - template_data['background_image'] = background_image + template_data['dynamic_style'] = safe(u""" + html { + background-image: url("%s"); + background-size: 15em; + } + """ % cgi.escape(background_image, True)) template_data['event'] = event_data event_invitee_data = yield self.host.bridgeCall( u"eventInviteeGet",