Skip to content

Commit

Permalink
2282 - Home page changes with new design
Browse files Browse the repository at this point in the history
  • Loading branch information
jonathanbobel committed Jan 29, 2025
1 parent 6c3d6ee commit 4a359b1
Show file tree
Hide file tree
Showing 15 changed files with 528 additions and 580 deletions.
2 changes: 1 addition & 1 deletion app/assets/error_pages/5xx.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<link rel="icon" type="image/png" sizes="16x16" href="/static/images/favicon-16x16.png">
<link rel="manifest" href="{{ asset_url('images/site.webmanifest') }}">

<link rel="stylesheet" media="screen" href="/static/stylesheets/main.css?d077f86473501ab244de0b30600536ee" />
<link rel="stylesheet" media="screen" href="/static/stylesheets/legacy/uk.css?d077f86473501ab244de0b30600536ee" />
<link rel="stylesheet" media="print" href="/static/stylesheets/print.css?28010888ca5719dc83d7c2c80f6ed2b2" />

<meta property="og:image" content="/static/images/notify-og-image.png">
Expand Down
25 changes: 25 additions & 0 deletions app/assets/images/product/Icon set.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/assets/images/product/people-with-phone.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/assets/images/product/who-can-use-notify.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
186 changes: 186 additions & 0 deletions app/assets/sass/uswds/_dashboard.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,186 @@
@use "uswds-core" as *;

.dashboard {
.big-number-with-status {
.big-number-smaller {
display: flex;
flex-direction: column;
.big-number-number {
font-size: units(5);
line-height: units(5);
}
.big-number-label {
font-size: units(2.5);
}
}
.big-number-status {
background: color('green-cool-40v');
display: flex;
padding: units(1) units(2);
&--failing {
padding: 0;
a.usa-link {
color: white;
background: color('red-warm-50v');
padding: units(1) units(2);
margin: 0;
width: 100%;
&:hover {
background: color('red-warm-60v');
}
}
}
}
}
.usa-table {
width: 100%;
caption {
margin-bottom: 0;
}
.table-field-center-aligned {
text-align: center;
}
.template-statistics-table-template-name {
padding-left: units(4);
display: inline-block;
background-repeat: no-repeat;
background-image: url(../img/material-icons/description.svg);
}
}
.get-started {
border: 1px solid color('gray-90');
padding: units(2);
margin-bottom: units(4);
}
}

.dashboard-table {
table {
width: 100%;
}
.file-list-filename {
font-weight: bold;
}
.file-list-hint {
margin: 0;
word-break: break-word;
}
.table-field,
.table-field-right-aligned {
width: 50%;
}
&.usage-table {
.table-field,
.table-field-left-aligned,
.table-field-right-aligned {
width: auto;
}
}
}

.job-status-table {
table-layout: fixed;

thead tr th {
border-bottom: 0;
}

thead,
tbody,
tr {
width: 100%;
}

th:first-child,
td:first-child {
width: 75%;
}

th:nth-child(2),
R td:nth-child(2) {
width: 25%;
}
}

.usage-table {
ul {
list-style: none;
padding: 0;
margin: 0;
}
.big-number-smallest {
display: flex;
flex-direction: column;
}
}

.job-table {
width: 100%;
border-collapse: collapse;
td.file-name {
width: 25%;
overflow-wrap: anywhere;
}
td.jobid {
width: 5%;
}
td.template {
width: 25%;
}
td.time-sent {
width: 15%;
}
td.sender {
width: 20%;
overflow-wrap: break-word;
}
td.count-of-recipients {
width: 5%;
}
td.report {
width: 2%;
text-align: center;
}
td.delivered {
width: 2%;
text-align: center;
}
td.failed {
width: 2%;
text-align: center;
}
td.report img {
padding-top: 5px;
}
th {
padding: 0.5rem 1rem;
}
}

@media (max-width: 768px) {
.usa-table-container--scrollable-mobile {
margin: 0;
overflow-y: hidden;
}
}

.usa-table th[data-sortable][aria-sort='ascending'],
.usa-table th[data-sortable][aria-sort='descending'] {
background-color: #a1d3ff;
}

#template-list {
max-height: 500px;
overflow-y: auto;
padding: units(1) 0 units(1) units(1);
margin: units(2) 0 units(5);
ul {
padding: 0;
margin: 0;
list-style: none;
}
}

.usa-prose > p.max-width-full {
max-width: 100%;
}
81 changes: 81 additions & 0 deletions app/assets/sass/uswds/_do-dont.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
@use 'uswds-core' as *;

$do-dont-color-do: 'green-cool-50v';
$do-dont-color-dont: 'red-cool-50v';
$do-dont-color-border: 'gray-cool-20';
$do-dont-padding: 3;
$do-dont-top-bar-width: 1;

.do-dont {
display: flex;
height: 100%;
padding-top: units(2);
}

.do-dont__do,
.do-dont__dont {
background-color: color('white');
border: 1px solid color($do-dont-color-border);
flex: 1 0 0;
height: 100%;
position: relative;
}

.do-dont__do {
padding: 0rem;
}

.do-dont__do:before,
.do-dont__dont:before {
content: '';
position: absolute;
height: units($do-dont-top-bar-width);
width: calc(100% + 2px);
top: -1px;
left: -1px;
}

.do-dont__do:before {
background-color: color($do-dont-color-do);
}

.do-dont__dont:before {
background-color: color($do-dont-color-dont);
}

.do-dont__heading {
// @include typeset("lang", "lg", 2);
align-items: center;
border-bottom: 1px solid color($do-dont-color-border);
display: flex;
font-weight: fw('bold');
margin: 0;
padding: units(4) units($do-dont-padding) units($do-dont-padding);

.usa-icon {
@include u-square(3);
margin-right: units(0.5);
}
}

.do-dont__do .do-dont__heading {
color: color($do-dont-color-do);
}

.do-dont__dont .do-dont__heading {
color: color($do-dont-color-dont);
}

.do-dont__content {
padding: 0 units($do-dont-padding) units($do-dont-padding)
units($do-dont-padding);

ul {
margin-bottom: 0;
overflow-wrap: anywhere;
}

li + li {
margin-top: units(1);
}
}
62 changes: 62 additions & 0 deletions app/assets/sass/uswds/_home.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
@use "uswds-core" as *;
@use "tokens" as vars;

.usa-section--dark {
background-color: color('gray-90');
h1 {
font-family: family('sans');
font-size: units(7);
color: vars.$notify-light-blue;
@media (max-width: units('desktop')) {
font-size: units(5);
}
}
}

.usa-hero > .grid-container {
@media (max-width: units('desktop')) {
padding-top: 1rem;
padding-bottom: 1rem;
}
}

.usa-section {
&__home {
h2 {
font-size: units(6);
line-height: 1.2;
}
p {
font-size: 20px;
}
}
}

.home-cards {
justify-content: space-between;
.usa-card__container {
align-items: center;
text-align: center;
overflow: hidden;
border: 0;
.img-container {
width: units('card');
height: units('card');
margin: units(3) 0;
border-radius: 50%;
background: color('gray-cool-10');
display: flex;
align-items: center;
justify-content: center;
img {
width: units(10);
height: units(10);
filter: brightness(0) saturate(100%) invert(22%) sepia(98%) saturate(1829%) hue-rotate(187deg) brightness(88%) contrast(101%);
}
}
h3, p {
font-size: units(3);
line-height: 1.3;
}
}
}
35 changes: 35 additions & 0 deletions app/assets/sass/uswds/_tabs.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
@use "uswds-core" as *;

// Tabs

.tabs {
.pill {
display: flex;
list-style: none;
padding: 0;
.pill-item__container {
border: 1px solid color('gray-cool-10');
flex: 1;
display: flex;
flex-direction: column;
text-align: center;
font-size: units(2);
a {
padding: units(4);
.big-number-smaller {
font-size: units(5);
line-height: units(6);
}
.big-number-smallest {
font-size: units(3);
}
&:not(.pill-item--selected):hover {
background: color('blue-warm-70v');
}
&.pill-item--selected:hover {
color: color('blue-60v');
}
}
}
}
}
8 changes: 8 additions & 0 deletions app/assets/sass/uswds/_tokens.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
@use "uswds-core" as *;

// Colors
$notify-primary: color('blue-60v');
$notify-secondary: color('red-warm-50v');
$notify-light-blue: color('blue-40v');
$notify-tertiary: color('gold-20v');
$notify-text: color('ink');
Loading

0 comments on commit 4a359b1

Please sign in to comment.