Improved scripts and styles order

pull/17/head
Fabio Caccamo 2017-05-11 16:54:43 +02:00
parent 07dc59747d
commit a6ae4230f6
1 changed files with 10 additions and 24 deletions

View File

@ -597,15 +597,21 @@
</style>
{% endblock %}
{% block extrahead %}
{% block blockbots %}
{{ block.super }}
<link rel="stylesheet" type="text/css" href="{% static "admin/css/responsive.css" %}" />
{# 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">
<link rel="stylesheet" type="text/css" href="{% static 'admin/css/responsive.css' %}" />
{% get_admin_interface_theme as theme %}
{% if theme.related_modal_active %}
<link rel="stylesheet" type="text/css" href="{% static "admin_interface/magnific-popup/magnific-popup.css" %}" />
<link rel="stylesheet" type="text/css" href="{% static 'admin_interface/magnific-popup/magnific-popup.css' %}" />
<script type="text/javascript" src="{% static 'admin_interface/magnific-popup/jquery.magnific-popup.js' %}"></script>
<script type="text/javascript" src="{% static 'admin_interface/related-modal/related-modal.js' %}"></script>
{% endif %}
{% endblock %}
{% block bodyclass %}admin-interface flat-theme {% get_admin_interface_theme as theme %}{% if theme.name %}{{ theme.name|slugify }}-theme{% endif %}{% endblock %}
{% block branding %}
{% get_admin_interface_theme as theme %}
<h1 id="site-name">
@ -616,24 +622,4 @@
<span>{% if theme.title %}{% trans theme.title %}{% else %}{% trans 'Django administration' %}{% endif %}</span>
{% endif %}
</h1>
{% endblock %}
{% block bodyclass %}admin-interface flat-theme{% endblock %}
{% block blockbots %}
{{ block.super }}
<meta name="viewport" content="user-scalable=no, width=device-width, initial-scale=1.0, maximum-scale=1.0">
{% endblock %}
{% block sidebar %}
{% endblock %}
{% block footer %}
{{ block.super }}
{% get_admin_interface_theme as theme %}
{% if theme.related_modal_active %}
<script type="text/javascript" src="{% static "admin_interface/magnific-popup/jquery.magnific-popup.js" %}"></script>
<script type="text/javascript" src="{% static "admin_interface/related-modal/related-modal.js" %}"></script>
{% endif %}
{% endblock %}
{% endblock %}