Added link to admin home page on logo and title. #147

pull/149/head
Micah Walter 2022-01-05 12:31:07 -05:00 committed by GitHub
parent cc4c379465
commit 3f076578bb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 15 additions and 9 deletions

View File

@ -66,16 +66,18 @@ flat-theme admin-interface
{% block branding %} {% block branding %}
{% get_admin_interface_theme as theme %} {% get_admin_interface_theme as theme %}
<h1 id="site-name"> <h1 id="site-name">
{% if theme.logo_visible %} <a href="{% url 'admin:index' %}">
{% if theme.logo %} {% if theme.logo_visible %}
<img class="logo" style="display:none;" src="{{ theme.logo.url }}" {% if theme.logo.width %}width="{{ theme.logo.width }}"{% endif %} {% if theme.logo.height %}height="{{ theme.logo.height }}"{% endif %}> {% if theme.logo %}
{% else %} <img class="logo" style="display:none;" src="{{ theme.logo.url }}" {% if theme.logo.width %}width="{{ theme.logo.width }}"{% endif %} {% if theme.logo.height %}height="{{ theme.logo.height }}"{% endif %}>
<img class="logo default" style="display:none;" src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" width="104" height="36"> {% else %}
<img class="logo default" style="display:none;" src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" width="104" height="36">
{% endif %}
{% endif %} {% endif %}
{% endif %} {% if theme.title_visible %}
{% if theme.title_visible %} <span>{% if theme.title %}{% trans theme.title %}{% else %}{{ site_header|default:_('Django administration') }}{% endif %}</span>
<span>{% if theme.title %}{% trans theme.title %}{% else %}{{ site_header|default:_('Django administration') }}{% endif %}</span> {% endif %}
{% endif %} </a>
</h1> </h1>
{% endblock %} {% endblock %}

View File

@ -137,6 +137,10 @@
color: {{ theme.title_color }}; color: {{ theme.title_color }};
} }
.admin-interface #branding h1 a {
color: inherit;
}
.admin-interface #branding h1 .logo.default { .admin-interface #branding h1 .logo.default {
background-color: transparent; background-color: transparent;
background-repeat: no-repeat; background-repeat: no-repeat;