-
Notifications
You must be signed in to change notification settings - Fork 10
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
Admin: Header theme, remove darkmode toggle & breadcrumb theme #2773
Conversation
@thekaveman New PR is up, based on what we discussed today. Started drafting but did not complete a README.md. I wanted to see how this PR lands first with everyone. |
{% extends "admin/base_site.html" %} | ||
{% extends "admin/base.html" %} | ||
|
||
{% block extrahead %} | ||
{% include "admin/includes/favicon.html" %} | ||
{% endblock extrahead %} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Originally had intended to delete this file entirely, but all of the Admin app won't get this new branding unless we override this here as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess I don't fully understand the difference between admin/base.html
and admin/base_site.html
and why we need both? But I can leave that aside for the moment.
My main question is, if admin/base_site.html
(this template) extends admin/base.html
(our custom version of that template) -- then why do we need the same {% block branding %}
here?
I.e. maybe it is enough to just have this template {% extends "admin/base.html" %}
and that's all?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will try this!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@thekaveman Fixed here: 1dca839
benefits/static/css/admin/theme.css
Outdated
--primary: #ffffff; | ||
--bs-body-font-size: 1rem; | ||
--bs-body-color: #212121; /* Body text color */ | ||
--bs-dark-rgb: 33, 33, 33; /* Background color for Header */ | ||
--bs-heading-color: #212121; /* Header text color */ | ||
--bs-secondary-bg-subtle: #f1f1f1; /* Background color for Admin, lighter than bs-secondary, used with bg-secondary-subtle */ | ||
--bs-secondary-rgb: | ||
210, 210, 210; /* Border color for Admin, used with border-secondary */ | ||
--bs-secondary: #c5c4c4; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am leaving this as is, but wanted to note that I'm still noodling with how to format this better overall. In the future, I may explore separating out the Bootstrap variables from Django, etc. It's all still a little overwhelming to have all the variables from variables.css
and these hanging over our heads on this app. Hard to have a mental model about it. This will be improved in future refactors once #2648 is done.
/* Login page */ | ||
|
||
.login .main { | ||
border: 1px solid #000000; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Opted not to use a variable here, b/c it's not being repeated everywhere. Again, will be improved when #2648 is done.
f17aba6
to
51604a0
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks great. We're getting closer to a true "admin theme".
closes #2738
closes #2739
closes #2742
What this PR does, in order
base.html
base.html
branding.html
. It is used on all pages, including login/log out, agency flows and Django admin pages, to add the logo images to the header. The rest of the header is the default.branding.html
across 2 different template styles: Thetheme.css
file uses a body class, CSS variables to add per-page/per-template styling. For example, although all pages have the logo image, the login/log out page's logo size is different. That is declared in thetheme.css
file.Notes
The goal of this overall effort is to have:
theme.css
file that gives the admin the look of the header that has been designed on Figma.theme.css
file in various scenarios.This PR does not achieve:
Welcome, username.
There is no way to remove theView site
link (in a clean way - there are hacky ways to remove this with CSS, probably).The way I'd like to move forward after the primitives Design work (#2648) on Admin is done, is to slowly move code from
styles.css
intotheme.css
.Page-specific changes
Logged out
logged_out
template to be a lot simpler.logged_out
template now inherits fromlogin.html
.Log in / Logged out
Django admin
In-person flow
Documentation of best practices
title
block should come before thebody
block.