Added favicon support #28
parent
3b982a84c3
commit
4d07e9fec5
|
|
@ -19,6 +19,10 @@ class ThemeAdmin(admin.ModelAdmin):
|
||||||
'classes': ('wide', ),
|
'classes': ('wide', ),
|
||||||
'fields': ('logo', 'logo_color', 'logo_visible', )
|
'fields': ('logo', 'logo_color', 'logo_visible', )
|
||||||
}),
|
}),
|
||||||
|
('Favicon', {
|
||||||
|
'classes': ('wide', ),
|
||||||
|
'fields': ('favicon', )
|
||||||
|
}),
|
||||||
('Title', {
|
('Title', {
|
||||||
'classes': ('wide', ),
|
'classes': ('wide', ),
|
||||||
'fields': ('title', 'title_color', 'title_visible', )
|
'fields': ('title', 'title_color', 'title_visible', )
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,20 @@
|
||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
# Generated by Django 1.11 on 2017-08-24 10:49
|
||||||
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
|
from django.db import migrations, models
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
('admin_interface', '0006_bytes_to_str'),
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
migrations.AddField(
|
||||||
|
model_name='theme',
|
||||||
|
name='favicon',
|
||||||
|
field=models.FileField(blank=True, help_text='(.ico|.png|.gif - 16x16|32x32 px)', upload_to='admin-interface/favicon/', verbose_name='favicon'),
|
||||||
|
),
|
||||||
|
]
|
||||||
|
|
@ -60,6 +60,8 @@ class Theme(models.Model):
|
||||||
logo_color = ColorField( blank = True, default = '#FFFFFF', help_text = '#FFFFFF', max_length = 10, verbose_name = 'logo color' )
|
logo_color = ColorField( blank = True, default = '#FFFFFF', help_text = '#FFFFFF', max_length = 10, verbose_name = 'logo color' )
|
||||||
logo_visible = models.BooleanField( default = True, verbose_name = 'visible' )
|
logo_visible = models.BooleanField( default = True, verbose_name = 'visible' )
|
||||||
|
|
||||||
|
favicon = models.FileField( upload_to = 'admin-interface/favicon/', blank = True, help_text = '(.ico|.png|.gif - 16x16|32x32 px)', verbose_name = 'favicon' )
|
||||||
|
|
||||||
css_header_background_color = ColorField( blank = True, default = '#0C4B33', help_text = '#0C4B33', max_length = 10, verbose_name = 'background color' )
|
css_header_background_color = ColorField( blank = True, default = '#0C4B33', help_text = '#0C4B33', max_length = 10, verbose_name = 'background color' )
|
||||||
css_header_text_color = ColorField( blank = True, default = '#44B78B', help_text = '#44B78B', max_length = 10, verbose_name = 'text color' )
|
css_header_text_color = ColorField( blank = True, default = '#44B78B', help_text = '#44B78B', max_length = 10, verbose_name = 'text color' )
|
||||||
css_header_link_color = ColorField( blank = True, default = '#FFFFFF', help_text = '#FFFFFF', max_length = 10, verbose_name = 'link color' )
|
css_header_link_color = ColorField( blank = True, default = '#FFFFFF', help_text = '#FFFFFF', max_length = 10, verbose_name = 'link color' )
|
||||||
|
|
|
||||||
|
|
@ -38,6 +38,9 @@ https://github.com/fabiocaccamo/django-admin-interface
|
||||||
{# https://github.com/elky/django-flat-responsive#important-note #}
|
{# https://github.com/elky/django-flat-responsive#important-note #}
|
||||||
<meta name="viewport" content="user-scalable=no, width=device-width, initial-scale=1.0, maximum-scale=1.0">
|
<meta name="viewport" content="user-scalable=no, width=device-width, initial-scale=1.0, maximum-scale=1.0">
|
||||||
<link rel="stylesheet" type="text/css" href="{% static 'admin/css/responsive.css' %}?v={{ version }}" />
|
<link rel="stylesheet" type="text/css" href="{% static 'admin/css/responsive.css' %}?v={{ version }}" />
|
||||||
|
{% if theme.favicon %}
|
||||||
|
<link rel="icon" type="image/x-icon" href="{{ theme.favicon.url }}?v={{ version }}" />
|
||||||
|
{% endif %}
|
||||||
{% if theme.related_modal_active %}
|
{% if theme.related_modal_active %}
|
||||||
<link rel="stylesheet" type="text/css" href="{% static 'admin_interface/magnific-popup/magnific-popup.css' %}?v={{ version }}" />
|
<link rel="stylesheet" type="text/css" href="{% static 'admin_interface/magnific-popup/magnific-popup.css' %}?v={{ version }}" />
|
||||||
<script type="text/javascript" src="{% static 'admin_interface/magnific-popup/jquery.magnific-popup.js' %}?v={{ version }}"></script>
|
<script type="text/javascript" src="{% static 'admin_interface/magnific-popup/jquery.magnific-popup.js' %}?v={{ version }}"></script>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue