Allow per-user custom styles for butterball
This commit is contained in:
parent
1bf28eb286
commit
9258237b85
|
@ -89,17 +89,11 @@
|
|||
</%def>
|
||||
|
||||
<%def name="core_styles()">
|
||||
|
||||
## ## TODO: eventually, allow custom css per-user
|
||||
## % if user_css:
|
||||
## ${h.stylesheet_link(user_css)}
|
||||
## % else:
|
||||
## ${h.stylesheet_link(h.get_liburl(request, 'bulma.css'))}
|
||||
## % endif
|
||||
|
||||
## TODO: eventually version / url should be configurable
|
||||
${h.stylesheet_link(h.get_liburl(request, 'bb_oruga_bulma_css'))}
|
||||
|
||||
% if user_css:
|
||||
${h.stylesheet_link(user_css)}
|
||||
% else:
|
||||
${h.stylesheet_link(h.get_liburl(request, 'bb_oruga_bulma_css'))}
|
||||
% endif
|
||||
</%def>
|
||||
|
||||
<%def name="head_tags()">
|
||||
|
|
|
@ -601,8 +601,11 @@ class UserView(PrincipalMasterView):
|
|||
styles = self.rattail_config.getlist('tailbone', 'themes.styles',
|
||||
default=[])
|
||||
for name in styles:
|
||||
css = self.rattail_config.get('tailbone',
|
||||
'themes.style.{}'.format(name))
|
||||
css = None
|
||||
if self.request.use_oruga:
|
||||
css = self.rattail_config.get(f'tailbone.themes.bb_style.{name}')
|
||||
if not css:
|
||||
css = self.rattail_config.get(f'tailbone.themes.style.{name}')
|
||||
if css:
|
||||
options.append({'value': css, 'label': name})
|
||||
context['theme_style_options'] = options
|
||||
|
|
Loading…
Reference in a new issue