guides_style_18f 2.0.0 → 2.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 2fdc81b55e678b0619609534ff4167f2653ece69
4
- data.tar.gz: 960c4b506c0fc67dfc1c29d4eea005b764b77c7d
3
+ metadata.gz: b025cf055319032f297a1af6baa78501752da623
4
+ data.tar.gz: 936672e4360233a31b83f2208398d2d355ccf468
5
5
  SHA512:
6
- metadata.gz: 023c619537a1fba2493b9ab2131315753e98e02f5a8f01af1b42505d0d76d47fbc6b6111f55d1fcd6c1af2fa4365efe3acb909f7b78d012682c928d79c290e45
7
- data.tar.gz: 7e97a9c7a26f6e29d8a05690d18869975d9bde5fe9a97f43b0e686c03f3f50793122eba68918e073e5943d3bfd7c56e3fcd5c5c9d8e32232fd0b6741170ab08e
6
+ metadata.gz: eba02bbd1be8f07b74653bef4224979ffab31a62928dbefc396b595bca419622712fa6f337d9e66baf75d83bb578ab76fd326be161358cc0231d9dc93e405d00
7
+ data.tar.gz: 64834c5d1805c4cdbfcbc2d64bd72cb32df13ec40f881f464b6f36252567cd6d681210bcc167ce3f4dbdafe6d8477b1885a53c5e18c720d7c0a16f218b1a7243
@@ -0,0 +1,8 @@
1
+ version: 2
2
+ jobs:
3
+ build:
4
+ docker:
5
+ - image: circleci/ruby:2
6
+ steps:
7
+ - checkout
8
+ - run: ./go build
@@ -0,0 +1,20 @@
1
+ _site/
2
+ .sass-cache/
3
+ .DS_store
4
+ .*.swp
5
+ *.gem
6
+ /pkg/
7
+ /tmp/
8
+
9
+ # for a library or gem, you might want to ignore these files since the code is
10
+ # intended to run in multiple environments; otherwise, check them in:
11
+ Gemfile.lock
12
+ .ruby-version
13
+ .ruby-gemset
14
+
15
+ # unless supporting rvm < 1.11.0 or doing something fancy, ignore this:
16
+ .rvmrc
17
+
18
+ # Ignore `bundle install --path=vendor/bundle` artifacts
19
+ .bundle/
20
+ /vendor/
@@ -0,0 +1,99 @@
1
+ AllCops:
2
+ Include:
3
+ - 'Gemfile'
4
+ - 'Rakefile'
5
+ - 'go'
6
+
7
+ Lint/ParenthesesAsGroupedExpression:
8
+ Description: Checks for method calls with a space before the opening parenthesis.
9
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#parens-no-spaces
10
+ Enabled: true
11
+
12
+ Metrics/ClassLength:
13
+ Description: Avoid classes longer than 100 lines of code.
14
+ Enabled: true
15
+ CountComments: false
16
+ Max: 100
17
+
18
+ Metrics/LineLength:
19
+ Description: Limit lines to 80 characters.
20
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#80-character-limits
21
+ Enabled: true
22
+ Max: 80
23
+ AllowURI: true
24
+ URISchemes:
25
+ - http
26
+ - https
27
+
28
+ Metrics/MethodLength:
29
+ Description: Avoid methods longer than 10 lines of code.
30
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#short-methods
31
+ Enabled: true
32
+ CountComments: false
33
+ Max: 10
34
+
35
+ Metrics/ModuleLength:
36
+ Description: Avoid modules longer than 100 lines of code.
37
+ Enabled: true
38
+ CountComments: false
39
+ Max: 100
40
+
41
+ Style/AndOr:
42
+ Description: Use &&/|| instead of and/or.
43
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-and-or-or
44
+ Enabled: true
45
+ EnforcedStyle: always
46
+ SupportedStyles:
47
+ - always
48
+ - conditionals
49
+
50
+ Style/Documentation:
51
+ Description: Document classes and non-namespace modules.
52
+ Enabled: false
53
+
54
+ Style/DotPosition:
55
+ Description: Checks the position of the dot in multi-line method calls.
56
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#consistent-multi-line-chains
57
+ Enabled: true
58
+ EnforcedStyle: leading
59
+ SupportedStyles:
60
+ - leading
61
+ - trailing
62
+
63
+ Style/ExtraSpacing:
64
+ Description: Do not use unnecessary spacing.
65
+ Enabled: false
66
+
67
+ Style/GuardClause:
68
+ Description: Check for conditionals that can be replaced with guard clauses
69
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-nested-conditionals
70
+ Enabled: true
71
+ MinBodyLength: 1
72
+
73
+ Style/StringLiterals:
74
+ Description: Checks if uses of quotes match the configured preference.
75
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#consistent-string-literals
76
+ Enabled: true
77
+ EnforcedStyle: single_quotes
78
+ SupportedStyles:
79
+ - single_quotes
80
+ - double_quotes
81
+
82
+ Style/TrailingComma:
83
+ Description:
84
+ Not allowing a comma after the last item in a list or hash when each item
85
+ is on a single line is a bug, not a feature.
86
+ EnforcedStyleForMultiline: comma
87
+
88
+ Style/AlignParameters:
89
+ Description:
90
+ When aligning parameters is not appropriate due to line-length
91
+ constraints, single indent for the lines after the first is also
92
+ acceptable.
93
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-double-indent
94
+ EnforcedStyle: with_fixed_indentation
95
+
96
+ Style/MultilineOperationIndentation:
97
+ Description:
98
+ Allow indented multiline operations, rather than strict alignment.
99
+ EnforcedStyle: indented
data/Gemfile ADDED
@@ -0,0 +1,3 @@
1
+ source 'https://rubygems.org'
2
+
3
+ gemspec
@@ -0,0 +1,10 @@
1
+ require 'bundler/gem_tasks'
2
+ require 'rake/testtask'
3
+
4
+ Rake::TestTask.new do |t|
5
+ t.libs << 'test'
6
+ t.test_files = FileList['test/*test.rb']
7
+ end
8
+
9
+ desc 'Run tests'
10
+ task default: :test
@@ -0,0 +1,16 @@
1
+ {% if site.google_analytics_ua %}<!-- Google Analytics -->
2
+ <script>
3
+ (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
4
+ (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
5
+ m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
6
+ })(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
7
+ ga('create', '{{ site.google_analytics_ua }}', 'auto');
8
+
9
+ // anonymize user IPs (chops off the last IP triplet)
10
+ ga('set', 'anonymizeIp', true);
11
+ ga('set', 'forceSSL', true);
12
+ ga('send', 'pageview');
13
+ </script>
14
+
15
+ <!-- Digital Analytics Program roll-up, see https://analytics.usa.gov for data -->
16
+ <script id="_fed_an_ua_tag" src="https://dap.digitalgov.gov/Universal-Federated-Analytics-Min.js?agency=GSA"></script>{% endif %}
@@ -0,0 +1,32 @@
1
+ <div class="usa-banner">
2
+ <div class="usa-accordion">
3
+ <div class="usa-banner-header">
4
+ <div class="usa-grid usa-banner-inner">
5
+ <img src="{{ site.baseurl }}/assets/uswds/img/favicons/favicon-57.png" alt="U.S. flag">
6
+ <p>An official website of the United States government</p>
7
+ <button class="usa-accordion-button usa-banner-button"
8
+ aria-expanded="false" aria-controls="gov-banner">
9
+ <span class="usa-banner-button-text">Here's how you know</span>
10
+ </button>
11
+ </div>
12
+ </div>
13
+ <div class="usa-banner-content usa-grid usa-accordion-content" id="gov-banner">
14
+ <div class="usa-banner-guidance-gov usa-width-one-half">
15
+ <img class="usa-banner-icon usa-media_block-img" src="{{ site.baseurl }}/assets/uswds/img/icon-dot-gov.svg" alt="Dot gov">
16
+ <div class="usa-media_block-body">
17
+ <p>
18
+ <strong>The .gov means it’s official.</strong>
19
+ <br>
20
+ Federal government websites always use a .gov or .mil domain. Before sharing sensitive information online, make sure you’re on a .gov or .mil site by inspecting your browser’s address (or “location”) bar.
21
+ </p>
22
+ </div>
23
+ </div>
24
+ <div class="usa-banner-guidance-ssl usa-width-one-half">
25
+ <img class="usa-banner-icon usa-media_block-img" src="{{ site.baseurl }}/assets/uswds/img/icon-https.svg" alt="SSL">
26
+ <div class="usa-media_block-body">
27
+ <p>This site is also protected by an SSL (Secure Sockets Layer) certificate that’s been signed by the U.S. government. The <strong>https://</strong> means all transmitted data is encrypted  — in other words, any information or browsing history that you provide is transmitted securely.</p>
28
+ </div>
29
+ </div>
30
+ </div>
31
+ </div>
32
+ </div>
@@ -0,0 +1,8 @@
1
+ <nav class="nav-main">
2
+ <div class="wrapper">
3
+ <ol class="breadcrumbs">
4
+ {% for breadcrumb in page.breadcrumbs %}<li>{% if forloop.last %}{{ breadcrumb.text }}{% else %}<a href="{{ site.baseurl}}{{ breadcrumb.url }}">{{ breadcrumb.text }}</a>{% endif %}</li>
5
+ {% endfor %}
6
+ </div>
7
+ </div>
8
+ </nav>
@@ -0,0 +1,47 @@
1
+ <footer class="usa-footer usa-footer-slim" role="contentinfo">
2
+ {% assign repo = site.repos[0] %}
3
+ <div class="usa-grid usa-footer-return-to-top">
4
+ <a href="#top">Return to top</a>
5
+ </div>
6
+ <div class="usa-footer-primary-section">
7
+ <div class="usa-grid">
8
+ <div class="usa-footer-logo usa-width-one-third">
9
+ {% assign logo = site.logourl | default: '/assets/img/18f-logo.png' %}
10
+ {% assign logoalt = site.logoalt | default: '18F logo' %}
11
+ <img src="{{ site.baseurl }}{{ logo }}" alt="{{ logoalt }}">
12
+ </div>
13
+
14
+ <nav class="usa-footer-nav usa-width-one-third">
15
+ <ul class="usa-unstyled-list">
16
+ <li class="usa-footer-primary-content">
17
+ <a class="usa-footer-primary-link" href="https://github.com/18F/guides-template/">
18
+ 18F Guides theme
19
+ </a>
20
+ </li>
21
+ {% if repo %}
22
+ <li class="usa-footer-primary-content">
23
+ <a class="usa-footer-primary-link" href="{{ repo.url }}/edit/{{ repo.default_branch | default: 'master' }}/{{ page.path }}">
24
+ Edit this page
25
+ </a>
26
+ </li>
27
+ <li class="usa-footer-primary-content">
28
+ <a class="usa-footer-primary-link" href="{{ repo.url }}/issues">
29
+ File an issue on GitHub
30
+ </a>
31
+ </li>
32
+ {% endif %}
33
+ </ul>
34
+ </nav>
35
+ <div class="usa-width-one-third">
36
+ <ul class="usa-unstyled-list">
37
+ <li class="usa-footer-primary-content">
38
+ Maintained by <a href="{{ site.author.url }}">{{ site.author.name }}</a>
39
+ </li>
40
+ <li class="usa-footer-primary-content">
41
+ Hosted by <a href="https://federalist.fr.cloud.gov/">Federalist</a>
42
+ </li>
43
+ </ul>
44
+ </div>
45
+ </div>
46
+ </div>
47
+ </footer>
@@ -0,0 +1,70 @@
1
+ <head>
2
+ <meta http-equiv="X-UA-Compatible" content="IE=edge">
3
+ <meta charset="utf-8">
4
+ <meta name="viewport" content="width=device-width">
5
+
6
+
7
+
8
+
9
+ <!-- Title, Twitter, and OpenGraph data
10
+ ================================================== -->
11
+
12
+ <meta name="twitter:site" content="@18F">
13
+ <meta name="twitter:creator" content="@18F">
14
+ <meta property="og:type" content="website" />
15
+
16
+ {% if site.title %}
17
+ <meta property="og:site_name" content="{{ site.title | xml_escape }}" />
18
+ {% endif %}
19
+
20
+ {% if site.url %}
21
+ <meta property="og:url" content="{{ site.url }}{{ page.url }}" />
22
+ <link rel="canonical" href="{{ site.url }}{{ page.url }}" />
23
+ {% endif %}
24
+
25
+ <!-- title, description, and image may change per-page, per-post -->
26
+ {% if page.title %}
27
+ <title>{{ page.title }} - {{ site.name }}</title>
28
+ <meta property="og:title" content="{{ page.title | xml_escape }} - {{ site.name }}" />
29
+ {% elsif site.title %}
30
+ <title>{{ site.title }} - {{ site.name }}</title>
31
+ <meta property="og:title" content="{{ site.title | xml_escape }} - {{ site.name }}" />
32
+ {% endif %}
33
+
34
+ {% if page.description %}
35
+ <meta name="description" content="{{ page.description | xml_escape }}">
36
+ <meta property="og:description" content="{{ page.description | xml_escape }}" />
37
+ {% elsif site.description %}
38
+ <meta name="description" content="{{ site.description | xml_escape }}">
39
+ <meta property="og:description" content="{{ site.description | xml_escape }}" />
40
+ {% endif %}
41
+
42
+ <!-- use large summary card for posts with images, normal summary otherwise -->
43
+ {% if page.image %}
44
+ <meta name="twitter:card" content="summary_large_image">
45
+ <meta property="og:image" content="{{ site.url }}{{ page.image }}" />
46
+ {% else %}
47
+ <meta name="twitter:card" content="summary">
48
+ <meta property="og:image" content="https://18f.gsa.gov/assets/images/18F-Logo-L.png" />
49
+ {% endif %}
50
+
51
+ <!-- If any of the file paths after site.baseurl change, the old ones need to stay in place. See https://github.com/18F/pages-server/issues/55 for more information. -->
52
+ <link rel="shortcut icon" type="image/ico" href="{{ site.baseurl }}/assets/favicons/favicon.ico" />
53
+ <link rel="icon" type="image/png" href="{{ site.baseurl }}/assets/favicons/favicon.png" />
54
+ <link rel="apple-touch-icon-precomposed" href="{{ site.baseurl }}/assets/favicons/18f-center-57.png" />
55
+ <link rel="apple-touch-icon-precomposed" sizes="72x72" href="{{ site.baseurl }}/assets/favicons/18f-center-72.png" />
56
+ <link rel="apple-touch-icon-precomposed" sizes="114x114" href="{{ site.baseurl }}/assets/favicons/18f-center-114.png" />
57
+ <link rel="apple-touch-icon-precomposed" sizes="144x144" href="{{ site.baseurl }}/assets/favicons/18f-center-144.png"/>
58
+ <link rel="icon" type="image/png" sizes="192x192" href="{{ site.baseurl }}/assets/favicons/18f-center-192.png" />
59
+ <link rel="stylesheet" href="{{ site.baseurl }}/assets/uswds/css/uswds.min.css">
60
+ <link rel="stylesheet" href="{{ site.baseurl }}/assets/css/main.css">
61
+ {% for style in site.styles %}
62
+ <link rel="stylesheet" href="{{ site.baseurl }}/{{ style }}">
63
+ {% endfor %}
64
+ {% for style in page.styles %}
65
+ <link rel="stylesheet" href="{{ site.baseurl }}/{{ style }}">
66
+ {% endfor %}
67
+
68
+ <script src="{{ site.baseurl }}/assets/uswds/js/uswds.min.js"></script>
69
+
70
+ </head>
@@ -0,0 +1,71 @@
1
+ <header class="usa-header usa-header-{{ header.type | default: 'extended' }}" role="banner">
2
+ {% include banner.html %}
3
+ <a class="usa-skipnav" href="#main">Skip to main content</a>
4
+ <div class="usa-navbar">
5
+ <button class="usa-menu-btn">Menu</button>
6
+ <div class="usa-logo" id="logo">
7
+ <em class="usa-logo-text">
8
+ <a accesskey="1" title="Home" aria-label="Home" href="{{ site.baseurl }}/">{{ site.name }}</a>
9
+ </em>
10
+ </div>
11
+ </div>
12
+
13
+
14
+
15
+ <nav role="navigation" class="usa-nav">
16
+ <div class="usa-nav-inner">
17
+ <button class="usa-nav-close">
18
+ <img src="{{ site.baseurl }}/assets/uswds/img/close.svg" alt="close">
19
+ </button>
20
+
21
+ {% assign primary_links = site.header_nav.links %}
22
+ {% if primary_links %}
23
+ <ul class="usa-nav-primary usa-accordion">
24
+ {% for _section in primary_links %}
25
+ <li>
26
+ {# logic for accordions should go here in an if/else #}
27
+ <a class="usa-nav-link" href="{{ _section.href | relative_url }}">
28
+ <span>{{ _section.text }}</span>
29
+ </a>
30
+ </li>
31
+ {% endfor %}
32
+ </ul>
33
+ {% endif %}
34
+
35
+ <div class="usa-nav-secondary">
36
+ <ul class="usa-unstyled-list usa-nav-secondary-links">
37
+ {% if site.jekyll_pages_api_search %}
38
+ <li>
39
+ <div role="search" class="usa-search usa-search-small">
40
+ {% jekyll_pages_api_search_interface %}
41
+ </div>
42
+ </li>
43
+ {% endif %}
44
+ {% if site.search_gov_handle %}
45
+ <li>
46
+ <div role="search" class="usa-search usa-search-small">
47
+ <form accept-charset="UTF-8" action="https://search.usa.gov/search" id="search_form" class="search-interface" method="get">
48
+ <input name="utf8" type="hidden" value="&#x2713;" />
49
+ <input id="affiliate" name="affiliate" type="hidden" value="{{ site.search_gov_handle }}" />
50
+ <label>
51
+ <span class="label-text">Search</span>
52
+ <input autocomplete="off" type="search" id="query" class="usagov-search-autocomplete" name="query" placeholder="Search">
53
+ </label>
54
+ <button name="commit" type="submit">Search</button>
55
+ </form>
56
+ </div>
57
+ </li>
58
+ {% endif %}
59
+ {% if site.back_link %}
60
+ <li>
61
+ <a href="{{ site.back_link.url }}">{{ site.back_link.text }}</a>
62
+ </li>
63
+ {% endif %}
64
+ </ul>
65
+ </div>
66
+
67
+ </div>
68
+ </nav>
69
+
70
+ </header>
71
+ <div class="usa-overlay"></div>
@@ -0,0 +1,23 @@
1
+ <!-- If any of the file paths after site.baseurl change, the old ones need to stay in place. See https://github.com/18F/pages-server/issues/55 for more information. -->
2
+ <script src="{{ site.baseurl }}/assets/js/vendor/jquery-1.12.4.min.js"></script>
3
+ <script src="{{ site.baseurl }}/assets/js/accordion.js"></script>
4
+ <script src="{{ site.baseurl }}/assets/js/vendor/private-eye-1.1.0.js"></script>
5
+ <script src="{{ site.baseurl }}/assets/js/18f-guide.js"></script>{% for script in site.scripts %}
6
+ <script src="{{ site.baseurl }}/{{ script }}"></script>{% endfor %}{% for script in page.scripts %}
7
+ <script src="{{ site.baseurl }}/{{ script }}"></script>{% endfor %}
8
+ {% if site.jekyll_pages_api_search %}
9
+ {% jekyll_pages_api_search_load %}
10
+ {% endif %}
11
+ {% if site.search_gov_handle %}
12
+ <script type="text/javascript">
13
+ //<![CDATA[
14
+ var usasearch_config = { siteHandle: "{{ site.search_gov_handle }}" };
15
+
16
+ var script = document.createElement("script");
17
+ script.type = "text/javascript";
18
+ script.src = "//search.usa.gov/javascripts/remote.loader.js";
19
+ document.getElementsByTagName("head")[0].appendChild(script);
20
+
21
+ //]]>
22
+ </script>
23
+ {% endif %}
@@ -0,0 +1,13 @@
1
+ {% if parent.children %}
2
+ {% capture expand_nav %}{% guides_style_18f_should_expand_nav parent, parent_url %}{% endcapture %}
3
+ <ul class="usa-sidenav-sub_list">
4
+ {% for child in parent.children %}
5
+ {% capture child_url %}{{ parent_url }}{{ child.url }}{% endcapture %}
6
+ <li class="{% if page.url == child_url %}usa-current{% endif %}">
7
+ <a href="{% if child.internal == true %}{{ site.baseurl }}{{ child_url }}{% else %}{{ child.url }}{% endif %}"
8
+ title="{% if page.url == child_url %}Current Page{% else %}{{ child.text }}{% endif %}">{{ child.text }}</a>
9
+ {% assign parent = child %}{% assign parent_url = child_url %}
10
+ {% include sidebar-children.html %}
11
+ {% capture parent_url %}{% guides_style_18f_pop_last_url_component parent_url %}{% endcapture %}
12
+ </li>{% endfor %}
13
+ </ul>{% endif %}