template: better css files order

This commit is contained in:
Goffi 2018-10-03 20:38:10 +02:00
commit bcab68049a

View file

@ -585,13 +585,13 @@ class Renderer(object):
path_elems = template_data.path.split(u'/')
path_elems[-1] = os.path.splitext(path_elems[-1])[0]
for name_root in (u'styles_extra', u'styles'):
self._appendCSSPaths(template_data, css_files, css_files_noscript, name_root)
css_path = self.getStaticPath(template_data, u'fonts.css')
if css_path is not None:
css_files.append(self.getFrontURL(css_path))
for name_root in (u'styles', u'styles_extra'):
self._appendCSSPaths(template_data, css_files, css_files_noscript, name_root)
for idx in xrange(len(path_elems)):
name_root = u"_".join(path_elems[:idx+1])
self._appendCSSPaths(template_data, css_files, css_files_noscript, name_root)