Skip to content
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

[#21] display version in admin #155

Merged
merged 6 commits into from
Jul 16, 2024
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
29 changes: 7 additions & 22 deletions src/nrc/sass/admin/_admin_theme.scss
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,12 @@ DO NOT PUT ANY TARGET APP-SPECIFIC RULES HERE.

--object-tools-bg: #888;
--object-tools-hover-bg: #{$color-dark};

// version styling
--version-fg: var(--body-quiet-color);

// environment styling
--env-button-fg: #{$color-secondary};
}


Expand Down Expand Up @@ -127,27 +133,6 @@ div.breadcrumbs {
background: url('../../img/admin/calendar-alt-regular.svg') 0 0/14px 14px no-repeat !important;
}

/**
* Environment banner
*/
.env {
display: block;
line-height: 35px;
text-align: center;
font-weight: bold;
text-transform: uppercase;
color: $color-secondary;
background-color: $color-dark;
position: fixed;
top: 0;
height: 35px;
width: 300px;
left: 50%;
margin-left: -150px;
z-index: 1000001;
box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.2);
}

/**
* Django form field lengths
*/
Expand Down Expand Up @@ -241,4 +226,4 @@ div:has(> div.help ) {

div:has(> div.help ) {
display: flex;
}
}
9 changes: 1 addition & 8 deletions src/nrc/templates/admin/base_site.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{% extends "admin/base_site.html" %}
{% extends "open_api_framework/admin/base_site.html" %}
{% load i18n static %}

{% block title %}{{ title }} | {{ settings.PROJECT_NAME }}{% endblock %}
Expand Down Expand Up @@ -32,10 +32,3 @@ <h1 id="site-name"><a href="{% url 'admin:index' %}">{{ settings.PROJECT_NAME }}
{% endif %}
<a href="{% url 'admin:logout' %}">{% trans 'Log out' %}</a>
{% endblock %}

{% block messages %}
{% if settings.ENVIRONMENT_SHOWN_IN_ADMIN %}
<div class="env env-{{ settings.ENVIRONMENT }}">{{ settings.ENVIRONMENT }}</div>
{% endif %}
{{ block.super }}
{% endblock %}
Loading