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