Mercurial > libervia-web
diff src/pages/g/e/page_meta.py @ 1028:ad97d7e7de3b
pages (g/e): replaced background_image by new dynamic_style template variable
author | Goffi <goffi@goffi.org> |
---|---|
date | Mon, 22 Jan 2018 08:53:06 +0100 |
parents | 36e9747520fd |
children | 1c09f41e2f52 |
line wrap: on
line diff
--- 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",