Add support for background color app setting
This commit is contained in:
parent
2f048b45c9
commit
05bb8a2df0
|
@ -124,6 +124,9 @@ def before_render(event):
|
|||
renderer_globals['messaging_enabled'] = request.rattail_config.getbool(
|
||||
'tailbone', 'messaging.enabled', default=False)
|
||||
|
||||
renderer_globals['background_color'] = request.rattail_config.get(
|
||||
'tailbone', 'background_color')
|
||||
|
||||
|
||||
def add_inbox_count(event):
|
||||
"""
|
||||
|
|
|
@ -11,6 +11,12 @@
|
|||
${base_meta.favicon()}
|
||||
${self.header_core()}
|
||||
|
||||
% if background_color:
|
||||
<style type="text/css">
|
||||
body { background-color: ${background_color}; }
|
||||
</style>
|
||||
% endif
|
||||
|
||||
% if not request.rattail_config.production():
|
||||
<style type="text/css">
|
||||
body { background-image: url(${request.static_url('tailbone:static/img/testing.png')}); }
|
||||
|
|
|
@ -163,7 +163,7 @@ class AppSettingsView(View):
|
|||
for setting in self.iter_known_settings():
|
||||
value = form.validated[setting.node_name]
|
||||
if value is colander.null:
|
||||
value = None
|
||||
value = ''
|
||||
self.save_setting_value(setting, value)
|
||||
|
||||
def iter_known_settings(self):
|
||||
|
|
Loading…
Reference in a new issue