comparison sat/tools/common/template.py @ 2683:38af118a7d74

template: better css files order
author Goffi <goffi@goffi.org>
date Wed, 03 Oct 2018 20:38:10 +0200
parents ae5340b57ff8
children 003b8b4b56a7
comparison
equal deleted inserted replaced
2682:466c9690c43a 2683:38af118a7d74
583 css_files = [] 583 css_files = []
584 css_files_noscript = [] 584 css_files_noscript = []
585 path_elems = template_data.path.split(u'/') 585 path_elems = template_data.path.split(u'/')
586 path_elems[-1] = os.path.splitext(path_elems[-1])[0] 586 path_elems[-1] = os.path.splitext(path_elems[-1])[0]
587 587
588 for name_root in (u'styles_extra', u'styles'):
589 self._appendCSSPaths(template_data, css_files, css_files_noscript, name_root)
590
591 css_path = self.getStaticPath(template_data, u'fonts.css') 588 css_path = self.getStaticPath(template_data, u'fonts.css')
592 if css_path is not None: 589 if css_path is not None:
593 css_files.append(self.getFrontURL(css_path)) 590 css_files.append(self.getFrontURL(css_path))
591
592 for name_root in (u'styles', u'styles_extra'):
593 self._appendCSSPaths(template_data, css_files, css_files_noscript, name_root)
594 594
595 for idx in xrange(len(path_elems)): 595 for idx in xrange(len(path_elems)):
596 name_root = u"_".join(path_elems[:idx+1]) 596 name_root = u"_".join(path_elems[:idx+1])
597 self._appendCSSPaths(template_data, css_files, css_files_noscript, name_root) 597 self._appendCSSPaths(template_data, css_files, css_files_noscript, name_root)
598 598