comparison libervia/server/pages.py @ 1258:92ff09cdd6dd

server: gather themes data: - the new LiberviaRootResource's `site_themes` attribute is a set of available themes for a site, it is set a template variable for pages. - if `browser_meta` are available for a theme, the metadata are merged with pages root `_browser` data - if python files are found in `browser_path`, they are added to be handled by brython task.
author Goffi <goffi@goffi.org>
date Sun, 03 May 2020 19:28:14 +0200
parents 08cd652dea14
children 6b7f9c3558cc
comparison
equal deleted inserted replaced
1257:1ec41ac1e7cf 1258:92ff09cdd6dd
1330 if common_scripts: 1330 if common_scripts:
1331 template_data.setdefault('scripts', []).extend(common_scripts) 1331 template_data.setdefault('scripts', []).extend(common_scripts)
1332 1332
1333 return self.host.renderer.render( 1333 return self.host.renderer.render(
1334 self.template, 1334 self.template,
1335 site_themes=self.vhost_root.site_themes,
1335 page_url=self.getURL(), 1336 page_url=self.getURL(),
1336 media_path=f"/{C.MEDIA_DIR}", 1337 media_path=f"/{C.MEDIA_DIR}",
1337 cache_path=session_data.cache_dir, 1338 cache_path=session_data.cache_dir,
1338 build_path=f"/{C.BUILD_DIR}/", 1339 build_path=f"/{C.BUILD_DIR}/",
1339 main_menu=self.main_menu, 1340 main_menu=self.main_menu,