-
Notifications
You must be signed in to change notification settings - Fork 9
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
Feat: implement the top-right usertools block #2324
Conversation
I edited the title, please don't put code like that in PR titles. |
benefits/static/css/admin/styles.css
Outdated
|
||
#user-tools, | ||
#logout-form button { | ||
padding: 0; | ||
font-weight: 300; | ||
font-size: 0.6875rem; | ||
letter-spacing: 0.5px; |
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 believe this CSS Is unneccessary. These styles are already being set by base.css
. The only one necessary is text-transform: unset
.
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.
If we're okay with Sign Out
instead of Sign out
, we can use Bootstrap's text-capitalize
class instead. Unfortunately there is no text-unset
class for text-transform: unset
...... Then we could get all the styles in via utility classes (the preferred method).
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.
That's true, thanks for pointing that out. I only left the necessary CSS so that we match the capitalization in the mock-up (Sign out
).
<img class="icon" width="15" height="15" src="{% static "img/icon/box-arrow-right.svg" %}" alt="" /> | ||
<form id="logout-form" method="post" action="{% url 'admin:logout' %}"> | ||
{% csrf_token %} | ||
<button type="submit">{% translate "Sign out" %}</button> |
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.
Adding a class="border-0"
will remove the border. Then you can delete: https://github.com/cal-itp/benefits/pull/2324/files#diff-77a3765ab5e3cdb49fb5b92ca214d69e2821102f48112dc9eba1a9429ec902fcR71-R73
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.
{% block welcome-msg %} | ||
<span class="text-uppercase text-white"> | ||
{% translate "Welcome," %} | ||
<strong>{% firstof user.get_short_name user.get_username %}</strong>. </span> |
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.
<span class="fw-bold">
instead of <strong>
- the <strong>
doesn't make the font bold for me.
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.
Thanks, made the change in aa73dca
Just some small changes @lalver1 - otherwise looks good to me. Ping me if you have any Qs! |
46285cc
to
51f2462
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.
Thanks @lalver1! Let's make sure @machikoyasuda approves too
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.
LGTM 💯 💯 💯
Closes #2246
This PR is the last part of #2246 and it implements the top right usertools block for in-person eligibility/enrollment pages. It overrides the
text-transform
property it inherits from Django's base admin site so that the welcome message is capitalized (WELCOME, USER) but the sign out message isn't (Sign out).It uses the same idea to remove the underline fromIn addition, it adds a Bootstrap icon and uses it as theSign out
.Sign out
icon.