diff --git a/admin_interface/admin.py b/admin_interface/admin.py index 60eba78..aca9036 100644 --- a/admin_interface/admin.py +++ b/admin_interface/admin.py @@ -21,11 +21,11 @@ class ThemeAdmin(admin.ModelAdmin): }), ('Title', { 'classes': ('wide', ), - 'fields': ('title', 'title_visible', ) + 'fields': ('title', 'title_color', 'title_visible', ) }), ('Header', { 'classes': ('wide', ), - 'fields': ('css_header_background_color', 'css_header_title_color', 'css_header_text_color', 'css_header_link_color', 'css_header_link_hover_color', ) + 'fields': ('css_header_background_color', 'css_header_text_color', 'css_header_link_color', 'css_header_link_hover_color', ) }), ('Breadcrumbs / Module headers', { 'classes': ('wide', ), diff --git a/admin_interface/migrations/0004_rename_title_color.py b/admin_interface/migrations/0004_rename_title_color.py new file mode 100644 index 0000000..e4efba5 --- /dev/null +++ b/admin_interface/migrations/0004_rename_title_color.py @@ -0,0 +1,19 @@ +# -*- coding: utf-8 -*- +from __future__ import unicode_literals + +from django.db import migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ('admin_interface', '0003_add_logo_color'), + ] + + operations = [ + migrations.RenameField( + model_name='theme', + old_name='css_header_title_color', + new_name='title_color', + ), + ] diff --git a/admin_interface/models.py b/admin_interface/models.py index 2810e61..c50890b 100644 --- a/admin_interface/models.py +++ b/admin_interface/models.py @@ -51,6 +51,7 @@ class Theme(models.Model): active = models.BooleanField( default = True ) title = models.CharField( max_length = 50, default = 'Django administration', blank = True ) + title_color = ColorField( blank = True, default = '#F5DD5D', help_text = '#F5DD5D', verbose_name = 'title color' ) title_visible = models.BooleanField( default = True, verbose_name = 'visible' ) logo = models.FileField( upload_to = 'admin-interface/logo/', blank = True, help_text = '(leave blank to use the default Django logo)' ) @@ -58,7 +59,6 @@ class Theme(models.Model): logo_visible = models.BooleanField( default = True, verbose_name = 'visible' ) css_header_background_color = ColorField( blank = True, default = '#0C4B33', help_text = '#0C4B33', verbose_name = 'background color' ) - css_header_title_color = ColorField( blank = True, default = '#F5DD5D', help_text = '#F5DD5D', verbose_name = 'title color' ) css_header_text_color = ColorField( blank = True, default = '#44B78B', help_text = '#44B78B', verbose_name = 'text color' ) css_header_link_color = ColorField( blank = True, default = '#FFFFFF', help_text = '#FFFFFF', verbose_name = 'link color' ) css_header_link_hover_color = ColorField( blank = True, default = '#C9F0DD', help_text = '#C9F0DD', verbose_name = 'link hover color' ) diff --git a/admin_interface/templates/admin_interface/css/admin-interface.css b/admin_interface/templates/admin_interface/css/admin-interface.css index e586840..c417149 100644 --- a/admin_interface/templates/admin_interface/css/admin-interface.css +++ b/admin_interface/templates/admin_interface/css/admin-interface.css @@ -4,7 +4,8 @@ } .admin-interface #branding h1 { - color:{{ theme.css_header_title_color }}; + color:{{ theme.title_color }}; +} .admin-interface #branding h1 .logo.default { background-color: transparent;