Merge branch 'master' into ui/responsive-tables
This commit is contained in:
commit
e66deefb6c
14
README.md
14
README.md
@ -99,3 +99,17 @@ To render an icon use `{% module Icon('name') %}` in a template, where `name` is
|
||||
All icons used should be from the Noun Project, specifically [this collection](https://thenounproject.com/monstercritic/collection/tinicons-a-set-of-tiny-icons-perfect-for-ui-elemen/) if possible.
|
||||
|
||||
SVG markup should be cleaned an minified, [Svgsus](http://www.svgs.us/) works well.
|
||||
|
||||
## Deployment
|
||||
|
||||
The `/login-dev` endpoint is protected by HTTP basic auth when deployed. This can be configured for NGINX following the instructions [here](https://docs.nginx.com/nginx/admin-guide/security-controls/configuring-http-basic-authentication/). The following config should added within the main server block for the site:
|
||||
|
||||
```
|
||||
location /login-dev {
|
||||
auth_basic "Developer Access";
|
||||
auth_basic_user_file /etc/apache2/.htpasswd;
|
||||
[proxy information should follow this]
|
||||
}
|
||||
```
|
||||
|
||||
The location block will require the same proxy pass configuration as other location blocks for the app.
|
||||
|
@ -16,10 +16,11 @@ class Icon(UIModule):
|
||||
"components/icon.html.to", svg=svg.read(), name=name, classes=classes)
|
||||
|
||||
class SidenavItem(UIModule):
|
||||
def render(self, label, href, active=False, icon=None):
|
||||
def render(self, label, href, active=False, icon=None, subnav=None):
|
||||
return self.render_string(
|
||||
"navigation/_sidenav_item.html.to",
|
||||
label=label,
|
||||
href=href,
|
||||
active=active,
|
||||
icon=icon)
|
||||
icon=icon,
|
||||
subnav=subnav)
|
||||
|
@ -4,10 +4,6 @@
|
||||
* @source https://github.com/uswds/uswds/blob/develop/src/stylesheets/elements/_inputs.scss
|
||||
*/
|
||||
|
||||
from {
|
||||
margin-bottom: 3rem;
|
||||
}
|
||||
|
||||
select {
|
||||
border-radius: 0;
|
||||
-webkit-appearance: none;
|
||||
@ -28,3 +24,19 @@ select {
|
||||
padding-bottom: 0.5rem;
|
||||
}
|
||||
}
|
||||
|
||||
.usa-search {
|
||||
padding-top: 2px;
|
||||
margin-right: 2rem;
|
||||
|
||||
input[type=search] {
|
||||
height: 4.4rem;
|
||||
font-size: 1.7rem;
|
||||
color: $color-black;
|
||||
}
|
||||
|
||||
button {
|
||||
min-height: 4.4rem;
|
||||
}
|
||||
|
||||
}
|
@ -44,6 +44,7 @@
|
||||
&--active {
|
||||
@include h5;
|
||||
color: $color-primary;
|
||||
box-shadow: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -55,9 +56,21 @@
|
||||
li {
|
||||
.sidenav__link {
|
||||
@include h5;
|
||||
padding: ($gap * .75) ($gap * 3);
|
||||
padding: $gap * .75;
|
||||
padding-left: 4.5rem;
|
||||
border: 0;
|
||||
font-weight: normal;
|
||||
|
||||
.sidenav__link-icon {
|
||||
@include icon-size(12);
|
||||
flex-shrink: 0;
|
||||
margin-right: 1.5rem;
|
||||
margin-left: -3rem
|
||||
}
|
||||
|
||||
.sidenav__link-label {
|
||||
padding-left: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
1
static/icons/plus.svg
Normal file
1
static/icons/plus.svg
Normal file
@ -0,0 +1 @@
|
||||
<svg viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg" fill-rule="evenodd" clip-rule="evenodd" stroke-linejoin="round" stroke-miterlimit="1.414"><path d="M6.966 6.992V1.009C6.988.417 7.322-.052 8.091.005c.505.074.884.488.903 1.004v5.966c2.049-.012 4.096-.002 6.143.073 1.031.113 1.292 1.968-.074 2.017H8.994v6.037c-.039 1.076-1.98 1.313-2.028 0V9.065H.898c-1.076-.039-1.313-1.972 0-2.02 2.022 0 4.045-.031 6.068-.053z" fill-rule="nonzero"/></svg>
|
After Width: | Height: | Size: 452 B |
@ -6,4 +6,19 @@
|
||||
|
||||
<span class="sidenav__link-label">{{label}}</span>
|
||||
</a>
|
||||
|
||||
{% if subnav and active %}
|
||||
<ul>
|
||||
{% for item in subnav %}
|
||||
<li>
|
||||
<a class="sidenav__link {% if item["active"] %}sidenav__link--active{% end %}" href="{{item["href"]}}" title="{{item["label"]}}">
|
||||
{% if "icon" in item %}
|
||||
{% module Icon(item["icon"], classes="sidenav__link-icon") %}
|
||||
{% end %}
|
||||
<span class="sidenav__link-label">{{item["label"]}}</span>
|
||||
</a>
|
||||
</li>
|
||||
{% end %}
|
||||
</ul>
|
||||
{% end %}
|
||||
</li>
|
||||
|
@ -1,10 +1,24 @@
|
||||
<div class="global-navigation sidenav global-navigation__context--{{context}}">
|
||||
<ul>
|
||||
{% if dev() %}
|
||||
{% module SidenavItem("Styleguide", href="/styleguide", icon="visible", active=matchesPath('/styleguide')) %}
|
||||
{% module SidenavItem("Styleguide",
|
||||
href="/styleguide",
|
||||
icon="visible",
|
||||
active=matchesPath('/styleguide'),
|
||||
subnav=[
|
||||
{"label":"Subnav 1", "href":"/styleguide?subnav1", "icon": "plus", "active": matchesPath('/styleguide?subnav1')},
|
||||
{"label":"Subnav 2", "href":"/styleguide?subnav2", "active": matchesPath('/styleguide?subnav2')},
|
||||
]) %}
|
||||
{% end %}
|
||||
|
||||
{% module SidenavItem("Requests", href="/requests", icon="document", active=matchesPath('/requests')) %}
|
||||
{% module SidenavItem("Requests",
|
||||
href="/requests",
|
||||
icon="document",
|
||||
active=matchesPath('/requests'),
|
||||
subnav=[
|
||||
{"label":"New Request", "href":"/requests/new", "icon": "plus", "active": matchesPath('/requests/new')},
|
||||
]
|
||||
) %}
|
||||
{% module SidenavItem("Workspaces", href="/workspaces", icon="cloud", active=matchesPath('/workspaces')) %}
|
||||
</ul>
|
||||
</div>
|
||||
|
@ -3,19 +3,27 @@
|
||||
{% block content %}
|
||||
|
||||
|
||||
|
||||
{% module Alert('Pending Financial Verification',
|
||||
message="<p>Your next step is to create a Task Order (T.O.) associated with JEDI Cloud. Please consult a Contracting Officer (KO) or Contracting Officer Representative (COR) to help with this step.</p>"
|
||||
) %}
|
||||
|
||||
<div class="col col--grow">
|
||||
|
||||
<div class='panel'>
|
||||
<div class='row'>
|
||||
<div class='col col--grow col--pad'>
|
||||
<form class="usa-search usa-search-small">
|
||||
<label class="usa-sr-only" for="search-field-small">Search small</label>
|
||||
<input id="search-field-small" type="search" name="search" placeholder="Search by Order ID">
|
||||
<button type="submit">
|
||||
<span class="usa-sr-only">Search</span>
|
||||
</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="panel">
|
||||
|
||||
<div class="panel__content">
|
||||
|
||||
<div class="panel__heading">
|
||||
<h1>Requests <a class="usa-button usa-button-secondary" href='{{ reverse_url('request_new') }}'>New Request</a></h1>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class='responsive-table-wrapper'>
|
||||
<table>
|
||||
<thead>
|
||||
|
Loading…
x
Reference in New Issue
Block a user