Skip to content

Commit

Permalink
Added link to admin home page on logo and title. #147
Browse files Browse the repository at this point in the history
  • Loading branch information
mjwalter authored Jan 5, 2022
1 parent cc4c379 commit 3f07657
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 9 deletions.
20 changes: 11 additions & 9 deletions admin_interface/templates/admin/base_site.html
Original file line number Diff line number Diff line change
Expand Up @@ -66,16 +66,18 @@
{% block branding %}
{% get_admin_interface_theme as theme %}
<h1 id="site-name">
{% if theme.logo_visible %}
{% if theme.logo %}
<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 %}>
{% else %}
<img class="logo default" style="display:none;" src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" width="104" height="36">
<a href="{% url 'admin:index' %}">
{% if theme.logo_visible %}
{% if theme.logo %}
<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 %}>
{% else %}
<img class="logo default" style="display:none;" src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" width="104" height="36">
{% endif %}
{% endif %}
{% endif %}
{% if theme.title_visible %}
<span>{% if theme.title %}{% trans theme.title %}{% else %}{{ site_header|default:_('Django administration') }}{% endif %}</span>
{% endif %}
{% if theme.title_visible %}
<span>{% if theme.title %}{% trans theme.title %}{% else %}{{ site_header|default:_('Django administration') }}{% endif %}</span>
{% endif %}
</a>
</h1>
{% endblock %}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,10 @@
color: {{ theme.title_color }};
}

.admin-interface #branding h1 a {
color: inherit;
}

.admin-interface #branding h1 .logo.default {
background-color: transparent;
background-repeat: no-repeat;
Expand Down

0 comments on commit 3f07657

Please sign in to comment.