Skip to content

Fix admin logout link #103

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 6, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Fix admin logout link
  • Loading branch information
lundberg committed May 6, 2025
commit 8f014dd404710512f1c5dfcf834d2ab4ca689029
35 changes: 11 additions & 24 deletions src/bananas/static/admin/bananas/css/bananas.css
Original file line number Diff line number Diff line change
Expand Up @@ -614,26 +614,6 @@ a.active.selector-clearall:hover {
/* TODO: selector-icons.svg is hardcoded blue on hover */
}

@supports (background-blend-mode: overlay) {
.datetimeshortcuts .date-icon,
.datetimeshortcuts .clock-icon {
background: none;
background-color: #447e9b /* fallback */;
background-color: var(--secondary-color);
background-blend-mode: overlay;
}

.datetimeshortcuts .date-icon {
-webkit-mask-image: url(../../img/icon-calendar.svg);
mask-image: url(../../img/icon-calendar.svg);
}

.datetimeshortcuts .clock-icon {
-webkit-mask-image: url(../../img/icon-clock.svg);
mask-image: url(../../img/icon-clock.svg);
}
}

.calendar caption,
.calendarbox h2 {
color: white;
Expand All @@ -644,12 +624,15 @@ a.active.selector-clearall:hover {
filter: invert(1);
}

.calendarbox .calendarnav-previous {
background-position: 0 -15px;
.calendar-cancel a {
color: var(--button-fg);
}

.calendarbox .calendarnav-next {
background-position: 0 -45px;
.clockbox h2 {
font-size: 1.1em;
color: white;
background: var(--theme-color);
background-image: var(--bg-lighten-25);
}

#header #changelist-filter,
Expand Down Expand Up @@ -839,3 +822,7 @@ body:not(.popup) #changelist #toolbar {
#changelist .actions span.question {
margin: 0 0 0 10px;
}

.selector-chosen-title {
background: var(--theme-color);
}
5 changes: 4 additions & 1 deletion src/bananas/templates/admin/base_site.html
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,10 @@ <h2>{% trans 'Tools' %}</h2>
{% endif %}

<li>
<a href="{% url 'admin:logout' %}">
<form id="logout-form" method="post" action="{% url 'admin:logout' %}">
{% csrf_token %}
</form>
<a href="" onclick="document.getElementById('logout-form').submit();">
{% trans 'Log out' %}
</a>
</li>
Expand Down
Loading