Merge pull request #61 from dod-ccpo/request_form_new_layout

Request form new layout
This commit is contained in:
luisgov 2018-07-10 10:19:26 -04:00 committed by GitHub
commit d630e047a0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
9 changed files with 99 additions and 64 deletions

View File

@ -11,7 +11,7 @@ class RequestForm(Form):
# Details of Use: Overall Request Details # Details of Use: Overall Request Details
dollar_value = IntegerField( dollar_value = IntegerField(
"What is the total estimated dollar value of the cloud resources you are requesting using the JEDI CSP Calculator? ", "What is the total estimated dollar value of the cloud resources you are requesting using the <a href=\"#\" target=\"_blank\">JEDI CSP Calculator</a>?",
validators=[InputRequired(), NumberRange(min=1)], validators=[InputRequired(), NumberRange(min=1)],
) )

View File

@ -5,4 +5,12 @@
body { body {
background-color: $color-gray-lightest; background-color: $color-gray-lightest;
display: flex;
flex-direction: column;
justify-content: flex-start;
min-height: 100vh;
> footer {
margin-top: auto;
}
} }

View File

@ -13,6 +13,7 @@
display: flex; display: flex;
flex-direction: row; flex-direction: row;
flex-wrap: wrap; flex-wrap: wrap;
max-width: $site-max-width;
} }
} }

View File

@ -3,7 +3,7 @@
* A generic block container * A generic block container
*/ */
@mixin panel-base { @mixin panel-base {
background-color: $color-white; background-color: $color-white;
border-top-width: 1px; border-top-width: 1px;
border-bottom-width: 1px; border-bottom-width: 1px;
@ -28,6 +28,11 @@
@include panel-base; @include panel-base;
@include panel-theme-default; @include panel-theme-default;
@include panel-margin; @include panel-margin;
&__content {
padding-left: $gap*4;
padding-right: $gap*4;
}
} }
/* /*
@ -35,16 +40,19 @@
* Grid container for panel blocks * Grid container for panel blocks
*/ */
.panel-container { .panel-container {
@include grid-row; @include grid-row;
@include grid-pad; @include grid-pad;
@include margin(($site-margins-mobile * 2) null); @include margin(($site-margins-mobile * 2) null);
@include media($medium-screen) { @include media($medium-screen) {
@include margin(($site-margins * 2) null); @include margin(($site-margins * 2) null);
flex-wrap: nowrap;
} }
> .col { > .col {
@include grid-pad; @include grid-pad;
} }
} }

View File

@ -1,9 +1,6 @@
footer { footer {
position: fixed;
bottom: 0;
width: 100%;
padding-top: 0.5rem;
padding-bottom: 1em;
background-color: $color-gray-lightest; background-color: $color-gray-lightest;
border-top: 1px solid $color-gray-lighter; border-top: 1px solid $color-gray-lighter;
padding-left: $gap*4;
padding-bottom: $gap*2;
} }

View File

@ -2,13 +2,15 @@
@include grid-pad; @include grid-pad;
@include panel-margin; @include panel-margin;
width: 100%; width: 100%;
display: flex;
flex-direction: column;
@include media($large-screen) { @include media($large-screen) {
width: 21rem; width: 21rem;
} }
@include media($xlarge-screen) {
width: 30rem;
}
.sidenav__link { .sidenav__link {
display: block; display: block;
border-top: 1px solid $color-black; border-top: 1px solid $color-black;
@ -36,7 +38,7 @@
background-color: $color-white; background-color: $color-white;
.sidenav__link { .sidenav__link {
&.sidenav__link--active { &--active {
@include h5; @include h5;
box-shadow: none; box-shadow: none;
} }
@ -74,6 +76,8 @@
} }
> ul { > ul {
@include panel-margin;
> li { > li {
&:last-child { &:last-child {
> .sidenav__link { > .sidenav__link {

View File

@ -1,9 +1,3 @@
<footer class="usa-footer usa-footer-slim"> <footer>
<h5>Joint Enterprise Defense Infrastructure</h5>
<div class="usa-grid">
<div class="usa-footer-logo">
<h5 class="usa-footer-slim-logo-heading">Joint Enterprise Defense Infrastructure</h5>
</div>
</div>
</footer> </footer>

View File

@ -1,23 +1,31 @@
<ul class="usa-sidenav-list"> <div class="sidenav">
<ul>
<li>
<a class="sidenav__link" href="/requests">&#8249; All requests</a>
</li>
</ul>
<ul>
{% for i,s in enumerate(screens) %} {% for i,s in enumerate(screens) %}
<li> <li>
{% if i+1==current %} {% if i+1==current %}
<a class="usa-current" href="{{ reverse_url('request_form_update', i+1, request_id) if request_id else reverse_url('request_form_new',i+1) }}"> <a class="sidenav__link sidenav__link--active" href="{{ reverse_url('request_form_update', i+1, request_id) if request_id else reverse_url('request_form_new',i+1) }}">
{{ i+1 }}. {{ s['title'] }} {{ i+1 }}. {{ s['title'] }}
</a> </a>
{% if s.get('subitems') %} {% if s.get('subitems') %}
<ul class="usa-sidenav-sub_list"> <ul>
{% for j,t in enumerate(s['subitems']) %} {% for j,t in enumerate(s['subitems']) %}
<li><a href="#{{ t['id'] }}">{{ t['title'] }}</a></li> <li><a class="sidenav__link" href="#{{ t['id'] }}">{{ t['title'] }}</a></li>
{% end %} {% end %}
</ul> </ul>
{% end %} {% end %}
{% else %} {% else %}
<a href="{{ reverse_url('request_form_update', i+1, request_id) if request_id else reverse_url('request_form_new',i+1) }}"> <a class="sidenav__link" href="{{ reverse_url('request_form_update', i+1, request_id) if request_id else reverse_url('request_form_new',i+1) }}">
{{ i+1 }}. {{ s['title'] }} {{ i+1 }}. {{ s['title'] }}
</a> </a>
{% end %} {% end %}
</li> </li>
{% end %} {% end %}
</ul> </ul>
</div>

View File

@ -1,18 +1,23 @@
{% extends "base.html.to" %} {% extends "base.html.to" %}
{% block sidenav %}
{% include 'requests/sidebar.html.to' %}
{% end %}
{% block content %} {% block content %}
<div class="col col--grow">
<div class="panel">
<main class="panel__content">
<div class="panel__heading">
<h1>New Request</h1>
</div>
<div class="site-action"><a href="/requests">&#8249; All requests</a></div>
<h1>New Request</h1>
<aside class="sidenav usa-width-one-third">
{% include 'requests/sidebar.html.to' %}
</aside>
<main class="main-content usa-width-two-thirds">
{% if request_id %} {% if request_id %}
<form method='POST' action="{{ reverse_url('request_form_update', current, request_id) }}" autocomplete="off"> <form method='POST' action="{{ reverse_url('request_form_update', current, request_id) }}" autocomplete="off">
@ -29,7 +34,17 @@
{% end %} {% end %}
</form> </form>
</main>
</main>
</div>
</div>
{% end %} {% end %}