uswds-jekyll 3.0.0 → 4.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +17 -1
- data/_includes/components/header--basic.html +3 -3
- data/_includes/components/header--extended.html +9 -6
- data/_includes/sidenav.html +4 -3
- data/_includes/styles.html +5 -9
- data/_includes/subnav.html +1 -1
- data/_layouts/default.html +1 -1
- data/_layouts/page.html +2 -2
- data/_layouts/post.html +2 -14
- data/_sass/components/_all.scss +7 -0
- data/_sass/components/_alt-color-section.scss +35 -0
- data/_sass/components/_footer.scss +26 -0
- data/_sass/components/_header.scss +27 -0
- data/_sass/components/_hero.scss +45 -0
- data/_sass/components/_nav-buttons.scss +24 -0
- data/_sass/components/_side-nav.scss +56 -0
- data/_sass/components/_site-width.scss +12 -0
- data/_sass/components/_top-nav.scss +73 -0
- data/_sass/components/_usa-banner.scss +29 -0
- data/assets/css/main.scss +93 -0
- data/assets/img/circle.png +0 -0
- data/assets/img/hero.png +0 -0
- metadata +15 -5
- data/assets/uswds/css/uswds.css +0 -4849
- data/assets/uswds/css/uswds.min.css +0 -4
- data/assets/uswds/css/uswds.min.css.map +0 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a63ca02d7d8bd697b702cbeb0c70f4653e113b0a
|
4
|
+
data.tar.gz: 2058e94b36962545e0602766ac351efe7e8e3d99
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 07e5ccaec467a9efea372f10b9140f30db3e6fea9da0fd073256ddb2131c5d50f56f820aa9ea23e0d377e7115544194b56725eebd0875810693c010f14ea338d
|
7
|
+
data.tar.gz: 11af72c0f14a46be40197b246cf20e3d11eee1e26c0ee7e39717f6599e9fe87ab8f5b6a59dd8ed6602d4ba2f5735de49b465c9524bdfa07c7c33a23aa37ee90e
|
data/README.md
CHANGED
@@ -11,9 +11,11 @@ This is a [Jekyll theme](https://jekyllrb.com/docs/themes/) for the
|
|
11
11
|
- [Site title](#site-title)
|
12
12
|
- [Navigation](#navigation)
|
13
13
|
- [Page subnavigation](#page-subnavigation)
|
14
|
+
- [Color and font configuration](#color-and-font-configuration)
|
14
15
|
- [Search](#search)
|
15
16
|
- [Analytics](#analytics)
|
16
17
|
- [Last modified date](#last-modified-date)
|
18
|
+
- [Anchor JS](#anchor-js)
|
17
19
|
1. [Assets](#assets)
|
18
20
|
- [Stylesheets](#stylesheets)
|
19
21
|
- [Scripts](#scripts)
|
@@ -146,7 +148,7 @@ This theme's navigation system is powerful and flexible. Named
|
|
146
148
|
navigational lists live in your project's `_data/navigation.yml`,
|
147
149
|
e.g.
|
148
150
|
|
149
|
-
By default all links are assumed to be internal to the site. You can add `external: true` to links that are external.
|
151
|
+
By default all links are assumed to be internal to the site. You can add `external: true` to links that are external. You can also add `class: class-name` to add a class to a specific link.
|
150
152
|
|
151
153
|
```yml
|
152
154
|
# _data/navigation.yml
|
@@ -223,6 +225,10 @@ redcarpet:
|
|
223
225
|
- with_toc_data
|
224
226
|
```
|
225
227
|
|
228
|
+
### Color and font configuration
|
229
|
+
|
230
|
+
The default colors and fonts can be configured in the `_data/theme.yml` file.
|
231
|
+
|
226
232
|
### Search
|
227
233
|
|
228
234
|
[Search.gov](https://search.gov/) is used for search and can be configured in `_config.yml`.
|
@@ -262,6 +268,16 @@ This will add the date right before the footer component and uses the `last-modi
|
|
262
268
|
# last_updated: true
|
263
269
|
```
|
264
270
|
|
271
|
+
### Anchor JS
|
272
|
+
|
273
|
+
You can show an anchor link next to header tags by uncommenting this section from the `_config.yml` data file.
|
274
|
+
This will add an anchor link after the header tag on the page and post layouts making ech header linkable.
|
275
|
+
See https://github.com/bryanbraun/anchorjs for more information.
|
276
|
+
|
277
|
+
```yml
|
278
|
+
# anchor_js_targets: [h1, h2, h3, h4, h5, h6]
|
279
|
+
```
|
280
|
+
|
265
281
|
## Assets
|
266
282
|
|
267
283
|
The [stylesheet](_includes/styles.html) and [script](_includes/scripts.html)
|
@@ -40,9 +40,9 @@
|
|
40
40
|
{% endfor %}
|
41
41
|
</ul>
|
42
42
|
{% else %}
|
43
|
-
|
44
|
-
|
45
|
-
|
43
|
+
<a class="{% if _section.class %}{{ _section.class }}{% else %} usa-nav-link {% endif %} {% if _section.href == page.permalink %} usa-current{% endif %}" href="{% if _section.external %}{{ _section.href }}{% else %}{{ _section.href | relative_url }}{% endif %}">
|
44
|
+
<span>{{ _section.text }}</span>
|
45
|
+
</a>
|
46
46
|
{% endif %}
|
47
47
|
</li>
|
48
48
|
{% endfor %}
|
@@ -39,9 +39,9 @@
|
|
39
39
|
{% endfor %}
|
40
40
|
</ul>
|
41
41
|
{% else %}
|
42
|
-
|
43
|
-
|
44
|
-
|
42
|
+
<a class="{% if _section.class %}{{ _section.class }}{% else %} usa-nav-link {% endif %} {% if _section.href == page.permalink %} usa-current{% endif %}" href="{% if _section.external %}{{ _section.href }}{% else %}{{ _section.href | relative_url }}{% endif %}">
|
43
|
+
<span>{{ _section.text }}</span>
|
44
|
+
</a>
|
45
45
|
{% endif %}
|
46
46
|
</li>
|
47
47
|
{% endfor %}
|
@@ -74,9 +74,12 @@
|
|
74
74
|
{% endif %}
|
75
75
|
{% assign secondary_links = site.data.navigation[_secondary.links] | default: _secondary.links %}
|
76
76
|
{% for _link in secondary_links %}
|
77
|
-
|
78
|
-
|
79
|
-
|
77
|
+
<li>
|
78
|
+
<a href="{% if _link.external %}{{ _link.href }}{% else %}{{ _link.href | relative_url }}{% endif %}"
|
79
|
+
{% if _link.class %} class="{{ _link.class }}" {% endif %}>
|
80
|
+
{{ _link.text }}
|
81
|
+
</a>
|
82
|
+
</li>
|
80
83
|
{% endfor %}
|
81
84
|
</ul>
|
82
85
|
</div>
|
data/_includes/sidenav.html
CHANGED
@@ -6,9 +6,10 @@
|
|
6
6
|
{% assign _current = true %}
|
7
7
|
{% endif %}
|
8
8
|
<li>
|
9
|
-
<a href="{% if link.external == true %}{{ link.href }}{% else %}{{ link.href | relative_url }}{% endif %}"
|
10
|
-
|
11
|
-
|
9
|
+
<a href="{% if link.external == true %}{{ link.href }}{% else %}{{ link.href | relative_url }}{% endif %}"
|
10
|
+
{% if _current %} class="usa-current" {% endif %}
|
11
|
+
{% if link.class %}class="{{ link.class }}" {% endif %} >
|
12
|
+
{{ link.text }}
|
12
13
|
</a>
|
13
14
|
{% if _current and page.subnav %}
|
14
15
|
<ul class="usa-sidenav-sub_list">
|
data/_includes/styles.html
CHANGED
@@ -1,15 +1,11 @@
|
|
1
1
|
{% assign _styles = '' | split: '' %}
|
2
|
-
{% assign
|
3
|
-
|
4
|
-
{% assign _uswds_css = '/assets/uswds/css/uswds.min.css' %}
|
5
|
-
{% assign _site_styles = '' | split: ''
|
6
|
-
| push: _uswds_css %}
|
7
|
-
{% endunless %}
|
2
|
+
{% assign _default_styles = '' | split: ''
|
3
|
+
| push: '/assets/css/main.css' %}
|
8
4
|
{% assign _styles = _styles
|
9
|
-
| push:
|
5
|
+
| push: _default_styles
|
6
|
+
| push: site.styles
|
10
7
|
| push: layout.styles
|
11
|
-
| push: page.styles
|
12
|
-
| uniq %}
|
8
|
+
| push: page.styles %}
|
13
9
|
{% for _list in _styles %}{% for _style in _list %}
|
14
10
|
<link rel="stylesheet"
|
15
11
|
href="{{ _style.href | default: _style | relative_url }}"
|
data/_includes/subnav.html
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
{% for link in include.links %}
|
2
2
|
<li>
|
3
|
-
<a href="{% if link.external %}{{ link.href }}{% else %}{{ link.href }}{% endif %}">{{ link.text }}</a>
|
3
|
+
<a href="{% if link.external %}{{ link.href }}{% else %}{{ link.href }}{% endif %}" {% if link.class %} class="{{ link.class }}" {% endif %}>{{ link.text }} {{ link.class }}</a>
|
4
4
|
</li>
|
5
5
|
{% endfor %}
|
data/_layouts/default.html
CHANGED
@@ -9,7 +9,7 @@
|
|
9
9
|
{% include analytics.html %}
|
10
10
|
{% endif %}
|
11
11
|
</head>
|
12
|
-
<body class="{{ layout.class }} {{ page.class }}">
|
12
|
+
<body class="{{ layout.class }} {{ page.class }} {% if site.site_width %}site-{{ site.site_width }}{% endif %}">
|
13
13
|
|
14
14
|
{% include skipnav.html %}
|
15
15
|
{% include header.html %}
|
data/_layouts/page.html
CHANGED
@@ -5,11 +5,11 @@ main:
|
|
5
5
|
---
|
6
6
|
{% assign sidenav = site.data.navigation[page.sidenav] | default: page.sidenav %}
|
7
7
|
{% if sidenav %}
|
8
|
-
<aside class="usa-
|
8
|
+
<aside class="usa-layout-docs-sidenav sidenav">
|
9
9
|
{% include sidenav.html links=sidenav %}
|
10
10
|
</aside>
|
11
11
|
|
12
|
-
<div class="usa-
|
12
|
+
<div class="usa-layout-docs-main_content">
|
13
13
|
{{ content }}
|
14
14
|
</div>
|
15
15
|
{% else %}
|
data/_layouts/post.html
CHANGED
@@ -1,19 +1,7 @@
|
|
1
1
|
---
|
2
|
-
layout:
|
2
|
+
layout: page
|
3
3
|
main:
|
4
4
|
class: usa-grid usa-section usa-content usa-layout-docs
|
5
5
|
---
|
6
|
-
{% assign sidenav = site.data.navigation[page.sidenav] | default: page.sidenav %}
|
7
|
-
{% if sidenav %}
|
8
|
-
<aside class="usa-width-one-fourth usa-layout-docs-sidenav">
|
9
|
-
{% include sidenav.html links=sidenav %}
|
10
|
-
</aside>
|
11
6
|
|
12
|
-
|
13
|
-
{{ content }}
|
14
|
-
</div>
|
15
|
-
{% else %}
|
16
|
-
<div class="usa-layout-docs-main_content">
|
17
|
-
{{ content }}
|
18
|
-
</div>
|
19
|
-
{% endif %}
|
7
|
+
{{ content }}
|
@@ -0,0 +1,35 @@
|
|
1
|
+
.usa-section-dark {
|
2
|
+
@if variable-exists(alt-section-bg) {
|
3
|
+
background-color: $alt-section-bg;
|
4
|
+
}
|
5
|
+
|
6
|
+
|
7
|
+
h1,
|
8
|
+
h2,
|
9
|
+
h3,
|
10
|
+
h4,
|
11
|
+
h5,
|
12
|
+
h6 {
|
13
|
+
@if variable-exists(alt-section-header) {
|
14
|
+
color: $alt-section-header;
|
15
|
+
}
|
16
|
+
}
|
17
|
+
|
18
|
+
p {
|
19
|
+
@if variable-exists(alt-section-text) {
|
20
|
+
color: $alt-section-text;
|
21
|
+
}
|
22
|
+
}
|
23
|
+
|
24
|
+
a {
|
25
|
+
@if variable-exists(alt-section-link) {
|
26
|
+
color: $alt-section-link;
|
27
|
+
}
|
28
|
+
|
29
|
+
&:hover {
|
30
|
+
@if variable-exists(alt-section-link-hover) {
|
31
|
+
color: $alt-section-link-hover;
|
32
|
+
}
|
33
|
+
}
|
34
|
+
}
|
35
|
+
}
|
@@ -0,0 +1,26 @@
|
|
1
|
+
.usa-footer-primary-section {
|
2
|
+
@if variable-exists(primary-footer-bg) {
|
3
|
+
background-color: $primary-footer-bg;
|
4
|
+
}
|
5
|
+
|
6
|
+
.usa-footer-primary-link {
|
7
|
+
@if variable-exists(primary-footer-link) {
|
8
|
+
color: $primary-footer-link;
|
9
|
+
}
|
10
|
+
}
|
11
|
+
}
|
12
|
+
|
13
|
+
.usa-footer-secondary_section {
|
14
|
+
@if variable-exists(footer-bg) {
|
15
|
+
background-color: $footer-bg;
|
16
|
+
}
|
17
|
+
@if variable-exists(footer-text) {
|
18
|
+
color: $footer-text;
|
19
|
+
}
|
20
|
+
|
21
|
+
a {
|
22
|
+
@if variable-exists(footer-link) {
|
23
|
+
color: $footer-link;
|
24
|
+
}
|
25
|
+
}
|
26
|
+
}
|
@@ -0,0 +1,27 @@
|
|
1
|
+
.usa-header {
|
2
|
+
@if variable-exists(header-bg) {
|
3
|
+
background-color: $header-bg;
|
4
|
+
}
|
5
|
+
|
6
|
+
.usa-logo {
|
7
|
+
a {
|
8
|
+
@if variable-exists(header-title) {
|
9
|
+
color: $header-title;
|
10
|
+
}
|
11
|
+
}
|
12
|
+
}
|
13
|
+
|
14
|
+
.usa-nav-secondary-links {
|
15
|
+
a {
|
16
|
+
@if variable-exists(header-link) {
|
17
|
+
color: $header-link;
|
18
|
+
}
|
19
|
+
|
20
|
+
&:hover {
|
21
|
+
@if variable-exists(header-link-hover) {
|
22
|
+
color: $header-link-hover;
|
23
|
+
}
|
24
|
+
}
|
25
|
+
}
|
26
|
+
}
|
27
|
+
}
|
@@ -0,0 +1,45 @@
|
|
1
|
+
.usa-hero {
|
2
|
+
.usa-hero-callout {
|
3
|
+
@if variable-exists(hero-bg) {
|
4
|
+
background-color: $hero-bg;
|
5
|
+
}
|
6
|
+
|
7
|
+
h1,
|
8
|
+
h2,
|
9
|
+
h3,
|
10
|
+
h4,
|
11
|
+
h5,
|
12
|
+
h6 {
|
13
|
+
@if variable-exists(hero-header) {
|
14
|
+
color: $hero-header;
|
15
|
+
}
|
16
|
+
}
|
17
|
+
|
18
|
+
.usa-hero-callout-alt {
|
19
|
+
@if variable-exists(hero-header-alt) {
|
20
|
+
color: $hero-header-alt;
|
21
|
+
}
|
22
|
+
}
|
23
|
+
|
24
|
+
p {
|
25
|
+
@if variable-exists(hero-text) {
|
26
|
+
color: $hero-text;
|
27
|
+
}
|
28
|
+
}
|
29
|
+
|
30
|
+
.usa-hero-link {
|
31
|
+
@if variable-exists(hero-link) {
|
32
|
+
color: $hero-link;
|
33
|
+
}
|
34
|
+
}
|
35
|
+
|
36
|
+
.usa-button {
|
37
|
+
@if variable-exists(hero-button-bg) {
|
38
|
+
background-color: $hero-button-bg;
|
39
|
+
}
|
40
|
+
@if variable-exists(hero-button-text) {
|
41
|
+
color: $hero-button-text;
|
42
|
+
}
|
43
|
+
}
|
44
|
+
}
|
45
|
+
}
|
@@ -0,0 +1,24 @@
|
|
1
|
+
.usa-header,
|
2
|
+
.usa-sidenav-list {
|
3
|
+
@include media($nav-width) {
|
4
|
+
.usa-button {
|
5
|
+
margin: 0;
|
6
|
+
width: auto;
|
7
|
+
}
|
8
|
+
}
|
9
|
+
.usa-button {
|
10
|
+
color: $color-white;
|
11
|
+
padding: 1rem;
|
12
|
+
&:hover {
|
13
|
+
background-color: $color-primary-darker;
|
14
|
+
color: $color-white;
|
15
|
+
text-decoration: none;
|
16
|
+
}
|
17
|
+
}
|
18
|
+
}
|
19
|
+
.usa-sidenav-list,
|
20
|
+
.usa-footer-nav .usa-footer-primary-content {
|
21
|
+
.usa-button {
|
22
|
+
margin: 1rem 0;
|
23
|
+
}
|
24
|
+
}
|
@@ -0,0 +1,56 @@
|
|
1
|
+
.usa-sidenav-list {
|
2
|
+
@if variable-exists(side-nav-bg) {
|
3
|
+
background-color: $side-nav-bg;
|
4
|
+
}
|
5
|
+
|
6
|
+
a {
|
7
|
+
@if variable-exists(side-nav-link) {
|
8
|
+
color: $side-nav-link;
|
9
|
+
}
|
10
|
+
|
11
|
+
&:hover {
|
12
|
+
@if variable-exists(side-nav-link-hover-bg) {
|
13
|
+
background-color: $side-nav-link-hover-bg;
|
14
|
+
}
|
15
|
+
@if variable-exists(side-nav-link-hover) {
|
16
|
+
color: $side-nav-link-hover;
|
17
|
+
}
|
18
|
+
}
|
19
|
+
|
20
|
+
&.usa-current {
|
21
|
+
@if variable-exists(side-nav-link-current) {
|
22
|
+
border-color: $side-nav-link-current;
|
23
|
+
}
|
24
|
+
@if variable-exists(side-nav-link-current) {
|
25
|
+
color: $side-nav-link-current;
|
26
|
+
}
|
27
|
+
}
|
28
|
+
}
|
29
|
+
}
|
30
|
+
// Styles for adjusting the breakpoint for the side nav
|
31
|
+
.usa-layout-docs {
|
32
|
+
display: flex;
|
33
|
+
}
|
34
|
+
@include media ($medium-screen){
|
35
|
+
.sidenav {
|
36
|
+
width: 250px;
|
37
|
+
}
|
38
|
+
}
|
39
|
+
|
40
|
+
@include media($nav-width) {
|
41
|
+
.usa-layout-docs {
|
42
|
+
display: block;
|
43
|
+
|
44
|
+
.sidenav {
|
45
|
+
display: block;
|
46
|
+
float: left;
|
47
|
+
padding-right: 1rem;
|
48
|
+
|
49
|
+
+ .usa-layout-docs-main_content {
|
50
|
+
display: inline-block;
|
51
|
+
padding-left: 3rem;
|
52
|
+
width: calc(100% - 250px);
|
53
|
+
}
|
54
|
+
}
|
55
|
+
}
|
56
|
+
}
|
@@ -0,0 +1,73 @@
|
|
1
|
+
|
2
|
+
.usa-header {
|
3
|
+
.usa-nav {
|
4
|
+
@if variable-exists(top-nav-bg) {
|
5
|
+
background-color: $top-nav-bg;
|
6
|
+
}
|
7
|
+
}
|
8
|
+
|
9
|
+
.usa-nav-primary {
|
10
|
+
a,
|
11
|
+
button {
|
12
|
+
&:hover {
|
13
|
+
@if variable-exists(top-nav-link-hover-bg) {
|
14
|
+
background-color: $top-nav-link-hover-bg;
|
15
|
+
}
|
16
|
+
}
|
17
|
+
}
|
18
|
+
|
19
|
+
.usa-nav-link {
|
20
|
+
span {
|
21
|
+
@if variable-exists(top-nav-link) {
|
22
|
+
color: $top-nav-link;
|
23
|
+
}
|
24
|
+
}
|
25
|
+
|
26
|
+
&:hover {
|
27
|
+
@if variable-exists(top-nav-link-hover) {
|
28
|
+
color: $top-nav-link-hover;
|
29
|
+
}
|
30
|
+
|
31
|
+
span {
|
32
|
+
@if variable-exists(top-nav-link-current) {
|
33
|
+
border-bottom-color: $top-nav-link-current;
|
34
|
+
}
|
35
|
+
@if variable-exists(top-nav-link-hover) {
|
36
|
+
color: $top-nav-link-hover;
|
37
|
+
}
|
38
|
+
}
|
39
|
+
}
|
40
|
+
}
|
41
|
+
|
42
|
+
.usa-current,
|
43
|
+
button[aria-expanded=true] {
|
44
|
+
span {
|
45
|
+
@if variable-exists(top-nav-link-current) {
|
46
|
+
border-color: $top-nav-link-current;
|
47
|
+
}
|
48
|
+
@if variable-exists(top-nav-link-current) {
|
49
|
+
color: $top-nav-link-current;
|
50
|
+
}
|
51
|
+
}
|
52
|
+
}
|
53
|
+
}
|
54
|
+
|
55
|
+
button[aria-expanded=true],
|
56
|
+
button[aria-expanded=true]:hover,
|
57
|
+
.usa-nav-submenu {
|
58
|
+
@if variable-exists(top-nav-dropdown-bg) {
|
59
|
+
background-color: $top-nav-dropdown-bg;
|
60
|
+
}
|
61
|
+
}
|
62
|
+
|
63
|
+
.usa-nav-submenu {
|
64
|
+
a:hover {
|
65
|
+
@if variable-exists(top-nav-dropdown-link-hover-bg) {
|
66
|
+
background-color: $top-nav-dropdown-link-hover-bg;
|
67
|
+
}
|
68
|
+
@if variable-exists(top-nav-dropdown-link) {
|
69
|
+
color: $top-nav-dropdown-link;
|
70
|
+
}
|
71
|
+
}
|
72
|
+
}
|
73
|
+
}
|