mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-08-17 15:04:11 +02:00
Matched figma padding
This commit is contained in:
parent
81e5f5f8bb
commit
7fafecab0a
7 changed files with 50 additions and 36 deletions
|
@ -211,7 +211,7 @@ function handleValidationClick(e) {
|
||||||
* An IIFE that will attach validators to inputs.
|
* An IIFE that will attach validators to inputs.
|
||||||
*
|
*
|
||||||
* It looks for elements with `validate="<type> <type>"` and adds change handlers.
|
* It looks for elements with `validate="<type> <type>"` and adds change handlers.
|
||||||
*
|
*
|
||||||
* These handlers know about two other attributes:
|
* These handlers know about two other attributes:
|
||||||
* - `validate-for="<id>"` creates a button which will run the validator(s) on <id>
|
* - `validate-for="<id>"` creates a button which will run the validator(s) on <id>
|
||||||
* - `auto-validate` will run validator(s) when the user stops typing (otherwise,
|
* - `auto-validate` will run validator(s) when the user stops typing (otherwise,
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
@use "cisa_colors" as *;
|
@use "cisa_colors" as *;
|
||||||
@use "uswds-core" as *;
|
@use "uswds-core" as *;
|
||||||
|
|
||||||
// We'll use Django's CSS vars: https://docs.djangoproject.com/en/4.2/ref/contrib/admin/#theming-support
|
// We'll use Django's CSS vars: https://docs.djangoproject.com/en/4.2/ref/contrib/admin/#theming-support
|
||||||
// and assign USWDS theme vars whenever possible
|
// and assign USWDS theme vars whenever possible
|
||||||
// If needed (see below), we'll use the USWDS hex value
|
// If needed (see below), we'll use the USWDS hex value
|
||||||
// As a last resort, we'll use CISA colors to supplement the palette
|
// As a last resort, we'll use CISA colors to supplement the palette
|
||||||
|
@ -72,34 +72,34 @@ html[data-theme="light"] {
|
||||||
@media (prefers-color-scheme: dark) {
|
@media (prefers-color-scheme: dark) {
|
||||||
:root,
|
:root,
|
||||||
html[data-theme="dark"] {
|
html[data-theme="dark"] {
|
||||||
// Edit the primary to meet accessibility requ.
|
// Edit the primary to meet accessibility requ.
|
||||||
--primary: #23485a;
|
--primary: #23485a;
|
||||||
--primary-fg: #f7f7f7;
|
--primary-fg: #f7f7f7;
|
||||||
|
|
||||||
--body-fg: #eeeeee;
|
--body-fg: #eeeeee;
|
||||||
--body-bg: #121212;
|
--body-bg: #121212;
|
||||||
--body-quiet-color: #e0e0e0;
|
--body-quiet-color: #e0e0e0;
|
||||||
--body-loud-color: #ffffff;
|
--body-loud-color: #ffffff;
|
||||||
|
|
||||||
--breadcrumbs-link-fg: #e0e0e0;
|
--breadcrumbs-link-fg: #e0e0e0;
|
||||||
--breadcrumbs-bg: var(--primary);
|
--breadcrumbs-bg: var(--primary);
|
||||||
|
|
||||||
--link-fg: #81d4fa;
|
--link-fg: #81d4fa;
|
||||||
--link-hover-color: #4ac1f7;
|
--link-hover-color: #4ac1f7;
|
||||||
--link-selected-fg: #6f94c6;
|
--link-selected-fg: #6f94c6;
|
||||||
|
|
||||||
--hairline-color: #272727;
|
--hairline-color: #272727;
|
||||||
--border-color: #353535;
|
--border-color: #353535;
|
||||||
|
|
||||||
--error-fg: #e35f5f;
|
--error-fg: #e35f5f;
|
||||||
--message-success-bg: #006b1b;
|
--message-success-bg: #006b1b;
|
||||||
--message-warning-bg: #583305;
|
--message-warning-bg: #583305;
|
||||||
--message-error-bg: #570808;
|
--message-error-bg: #570808;
|
||||||
|
|
||||||
--darkened-bg: #212121;
|
--darkened-bg: #212121;
|
||||||
--selected-bg: #1b1b1b;
|
--selected-bg: #1b1b1b;
|
||||||
--selected-row: #00363a;
|
--selected-row: #00363a;
|
||||||
|
|
||||||
--close-button-bg: #333333;
|
--close-button-bg: #333333;
|
||||||
--close-button-hover-bg: #666666;
|
--close-button-hover-bg: #666666;
|
||||||
}
|
}
|
||||||
|
@ -108,7 +108,7 @@ html[data-theme="light"] {
|
||||||
.change-list .usa-table,
|
.change-list .usa-table,
|
||||||
.change-list .usa-table--striped tbody tr:nth-child(odd) td,
|
.change-list .usa-table--striped tbody tr:nth-child(odd) td,
|
||||||
.change-list .usa-table--borderless thead th,
|
.change-list .usa-table--borderless thead th,
|
||||||
.change-list .usa-table thead td,
|
.change-list .usa-table thead td,
|
||||||
.change-list .usa-table thead th,
|
.change-list .usa-table thead th,
|
||||||
body.dashboard,
|
body.dashboard,
|
||||||
body.change-list,
|
body.change-list,
|
||||||
|
@ -122,7 +122,7 @@ html[data-theme="dark"] {
|
||||||
.change-list .usa-table,
|
.change-list .usa-table,
|
||||||
.change-list .usa-table--striped tbody tr:nth-child(odd) td,
|
.change-list .usa-table--striped tbody tr:nth-child(odd) td,
|
||||||
.change-list .usa-table--borderless thead th,
|
.change-list .usa-table--borderless thead th,
|
||||||
.change-list .usa-table thead td,
|
.change-list .usa-table thead td,
|
||||||
.change-list .usa-table thead th,
|
.change-list .usa-table thead th,
|
||||||
body.dashboard,
|
body.dashboard,
|
||||||
body.change-list,
|
body.change-list,
|
||||||
|
@ -163,7 +163,7 @@ table > caption > a {
|
||||||
height: auto!important;
|
height: auto!important;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Keep th from collapsing
|
// Keep th from collapsing
|
||||||
.min-width-25 {
|
.min-width-25 {
|
||||||
min-width: 25px;
|
min-width: 25px;
|
||||||
}
|
}
|
||||||
|
|
|
@ -26,7 +26,6 @@ $letter-space--xs: .0125em;
|
||||||
@use "uswds-core" as *;
|
@use "uswds-core" as *;
|
||||||
|
|
||||||
/* Styles for making visible to screen reader / AT users only. */
|
/* Styles for making visible to screen reader / AT users only. */
|
||||||
|
|
||||||
.sr-only {
|
.sr-only {
|
||||||
@include sr-only;
|
@include sr-only;
|
||||||
}
|
}
|
||||||
|
@ -62,9 +61,9 @@ body {
|
||||||
}
|
}
|
||||||
|
|
||||||
p,
|
p,
|
||||||
address,
|
address,
|
||||||
.usa-list li {
|
.usa-list li {
|
||||||
@include typeset('sans', 'sm', 5);
|
@include typeset('sans', 'sm', 5);
|
||||||
max-width: measure(5);
|
max-width: measure(5);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -119,7 +118,7 @@ h2 {
|
||||||
color: color('violet-70v'); //USWDS default
|
color: color('violet-70v'); //USWDS default
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.register-form-step .usa-form-group:first-of-type,
|
.register-form-step .usa-form-group:first-of-type,
|
||||||
.register-form-step .usa-label:first-of-type {
|
.register-form-step .usa-label:first-of-type {
|
||||||
margin-top: units(1);
|
margin-top: units(1);
|
||||||
}
|
}
|
||||||
|
@ -181,7 +180,7 @@ a.withdraw:active {
|
||||||
a.link_usa-checked {
|
a.link_usa-checked {
|
||||||
padding: 0;
|
padding: 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -243,7 +242,7 @@ a.withdraw:active {
|
||||||
|
|
||||||
.usa-form .usa-button {
|
.usa-form .usa-button {
|
||||||
margin-top: units(3);
|
margin-top: units(3);
|
||||||
}
|
}
|
||||||
|
|
||||||
.usa-button--unstyled .usa-icon {
|
.usa-button--unstyled .usa-icon {
|
||||||
vertical-align: bottom;
|
vertical-align: bottom;
|
||||||
|
@ -396,7 +395,7 @@ a.usa-button--unstyled:visited {
|
||||||
}
|
}
|
||||||
|
|
||||||
.dotgov-status-box {
|
.dotgov-status-box {
|
||||||
background-color: color('primary-lightest');
|
background-color: color('primary-lightest');
|
||||||
border-color: color('accent-cool-lighter');
|
border-color: color('accent-cool-lighter');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -441,3 +440,13 @@ abbr[title] {
|
||||||
font-size: units(3);
|
font-size: units(3);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// The icon was off center for some reason
|
||||||
|
// Fixes that issue
|
||||||
|
@media (min-width: 64em){
|
||||||
|
.usa-alert--warning{
|
||||||
|
.usa-alert__body::before {
|
||||||
|
left: 1rem !important;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
@ -23,7 +23,7 @@
|
||||||
<main id="main-content" class="grid-container">
|
<main id="main-content" class="grid-container">
|
||||||
|
|
||||||
{% if is_analyst_or_superuser and analyst_action == 'edit' and analyst_action_location == domain.pk %}
|
{% if is_analyst_or_superuser and analyst_action == 'edit' and analyst_action_location == domain.pk %}
|
||||||
<div class="usa-alert usa-alert--warning">
|
<div class="usa-alert usa-alert--warning margin-bottom-2">
|
||||||
<div class="usa-alert__body">
|
<div class="usa-alert__body">
|
||||||
<h4 class="usa-alert__heading larger-font-sizing">Attention!</h4>
|
<h4 class="usa-alert__heading larger-font-sizing">Attention!</h4>
|
||||||
<p class="usa-alert__text ">
|
<p class="usa-alert__text ">
|
||||||
|
|
|
@ -4,8 +4,8 @@
|
||||||
<nav aria-label="Domain sections">
|
<nav aria-label="Domain sections">
|
||||||
<ul class="usa-sidenav">
|
<ul class="usa-sidenav">
|
||||||
<li class="usa-sidenav__item">
|
<li class="usa-sidenav__item">
|
||||||
{% url 'domain' pk=domain.id as url %}
|
{% url 'domain' pk=domain.id as url %}
|
||||||
<a href="{{ url }}"
|
<a href="{{ url }}"
|
||||||
{% if request.path == url %}class="usa-current"{% endif %}
|
{% if request.path == url %}class="usa-current"{% endif %}
|
||||||
>
|
>
|
||||||
Domain overview
|
Domain overview
|
||||||
|
@ -13,7 +13,7 @@
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
<li class="usa-sidenav__item">
|
<li class="usa-sidenav__item">
|
||||||
{% url 'domain-nameservers' pk=domain.id as url %}
|
{% url 'domain-nameservers' pk=domain.id as url %}
|
||||||
<a href="{{ url }}"
|
<a href="{{ url }}"
|
||||||
{% if request.path == url %}class="usa-current"{% endif %}
|
{% if request.path == url %}class="usa-current"{% endif %}
|
||||||
>
|
>
|
||||||
|
@ -28,7 +28,7 @@
|
||||||
>
|
>
|
||||||
Organization name and mailing address
|
Organization name and mailing address
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
<li class="usa-sidenav__item">
|
<li class="usa-sidenav__item">
|
||||||
{% url 'domain-authorizing-official' pk=domain.id as url %}
|
{% url 'domain-authorizing-official' pk=domain.id as url %}
|
||||||
|
|
|
@ -2,7 +2,12 @@
|
||||||
|
|
||||||
from django.contrib.auth.mixins import PermissionRequiredMixin
|
from django.contrib.auth.mixins import PermissionRequiredMixin
|
||||||
|
|
||||||
from registrar.models import DomainApplication, DomainInvitation, DomainInformation, UserDomainRole
|
from registrar.models import (
|
||||||
|
DomainApplication,
|
||||||
|
DomainInvitation,
|
||||||
|
DomainInformation,
|
||||||
|
UserDomainRole,
|
||||||
|
)
|
||||||
import logging
|
import logging
|
||||||
|
|
||||||
logger = logging.getLogger(__name__)
|
logger = logging.getLogger(__name__)
|
||||||
|
@ -71,11 +76,10 @@ class DomainPermission(PermissionsLoginMixin):
|
||||||
|
|
||||||
session = self.request.session
|
session = self.request.session
|
||||||
# Check if the user is attempting a valid edit action.
|
# Check if the user is attempting a valid edit action.
|
||||||
# If analyst_action is present, analyst_action_location will be present.
|
|
||||||
# if it isn't, then it either suggests tampering
|
|
||||||
# or a larger omnipresent issue with sessions.
|
|
||||||
can_do_action = (
|
can_do_action = (
|
||||||
"analyst_action" in session and session["analyst_action_location"] == pk
|
"analyst_action" in session
|
||||||
|
and "analyst_action_location" in session
|
||||||
|
and session["analyst_action_location"] == pk
|
||||||
)
|
)
|
||||||
|
|
||||||
# If the valid session keys exist, if the user is permissioned,
|
# If the valid session keys exist, if the user is permissioned,
|
||||||
|
|
|
@ -34,14 +34,15 @@ class DomainPermissionView(DomainPermission, DetailView, abc.ABC):
|
||||||
def get_context_data(self, **kwargs):
|
def get_context_data(self, **kwargs):
|
||||||
context = super().get_context_data(**kwargs)
|
context = super().get_context_data(**kwargs)
|
||||||
user = self.request.user
|
user = self.request.user
|
||||||
|
|
||||||
context["is_analyst_or_superuser"] = user.is_staff or user.is_superuser
|
context["is_analyst_or_superuser"] = user.is_staff or user.is_superuser
|
||||||
|
# Stored in a variable for the linter
|
||||||
|
action = "analyst_action"
|
||||||
|
action_location = "analyst_action_location"
|
||||||
# Flag to see if an analyst is attempting to make edits
|
# Flag to see if an analyst is attempting to make edits
|
||||||
if "analyst_action" in self.request.session:
|
if action in self.request.session:
|
||||||
# Stored in a variable for the linter
|
|
||||||
action = "analyst_action"
|
|
||||||
context[action] = self.request.session[action]
|
context[action] = self.request.session[action]
|
||||||
context[f"{action}_location"] = self.request.session[f"{action}_location"]
|
if action_location in self.request.session:
|
||||||
|
context[action_location] = self.request.session[action_location]
|
||||||
|
|
||||||
return context
|
return context
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue