Merge branch 'gilsondev-master'

pull/946/head
Matt Westcott 2015-01-29 13:23:22 +00:00
commit e5f7ab5924
3 zmienionych plików z 39 dodań i 2 usunięć

Wyświetl plik

@ -0,0 +1,31 @@
Custom branding
===============
In your projects with Wagtail, you may wish to replace elements such as the Wagtail logo within the admin interface with your own branding. This can be done through Django's template inheritance mechanism, along with the `django-overextends <https://github.com/stephenmcd/django-overextends>`_ package.
Install django-overextends with ``pip install django-overextends`` (or add ``django-overextends`` to your project's requirements file), and add ``'overextends'`` to your project's ``INSTALLED_APPS``. You now need to create a ``templates/wagtailadmin/`` folder within one of your apps - this may be an existing one, or a new one created for this purpose, for example, ``dashboard``. This app must be registered in ``INSTALLED_APPS`` before ``wagtail.wagtailadmin``::
INSTALLED_APPS = (
# ...
'overextends',
'dashboard',
'wagtail.wagtailcore',
'wagtail.wagtailadmin',
# ...
)
The template blocks that are available to be overridden are as follows:
branding_logo
-------------
To replace the default logo, create a template file ``dashboard/templates/wagtailadmin/base.html`` that overrides the block ``branding_logo``::
{% overextends "wagtailadmin/base.html" %}
{% block branding_logo %}
<img src="{{ STATIC_URL }}images/custom-logo.svg" alt="Custom Project" width="80" />
{% endblock %}

Wyświetl plik

@ -9,4 +9,5 @@ How to
deploying
performance
multilingual_sites
custom_branding
contributing

Wyświetl plik

@ -4,7 +4,12 @@
{% block furniture %}
<div class="nav-wrapper">
<div class="inner">
<a href="{% url 'wagtailadmin_home' %}" class="logo" title="Wagtail v.{% wagtail_version %}"><img src="{{ STATIC_URL }}wagtailadmin/images/wagtail-logo.svg" alt="Wagtail" width="80" /><span>{% trans "Dashboard" %}</span></a>
<a href="{% url 'wagtailadmin_home' %}" class="logo" title="Wagtail v.{% wagtail_version %}">
{% block branding_logo %}
<img src="{{ STATIC_URL }}wagtailadmin/images/wagtail-logo.svg" alt="Wagtail" width="80" />
{% endblock %}
<span>{% trans "Dashboard" %}</span>
</a>
<form class="nav-search" action="{% url 'wagtailadmin_pages_search' %}" method="get">
<div>
@ -38,4 +43,4 @@
{% block content %}{% endblock %}
</div>
</div>
{% endblock %}
{% endblock %}