middleman-hashicorp 0.3.6 → 0.3.7

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 62a445931a3c68d0d109dca5946a6b365496f92e
4
- data.tar.gz: 905242445fec5480307ea74634824b41cc602e04
3
+ metadata.gz: 1458d8cf3d07c2851db4f9e8e5ea13901e5b2d08
4
+ data.tar.gz: 3753356263451c6b95c2bdeca8bde278304b85d7
5
5
  SHA512:
6
- metadata.gz: 6ecb46c5959ea456940bdf6513d98429ed78f639b0626b75ad4b6159f4518d63e3e725ca02d049c08bd0ef11b7efa77fa92a76b31565caf3d79a724aa1472b0a
7
- data.tar.gz: f7041640cebf1c9765e99f5ed7ee17b3783f5b31b00b4de27648906c498a11067a80f5c4b41637330d35e727a1131303a6d3fbe76f5fcdd9f10290bb521bfab8
6
+ metadata.gz: b01aed75a485485c392873a8fe14b592e5e5e3bb3b585f1c8e933c34af23e4d6782014e3d89eef7ebed89491ee1ad629b16aa54e63de18ab0cf0f68a662523ac
7
+ data.tar.gz: 563140dfe9aa6a07b65c93ace077e47e10af607e8e38e034e28beee4809cc608cb051e9250892026dcfafe683478614252b3fb10fb3a372a4dcd85e734ad9924
@@ -1,6 +1,8 @@
1
+ dist: trusty
2
+ sudo: false
3
+
1
4
  language: ruby
2
5
  cache: bundler
3
- sudo: false
4
6
 
5
7
  rvm:
6
8
  - 2.3.1
data/README.md CHANGED
@@ -67,6 +67,25 @@ Customizations
67
67
  - During build, assets are hashed
68
68
  - During build, gzipped assets are also created
69
69
 
70
+ ### Mega Nav
71
+ HashiCorp has a consistent mega-nav used across all project sites. This is insertable into any document using the following:
72
+
73
+ ```erb
74
+ <%= mega_nav %>
75
+ ```
76
+
77
+ Additionally, you must import the CSS and Javascript:
78
+
79
+ ```js
80
+ // assets/javascripts/application.js
81
+ //= require hashicorp/mega-nav
82
+ ```
83
+
84
+ ```scss
85
+ // assets/stylesheets/application.scss
86
+ @import 'hashicorp/mega-nav'
87
+ ```
88
+
70
89
  ### Helpers
71
90
  - `latest_version` - get the version specified in `config.rb` as `version`, but replicated here for use in views.
72
91
 
@@ -0,0 +1 @@
1
+ <svg id="Layer_1" xmlns="http://www.w3.org/2000/svg" width="64" height="66" viewBox="0 0 64 66"><style>.st0{fill:#961d59}.st0,.st1{fill-rule:evenodd;clip-rule:evenodd}.st1,.st2{fill:#d62783}</style><path class="st0" d="M30.9 39.3c-3.6 0-6.4-2.8-6.4-6.4 0-3.6 2.8-6.4 6.4-6.4s6.4 2.8 6.4 6.4c0 3.6-2.8 6.4-6.4 6.4"/><path class="st1" d="M43.4 35.9c-1.6 0-3-1.3-3-3 0-1.6 1.3-3 3-3 1.6 0 3 1.3 3 3s-1.4 3-3 3m10.8 2.8c-.4 1.6-2 2.5-3.6 2.1-1.6-.4-2.5-2-2.1-3.6.4-1.6 2-2.5 3.6-2.1 1.5.4 2.5 1.8 2.2 3.4 0 0 0 .1-.1.2m-2.1-7.6c-1.6.4-3.2-.6-3.6-2.2-.4-1.6.6-3.2 2.2-3.6 1.6-.4 3.2.6 3.6 2.2.1.4.1.8 0 1.2-.1 1.1-.9 2.1-2.2 2.4m10.6 7.2c-.3 1.6-1.8 2.7-3.4 2.4-1.6-.3-2.7-1.8-2.4-3.4.3-1.6 1.8-2.7 3.4-2.4 1.5.3 2.6 1.7 2.5 3.2-.1.1-.1.1-.1.2m-2.4-7.4c-1.6.3-3.1-.8-3.4-2.4-.3-1.6.8-3.1 2.4-3.4 1.6-.3 3.1.8 3.4 2.4 0 .3.1.5 0 .8-.1 1.3-1.1 2.4-2.4 2.6m-2.1 17.7c-.8 1.4-2.6 1.9-4 1.1-1.4-.8-1.9-2.6-1.1-4 .8-1.4 2.6-1.9 4-1.1 1 .6 1.6 1.7 1.5 2.8-.1.4-.2.8-.4 1.2m-1.1-27.2c-1.4.8-3.2.3-4-1.1-.8-1.4-.3-3.2 1.1-4 1.4-.8 3.2-.3 4 1.1.3.6.4 1.1.4 1.7-.1.9-.6 1.8-1.5 2.3"/><path class="st2" d="M31 62.8c-8 0-15.4-3.1-21.1-8.7C4.4 48.4 1.3 40.9 1.3 33c0-8 3.1-15.4 8.7-21.1 5.6-5.6 13.1-8.7 21-8.7 6.6 0 12.9 2.1 18.1 6.1l-3.7 4.8c-4.2-3.2-9.2-4.9-14.4-4.9-6.3 0-12.3 2.5-16.8 7S7.3 26.6 7.3 33c0 6.3 2.5 12.3 7 16.8s10.4 6.9 16.8 6.9c5.3 0 10.3-1.7 14.4-4.9l3.6 4.8c-5.2 4-11.5 6.2-18.1 6.2z"/></svg>
@@ -0,0 +1 @@
1
+ <svg id="Layer_1" xmlns="http://www.w3.org/2000/svg" width="86.2" height="20" viewBox="0 0 86.2 20"><style>.st0{fill:#fff}</style><path class="st0" d="M30.1 15.6v-4.8H26v4.8h-2V4.7h2v4.5h4.2V4.7h1.9v10.9h-2zm9.7 0h-1.7L38 15c-.7.5-1.6.7-2.4.7-1.5 0-2.1-1-2.1-2.3 0-1.6.7-2.2 2.3-2.2h2v-.9c0-.9-.3-1.2-1.6-1.2-.7 0-1.5.1-2.2.2l-.3-1.5c.8-.2 1.9-.4 2.7-.4 2.5 0 3.2.9 3.2 2.9v5.3zm-2-3.2h-1.6c-.7 0-.8.2-.8.8 0 .6.2.8.9.8.6 0 1.2-.2 1.6-.4v-1.2zm5.8 3.2c-.9 0-2-.2-2.8-.5l.3-1.5c.7.2 1.6.3 2.4.3.9 0 1-.2 1-.8 0-.5-.1-.7-1.4-1-1.9-.5-2.2-1-2.2-2.5 0-1.6.7-2.3 3-2.3.7 0 1.7.1 2.4.3l-.2 1.6c-.6-.1-1.6-.2-2.2-.2-.9 0-1 .2-1 .7 0 .6 0 .7 1.1 1 2.2.6 2.4.9 2.4 2.5.1 1.5-.4 2.4-2.8 2.4zm8.7 0V9.9c0-.4-.1-.6-.6-.6s-1.4.3-2 .7v5.7h-2.2V4.2l2.2-.2v4.1c.6-.5 1.9-.8 2.8-.8 1.3 0 1.7.9 1.7 2.4v5.9h-1.9zm3.5-9.3V4.1h1.9v2.2h-1.9zm0 9.3v-8h1.9v8h-1.9zm3.5-8c0-2 1.2-3.2 3.9-3.2 1 0 2.1.1 3 .4L66 6.5c-.9-.2-1.8-.3-2.6-.3-1.4 0-1.8.5-1.8 1.7v4.2c0 1.2.4 1.7 1.8 1.7.8 0 1.7-.1 2.6-.3l.2 1.8c-.9.2-2 .4-3 .4-2.7 0-3.9-1.2-3.9-3.2V7.6zm10.9 8c-2.7 0-3.5-1.5-3.5-3.1v-2c0-1.6.8-3.1 3.5-3.1s3.5 1.5 3.5 3.1v2c0 1.6-.7 3.1-3.5 3.1zm0-6.6c-1.1 0-1.6.5-1.6 1.4v2.1c0 .9.5 1.4 1.6 1.4s1.6-.5 1.6-1.4v-2.1c0-.9-.5-1.4-1.6-1.4zm8.8.2c-.8.3-1.4.7-2.1 1.2v5.3H75v-8h1.5l.1.8c.4-.3 1.4-.9 2.1-1.1l.3 1.8zm7.2 3.6c0 1.8-.6 2.8-2.5 2.8-.7 0-1.3-.1-2-.2v3.3l-2.2.3V7.6h1.7l.2.6c.7-.5 1.4-.9 2.4-.9 1.6 0 2.4.9 2.4 2.7v2.8zm-4.4.9c.3.1 1.1.2 1.7.2.7 0 .9-.3.9-1.1V10c0-.7-.1-1-.9-1-.7 0-1.4.3-1.7.7v4zM2.9 6.5l4.8-2.8V0L0 4.5v11.1l2.9 1.6V7.1zm13.5-3.7v10.7l-4.9 2.8V20l7.7-4.4V4.5z"/><path class="st0" d="M14.4 1.7L11.5 0v8.9H7.7v-3L4.8 7.6v10.7L7.7 20v-8.6h3.8v2.7l2.9-1.7z"/></svg>
@@ -0,0 +1 @@
1
+ <svg id="Layer_1" xmlns="http://www.w3.org/2000/svg" width="21" height="22" viewBox="0 0 21 22"><style>.st0{fill:#fff}</style><path class="st0" d="M3.1 7.1l5.3-3V0L0 4.9v12.2l3.1 1.8V7.8zm14.7-4v11.8l-5.2 3V22l8.4-4.9V4.9z"/><path class="st0" d="M15.7 1.8L12.6 0v9.8H8.4V6.5L5.2 8.4v11.8L8.4 22v-9.4h4.2v2.9l3.1-1.8z"/></svg>
@@ -0,0 +1 @@
1
+ <svg id="Layer_1" xmlns="http://www.w3.org/2000/svg" width="58" height="66" viewBox="0 0 58 66"><style>.st0{fill:#27c48d}.st1{fill:#2daa86}.st2{fill:#0e7a65}</style><path class="st0" d="M41.4 25.6v10.6l-7 4.3-5.2-3.2V65h.1l27.9-16V17h-.5z"/><path class="st1" d="M29 1L1 17l18.3 10.7 4.1-2.2 9.5 5.4V20.2l8.9-5.3-.2 10.7L56.8 17h.4z"/><path class="st2" d="M25.5 35.2v10.6l-8.4 5.3V29.8l2.9-2.1L1.4 17h-.2v32l28 16V37.3z"/></svg>
@@ -0,0 +1 @@
1
+ <svg id="Layer_1" xmlns="http://www.w3.org/2000/svg" width="42" height="66" viewBox="0 0 42 66"><style>.st0{fill-rule:evenodd;clip-rule:evenodd;fill:#1daeff}.st1{fill:#1487af}</style><path class="st0" d="M1 8.5l20.9 12.1V65L1 53z"/><path class="st1" d="M32.2 14.1L9.5 1v9.1L24.9 19v27.2l7.3 4.2c4.5 2.6 8.2 1 8.2-3.4V27c-.1-4.6-3.7-10.4-8.2-12.9z"/></svg>
@@ -0,0 +1 @@
1
+ <svg id="Layer_1" xmlns="http://www.w3.org/2000/svg" width="58" height="66" viewBox="0 0 58 66"><style>.st0,.st1{fill-rule:evenodd;clip-rule:evenodd;fill:#6f40f2}.st1{fill:#4634b2}</style><path class="st0" d="M20.4 12.3l17.5 10.1v20.2L20.4 32.5z"/><path class="st1" d="M39.8 22.4v20.2l17.5-10.1V12.3z"/><path class="st0" d="M1 1v20.2l17.5 10.1V11.1zm19.4 53.9L37.9 65V44.8L20.4 34.7z"/></svg>
@@ -0,0 +1 @@
1
+ <svg id="Layer_1" xmlns="http://www.w3.org/2000/svg" width="64" height="66" viewBox="0 0 64 66"><style>.st0{fill:#104eb2}.st1{fill:#1563ff}</style><path class="st0" d="M62.9 11.8V5.9l-14.1 8.2v5L37.7 44.4 32 47.2V65l12-7z"/><path class="st1" d="M9.4 32.5L20 58.1 32 65V47.2l-5.7-2.8-11.2-25.3v-5L1 5.9V12l5.6 13.5M40.4 9.2v5.7l-3 6.5-2.9 7.1-2.5 6.1v7l5.7 2.8 11.1-25.3v-5z"/><path class="st0" d="M32 34.6l-8.5-19.7V9.3l-8.4 4.8v5l11.2 25.3 5.7-2.8z"/><path class="st1" d="M32 41.1l-6 3.3 5.6 3.3 6.1-3.3z"/><path class="st0" d="M9.1 1L1 5.9l14.1 8.2 8.4-4.9z"/><path class="st1" d="M54.1 1l8.8 4.9-14.1 8.2-8.4-4.9z"/></svg>
@@ -0,0 +1 @@
1
+ <svg id="Layer_1" xmlns="http://www.w3.org/2000/svg" width="60" height="66" viewBox="0 0 60 66"><style>.st0{fill:#fff}</style><path d="M59 4L29.9 62 1 4z"/><path class="st0" d="M23.3 15.6h3.4V19h-3.4zm5 0h3.4V19h-3.4zm5 0h3.4V19h-3.4zm-10 5.1h3.4v3.4h-3.4zm5 0h3.4v3.4h-3.4zm5 0h3.4v3.4h-3.4zm-10 5h3.4v3.4h-3.4zm5 0h3.4v3.4h-3.4zm0 5.1h3.4v3.4h-3.4zm5.1-5.1h3.4v3.4h-3.4z"/></svg>
@@ -0,0 +1,61 @@
1
+ //
2
+ // HashiCorp Mega Nav
3
+ // --------------------------------------------------
4
+
5
+ $(function() {
6
+
7
+ var dropDownBreakpoint = window.matchMedia("(min-width: 980px)");
8
+
9
+ function megaNavModal() {
10
+ $('#mega-nav-body-ct').attr({
11
+ role: 'dialog',
12
+ tabindex: -1
13
+ });
14
+
15
+ $('#mega-nav-ctrl').on('click.megaNav', function(){
16
+ $('#mega-nav-body-ct').modal({
17
+ backdrop: false
18
+ });
19
+ });
20
+
21
+ $('#mega-nav-close').on('click.megaNav', function() {
22
+ $('#mega-nav-body-ct').modal('hide');
23
+ });
24
+
25
+ }
26
+
27
+ function megaNavModalDestroy() {
28
+ $('#mega-nav-ctrl').off('click.megaNav');
29
+ $('#mega-nav-close').off('click.megaNav');
30
+ $('#mega-nav-body-ct')
31
+ .modal('hide')
32
+ .removeAttr('role tabindex style')
33
+ .data('bs.modal', null);
34
+ }
35
+
36
+ function megaNavDropDown() {
37
+ $('#mega-nav-ctrl').attr('data-toggle', 'dropdown');
38
+ }
39
+
40
+ function megaNavDropDownDestroy() {
41
+ $('#mega-nav-ctrl').parent().removeClass('open');
42
+ $('#mega-nav-ctrl').removeAttr('data-toggle aria-expanded');
43
+ $('#mega-nav-body-ct').removeAttr('aria-labelledby');
44
+ }
45
+
46
+ function handleDropDownBreakpoint(breakpoint) {
47
+
48
+ if (breakpoint.matches) {
49
+ megaNavModalDestroy();
50
+ megaNavDropDown();
51
+ } else {
52
+ megaNavDropDownDestroy();
53
+ megaNavModal();
54
+ }
55
+
56
+ }
57
+
58
+ dropDownBreakpoint.addListener(handleDropDownBreakpoint);
59
+ handleDropDownBreakpoint(dropDownBreakpoint);
60
+
61
+ });
@@ -0,0 +1,669 @@
1
+ //
2
+ // HashiCorp Mega Nav
3
+ // --------------------------------------------------
4
+
5
+ $mega-nav-font-family: 'klavika-web', 'Lato', 'Helvetica Neue', Helvetica, Arial, sans-serif;
6
+
7
+ $mega-nav-font-size-base: 14px;
8
+ $mega-nav-font-size-h1: 18px;
9
+ $mega-nav-font-size-h2: 16px;
10
+ $mega-nav-font-size-h3: $mega-nav-font-size-base;
11
+ $mega-nav-font-size-small: 12px;
12
+
13
+ $mega-nav-font-size-h1-desktop: 28px;
14
+ $mega-nav-font-size-h2-desktop: 18px;
15
+ $mega-nav-font-size-h3-desktop: 18px;
16
+ $mega-nav-font-size-small-desktop: 14px;
17
+
18
+ $mega-nav-line-height-base: 19px;
19
+ $mega-nav-z-index: 1100;
20
+
21
+ $mega-nav-color-black: black;
22
+ $mega-nav-color-white: white;
23
+ $mega-nav-color-neutral: #a4b1b2;
24
+ $mega-nav-color-line: #d4dcdd;
25
+
26
+ $mega-nav-color-hashicorp: #1563ff;
27
+
28
+ $mega-nav-suite-palette: (
29
+ "vagrant" #1563ff,
30
+ "packer" #1487af,
31
+ "terraform" #6f40f2,
32
+ "vault" #000,
33
+ "nomad" #27c48d,
34
+ "consul" #d62783
35
+ );
36
+
37
+ $mega-nav-btn-height: 36px;
38
+ $mega-nav-btn-font-size: 15px;
39
+
40
+ $mega-nav-banner-height: 48px;
41
+
42
+ $mega-nav-breakpoint-sm: 570px;
43
+ $mega-nav-breakpoint-md: 992px;
44
+ $mega-nav-breakpoint-lg: 1200px;
45
+
46
+
47
+ // bootstrap default container values
48
+ $mega-nav-grid-gutter-width: (15px + 15px);
49
+ $mega-nav-container-width-md: 970px;
50
+ $mega-nav-container-width-lg: 1170px;
51
+
52
+
53
+ @function mega-nav-em($size, $base: $mega-nav-font-size-base) {
54
+ @return $size / $base * 1em;
55
+ }
56
+
57
+
58
+ .mega-nav-banner {
59
+ background-color: $mega-nav-color-black;
60
+ color: $mega-nav-color-white;
61
+ font-family: $mega-nav-font-family;
62
+ font-size: 16px;
63
+ min-height: mega-nav-em(48px, 16px);
64
+
65
+ &,
66
+ > .container {
67
+ align-items: center;
68
+ display: flex;
69
+ }
70
+
71
+ .text-muted {
72
+ color: $mega-nav-color-neutral;
73
+ }
74
+
75
+ }
76
+
77
+ .mega-nav-banner-item {
78
+ &:first-child {
79
+ display: none;
80
+ }
81
+
82
+ &:last-child {
83
+ margin-left: auto;
84
+ }
85
+ }
86
+
87
+ .mega-nav-tagline {
88
+ align-items: center;
89
+ display: inline-flex;
90
+ margin-bottom: 0;
91
+
92
+ > img {
93
+ margin: 0 mega-nav-em(6px, 16px) 0 mega-nav-em(8px, 16px);
94
+ }
95
+ }
96
+
97
+ .mega-nav {
98
+ display: inline-block;
99
+ font-family: $mega-nav-font-family;
100
+ font-size: $mega-nav-font-size-base;
101
+ line-height: $mega-nav-line-height-base / $mega-nav-font-size-base;
102
+
103
+ h1, h2, h3, h4, h5, h6,
104
+ ul, p {
105
+ margin-top: 0;
106
+ }
107
+
108
+ img {
109
+ max-width: 100%;
110
+ }
111
+
112
+ &,
113
+ & * {
114
+ box-sizing: border-box;
115
+ transition: background-color 0.25s ease,
116
+ border-color 0.25s ease,
117
+ color 0.25s ease,
118
+ fill 0.25s ease,
119
+ transform 0.25s ease,
120
+ stroke 0.25s ease;
121
+ }
122
+
123
+ .mega-nav-tagline + & {
124
+ margin-left: mega-nav-em(8px, $mega-nav-font-size-base);
125
+ }
126
+
127
+ .visuallyhidden {
128
+ border: 0;
129
+ clip: rect(0 0 0 0);
130
+ height: 1px;
131
+ margin: -1px;
132
+ overflow: hidden;
133
+ padding: 0;
134
+ position: absolute;
135
+ white-space: nowrap;
136
+ width: 1px;
137
+ }
138
+ }
139
+
140
+ .mega-nav-icon {
141
+ display: inline-block;
142
+ fill: currentColor;
143
+ height: 1em;
144
+ stroke: currentColor;
145
+ width: 1em;
146
+ }
147
+
148
+ .mega-nav-icon-angle-right {
149
+ height: 0.8em;
150
+ transform: rotate(-90deg);
151
+ width: 0.8em;
152
+
153
+ .open > .mega-nav-ctrl & {
154
+ transform: rotate(0);
155
+ }
156
+ }
157
+
158
+ .mega-nav-ctrl {
159
+ align-items: center;
160
+ background-color: transparent;
161
+ border: 1px solid currentColor;
162
+ display: inline-flex;
163
+ justify-content: center;
164
+ line-height: 1;
165
+ padding: 0.5em;
166
+ text-align: center;
167
+ }
168
+
169
+ .mega-nav-body-ct {
170
+ bottom: 0;
171
+ display: none;
172
+ left: 0;
173
+ overflow-y: auto;
174
+ position: fixed;
175
+ right: 0;
176
+ top: 0;
177
+ z-index: $mega-nav-z-index;
178
+
179
+ .mega-nav.open & {
180
+ display: block;
181
+ }
182
+ }
183
+
184
+ .mega-nav-body {
185
+ background-color: $mega-nav-color-white;
186
+ box-shadow: 0 2px 16px rgba(#4f637a, 0.2);
187
+ color: $mega-nav-color-black;
188
+ margin: 1em;
189
+ padding: 1em;
190
+ }
191
+
192
+ .mega-nav-body-footer {
193
+ color: $mega-nav-color-neutral;
194
+ display: none;
195
+
196
+ > :last-child {
197
+ margin-bottom: 0;
198
+ }
199
+
200
+ }
201
+
202
+ .mega-nav-close {
203
+ align-items: center;
204
+ background-color: transparent;
205
+ border: 1px solid currentColor;
206
+ display: inline-flex;
207
+ float: right;
208
+ justify-content: center;
209
+ line-height: 1;
210
+ margin-left: 1em;
211
+ margin-bottom: 1em;
212
+ padding: 0.5em;
213
+ text-align: center;
214
+
215
+ &:hover,
216
+ &:focus {
217
+ color: tint($mega-nav-color-black, 20);
218
+ }
219
+ }
220
+
221
+ .mega-nav-h1 {
222
+ font-size: mega-nav-em($mega-nav-font-size-h1);
223
+ font-weight: bold;
224
+ margin-bottom: mega-nav-em(2px, $mega-nav-font-size-h1);
225
+ text-transform: uppercase;
226
+ }
227
+
228
+ .mega-nav-h2 {
229
+ color: $mega-nav-color-neutral;
230
+ font-size: mega-nav-em($mega-nav-font-size-h2);
231
+ font-weight: 500;
232
+ margin-bottom: mega-nav-em($mega-nav-line-height-base, $mega-nav-font-size-h2);
233
+ text-transform: uppercase;
234
+ }
235
+
236
+ .mega-nav-h3 {
237
+ color: $mega-nav-color-neutral;
238
+ font-size: mega-nav-em($mega-nav-font-size-h3);
239
+ font-weight: 500;
240
+ margin-bottom: mega-nav-em($mega-nav-font-size-h3 / 2, $mega-nav-font-size-h3);
241
+ text-transform: uppercase;
242
+ }
243
+
244
+ .mega-nav-grid {
245
+ list-style: none;
246
+ margin-bottom: mega-nav-em($mega-nav-font-size-base);
247
+ padding-left: 0;
248
+
249
+ > li {
250
+ display: flex;
251
+ }
252
+ }
253
+
254
+ .mega-nav-grid-item {
255
+ align-items: center;
256
+ border: 1px solid $mega-nav-color-line;
257
+ display: flex;
258
+ margin-bottom: -1px;
259
+ min-height: mega-nav-em(50px);
260
+ padding: mega-nav-em(4px) mega-nav-em(10px);
261
+ position: relative;
262
+ width: 100%;
263
+
264
+ &,
265
+ &:hover,
266
+ &:focus {
267
+ color: inherit;
268
+ text-decoration: none;
269
+ }
270
+
271
+ &:hover,
272
+ &:focus {
273
+ border-color: shade($mega-nav-color-line, 10);
274
+ z-index: 1;
275
+ }
276
+
277
+ > b {
278
+ display: block;
279
+ font-size: mega-nav-em($mega-nav-font-size-h1);
280
+ font-weight: 500;
281
+ }
282
+
283
+ > ul {
284
+ list-style: none;
285
+ margin-left: auto;
286
+ padding-left: 0;
287
+ text-align: right;
288
+
289
+ > li + li {
290
+ margin-top: mega-nav-em(4px);
291
+ }
292
+ }
293
+ }
294
+
295
+ @each $suite-item in $mega-nav-suite-palette {
296
+ $suite-item-name: nth($suite-item, 1);
297
+ $suite-item-color: nth($suite-item, 2);
298
+
299
+ .mega-nav-grid-item-#{$suite-item-name} {
300
+ &:hover,
301
+ &:focus {
302
+ border-color: $suite-item-color;
303
+ }
304
+ }
305
+ }
306
+
307
+ .mega-nav-grid-item-img {
308
+ margin-right: mega-nav-em($mega-nav-line-height-base / 2);
309
+ text-align: center;
310
+ width: mega-nav-em(28px);
311
+
312
+ > img {
313
+ max-height: mega-nav-em(28px);
314
+ }
315
+ }
316
+
317
+ .mega-nav-tag {
318
+ background-color: $mega-nav-color-white;
319
+ border: 1px solid currentColor;
320
+ color: $mega-nav-color-neutral;
321
+ display: inline-block;
322
+ font-size: mega-nav-em($mega-nav-font-size-small);
323
+ line-height: 1;
324
+ font-weight: 500;
325
+ padding: mega-nav-em(2px, $mega-nav-font-size-small) mega-nav-em(3px, $mega-nav-font-size-small);
326
+ text-transform: uppercase;
327
+
328
+ .mega-nav-grid-item:hover &,
329
+ .mega-nav-grid-item:focus &,
330
+ .mega-nav-tag:hover,
331
+ .mega-nav-tag:focus {
332
+ background-color: shade($mega-nav-color-neutral, 10);
333
+ border-color: shade($mega-nav-color-neutral, 10);
334
+ color: $mega-nav-color-white;
335
+ }
336
+
337
+ @each $suite-item in $mega-nav-suite-palette {
338
+ $suite-item-name: nth($suite-item, 1);
339
+ $suite-item-color: nth($suite-item, 2);
340
+
341
+ .mega-nav-grid-item-#{$suite-item-name}:hover &,
342
+ .mega-nav-grid-item-#{$suite-item-name}:focus &,
343
+ .mega-nav-tag-#{$suite-item-name}:hover,
344
+ .mega-nav-tag-#{$suite-item-name}:focus {
345
+ background-color: $suite-item-color;
346
+ border-color: $suite-item-color;
347
+ color: $mega-nav-color-white;
348
+ }
349
+ }
350
+ }
351
+
352
+ .mega-nav-btn {
353
+ align-items: center;
354
+ background-color: $mega-nav-color-hashicorp;
355
+ box-shadow: 3px 3px 0 rgba($mega-nav-color-hashicorp, 0.32);
356
+ display: inline-flex;
357
+ font-size: mega-nav-em($mega-nav-btn-font-size);
358
+ font-weight: 500;
359
+ line-height: 1;
360
+ margin-bottom: mega-nav-em($mega-nav-line-height-base, $mega-nav-btn-font-size);
361
+ padding: mega-nav-em(($mega-nav-btn-height - $mega-nav-btn-font-size) / 2, $mega-nav-btn-font-size);
362
+ text-transform: uppercase;
363
+ width: 100%;
364
+
365
+ &,
366
+ &:hover,
367
+ &:focus {
368
+ color: $mega-nav-color-white;
369
+ text-decoration: none;
370
+ }
371
+
372
+ &:hover,
373
+ &:focus {
374
+ background-color: tint($mega-nav-color-hashicorp, 10);
375
+ }
376
+
377
+ > img:first-child {
378
+ margin-right: mega-nav-em($mega-nav-line-height-base / 2, $mega-nav-btn-font-size);
379
+ }
380
+
381
+ > svg:last-child {
382
+ margin-left: mega-nav-em($mega-nav-line-height-base / 2, $mega-nav-btn-font-size);
383
+ }
384
+
385
+ &:hover > .mega-nav-icon-angle-right:last-child,
386
+ &:focus > .mega-nav-icon-angle-right:last-child {
387
+ transform: translateX(3px) rotate(-90deg);
388
+ }
389
+
390
+ }
391
+
392
+ @media (min-width: $mega-nav-breakpoint-sm) {
393
+
394
+ .mega-nav-btn {
395
+ margin-bottom: mega-nav-em($mega-nav-line-height-base * 2, $mega-nav-btn-font-size);
396
+ }
397
+
398
+ .mega-nav-body {
399
+ padding: 2em 2em 1em;
400
+ }
401
+
402
+ .mega-nav-body-grid {
403
+ display: flex;
404
+ flex-wrap: wrap;
405
+ }
406
+
407
+ .mega-nav-body-grid-item:nth-child(1) {
408
+ width: 100%;
409
+ }
410
+
411
+ .mega-nav-body-grid-item:nth-child(2) {
412
+ width: 1 / 3 * 100%;
413
+ }
414
+
415
+ .mega-nav-body-grid-item:nth-child(3) {
416
+ width: 2 / 3 * 100%;
417
+ }
418
+
419
+ .mega-nav-h1 {
420
+ font-size: mega-nav-em($mega-nav-font-size-h1-desktop);
421
+ margin-bottom: mega-nav-em(2px, $mega-nav-font-size-h1-desktop);
422
+ }
423
+
424
+ .mega-nav-h2 {
425
+ font-size: mega-nav-em($mega-nav-font-size-h2-desktop);
426
+ margin-bottom: mega-nav-em($mega-nav-line-height-base, $mega-nav-font-size-h2-desktop);
427
+ }
428
+
429
+ .mega-nav-h3 {
430
+ color: $mega-nav-color-black;
431
+ font-size: mega-nav-em($mega-nav-font-size-h3-desktop);
432
+ font-weight: bold;
433
+ margin-bottom: mega-nav-em($mega-nav-font-size-h3-desktop / 2, $mega-nav-font-size-h3);
434
+ }
435
+
436
+ .mega-nav-grid {
437
+ border: 0;
438
+ display: flex;
439
+ margin-bottom: mega-nav-em($mega-nav-line-height-base * 2);
440
+
441
+ > li {
442
+ flex-grow: 1;
443
+ margin-bottom: -1px;
444
+ margin-right: -1px;
445
+ width: calc(100% + 1px);
446
+ }
447
+ }
448
+
449
+ .mega-nav-grid-item {
450
+ display: block;
451
+ border: 1px solid $mega-nav-color-line;
452
+ margin-bottom: 0;
453
+ padding: mega-nav-em($mega-nav-line-height-base);
454
+
455
+ &,
456
+ > ul {
457
+ text-align: center;
458
+ }
459
+
460
+ > ul {
461
+ display: flex;
462
+ justify-content: center;
463
+ margin-top: mega-nav-em($mega-nav-line-height-base);
464
+
465
+ > li + li {
466
+ margin-left: mega-nav-em($mega-nav-line-height-base / 2);
467
+ margin-top: 0;
468
+ }
469
+ }
470
+ }
471
+
472
+ .mega-nav-grid-item-img {
473
+ margin-right: 0;
474
+ width: auto;
475
+
476
+ > img {
477
+ max-height: mega-nav-em(66px);
478
+ }
479
+ }
480
+
481
+ .mega-nav-tag {
482
+ font-size: mega-nav-em($mega-nav-font-size-small-desktop);
483
+ padding: mega-nav-em(2px, $mega-nav-font-size-small-desktop) mega-nav-em(3px, $mega-nav-font-size-small-desktop);
484
+ }
485
+
486
+ .mega-nav-btn {
487
+ width: auto;
488
+ }
489
+
490
+ }
491
+
492
+ @media (min-width: $mega-nav-breakpoint-md) {
493
+
494
+ .mega-nav-banner-item {
495
+ &:first-child {
496
+ display: block;
497
+ }
498
+ }
499
+
500
+ .mega-nav {
501
+ position: relative;
502
+
503
+ &::before {
504
+ border-bottom: 1em solid $mega-nav-color-white;
505
+ border-left: mega-nav-em(10px) solid transparent;
506
+ border-right: mega-nav-em(10px) solid transparent;
507
+ content: ' ';
508
+ display: none;
509
+ height: 0;
510
+ left: 50%;
511
+ position: absolute;
512
+ top: 100%;
513
+ transform: translateX(-50%);
514
+ width: 0;
515
+ z-index: $mega-nav-z-index + 1;
516
+ }
517
+
518
+ &.open::before {
519
+ display: block;
520
+ }
521
+ }
522
+
523
+ .mega-nav-btn {
524
+ margin-bottom: mega-nav-em($mega-nav-line-height-base, $mega-nav-btn-font-size);
525
+ }
526
+
527
+ .mega-nav-body-ct {
528
+ bottom: auto;
529
+ left: auto;
530
+ overflow: visible;
531
+ position: absolute;
532
+ right: 0;
533
+ top: 100%;
534
+ width: $mega-nav-container-width-md - $mega-nav-grid-gutter-width;
535
+ }
536
+
537
+ .mega-nav-body {
538
+ margin: 1em 0 0;
539
+ }
540
+
541
+ .mega-nav-body-header {
542
+ display: flex;
543
+ }
544
+
545
+ .mega-nav-body-header-item {
546
+ &:last-child {
547
+ margin-left: auto;
548
+ }
549
+ }
550
+
551
+ .mega-nav-body-footer {
552
+ display: block;
553
+ padding-top: mega-nav-em($mega-nav-font-size-base);
554
+ }
555
+
556
+ .mega-nav-h2 {
557
+ margin-bottom: mega-nav-em($mega-nav-line-height-base * 2, $mega-nav-font-size-h2-desktop);
558
+ }
559
+
560
+ .mega-nav-body-grid {
561
+ position: relative;
562
+
563
+ &::before {
564
+ background-color: $mega-nav-color-line;
565
+ content: ' ';
566
+ height: 1px;
567
+ left: -2em;
568
+ margin-top: mega-nav-em(($mega-nav-font-size-base / 2 + 3px + 1px) * -1); //1px fudge
569
+ position: absolute;
570
+ right: -2em;
571
+ top: 100%;
572
+ }
573
+ }
574
+
575
+ .mega-nav-body-grid-item:nth-child(1) {
576
+ width: 3 / 6 * 100%;
577
+ }
578
+
579
+ .mega-nav-body-grid-item:nth-child(2) {
580
+ width: 1 / 6 * 100%;
581
+ }
582
+
583
+ .mega-nav-body-grid-item:nth-child(3) {
584
+ width: 2 / 6 * 100%;
585
+ }
586
+
587
+ .mega-nav-close {
588
+ display: none;
589
+ }
590
+
591
+ .mega-nav-h1 {
592
+ padding-left: mega-nav-em($mega-nav-line-height-base * 1.5, $mega-nav-font-size-h1-desktop);
593
+ }
594
+
595
+ .mega-nav-h2 {
596
+ padding-left: mega-nav-em($mega-nav-line-height-base * 1.5, $mega-nav-font-size-h2-desktop);
597
+ }
598
+
599
+ .mega-nav-h3 {
600
+ padding-left: mega-nav-em($mega-nav-line-height-base, $mega-nav-font-size-h3-desktop);
601
+ padding-top: mega-nav-em($mega-nav-line-height-base / 2, $mega-nav-font-size-h3-desktop);
602
+ position: relative;
603
+
604
+ &::before {
605
+ background-color: $mega-nav-color-line;
606
+ content: ' ';
607
+ height: 1px;
608
+ left: 0;
609
+ position: absolute;
610
+ right: mega-nav-em($mega-nav-line-height-base / 2);
611
+ top: 0;
612
+ }
613
+ }
614
+
615
+ .mega-nav-grid {
616
+ margin-bottom: mega-nav-em($mega-nav-font-size-base + 2px * 2 + 1px * 2 + $mega-nav-font-size-base);
617
+ }
618
+
619
+ .mega-nav-grid-item {
620
+ position: relative;
621
+
622
+ &::before {
623
+ background-color: $mega-nav-color-line;
624
+ content: ' ';
625
+ height: 1px;
626
+ left: 0;
627
+ margin-top: mega-nav-em($mega-nav-font-size-base + $mega-nav-font-size-small-desktop / 2 + 2px);
628
+ position: absolute;
629
+ right: 0;
630
+ top: 100%;
631
+ }
632
+
633
+ &:hover::before,
634
+ &:focus::before {
635
+ background-color: shade($mega-nav-color-line, 10);
636
+ }
637
+
638
+ > ul {
639
+ left: 0;
640
+ margin-top: 0;
641
+ padding-top: mega-nav-em($mega-nav-font-size-base);
642
+ position: absolute;
643
+ right: 0;
644
+ top: 100%;
645
+
646
+ > li + li {
647
+ margin-left: mega-nav-em(16px);
648
+ }
649
+ }
650
+ }
651
+
652
+ @each $suite-item in $mega-nav-suite-palette {
653
+ $suite-item-name: nth($suite-item, 1);
654
+ $suite-item-color: nth($suite-item, 2);
655
+
656
+ .mega-nav-grid-item-#{$suite-item-name}:hover::before,
657
+ .mega-nav-grid-item-#{$suite-item-name}:focus::before {
658
+ background-color: $suite-item-color;
659
+ }
660
+ }
661
+ }
662
+
663
+ @media (min-width: $mega-nav-breakpoint-lg) {
664
+
665
+ .mega-nav-body-ct {
666
+ width: $mega-nav-container-width-lg - $mega-nav-grid-gutter-width;
667
+ }
668
+
669
+ }
@@ -194,6 +194,15 @@ class Middleman::HashiCorpExtension < ::Middleman::Extension
194
194
  file = resource.source_file.split("/").last
195
195
  website_root + "/source/" + relative_path + file
196
196
  end
197
+
198
+ #
199
+ # Inserts the mega navigation to be used across all project sites.
200
+ # @return [String]
201
+ #
202
+ def mega_nav
203
+ f = File.expand_path("../partials/_mega.html.erb", __FILE__)
204
+ render_individual_file(f, {}, { template_body: File.read(f) })
205
+ end
197
206
  end
198
207
 
199
208
  #
@@ -0,0 +1,124 @@
1
+ <svg aria-hidden="true" style="position: absolute; width: 0; height: 0;" width="0" height="0" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
2
+ <defs>
3
+ <symbol id="mega-nav-icon-angle" viewBox="0 0 13 7">
4
+ <polygon points="6.5,6.5 0.7,1.6 1.3,0.8 6.5,5.2 11.7,0.8 12.3,1.6 "/>
5
+ </symbol>
6
+ <symbol id="mega-nav-icon-close" viewBox="0 0 13 15">
7
+ <path vector-effect="non-scaling-stroke" d="M1.1 14L11.9 1M11.9 14L1.1 1"/>
8
+ </symbol>
9
+ </defs>
10
+ </svg>
11
+ <div class="mega-nav-banner">
12
+ <div class="container">
13
+ <div class="mega-nav-banner-item">
14
+ by <img src="<%= image_path("mega-nav/logo-hashicorp-wordmark.svg") %>" alt="HashiCorp Logo" />
15
+ </div>
16
+ <div class="mega-nav-banner-item">
17
+ <p class="mega-nav-tagline"><span class="visible-xs text-muted">Learn the</span><span class="hidden-xs text-muted">Learn how Nomad fits into the</span> <img src="<%= image_path("mega-nav/logo-hashicorp.svg") %>" alt="HashiCorp Logo" /> <strong>HashiCorp Suite</strong></p>
18
+ <div id="#mega-nav" class="mega-nav">
19
+ <button type="button" id="mega-nav-ctrl" class="mega-nav-ctrl"><svg class="mega-nav-icon mega-nav-icon-angle-right" aria-hidden="true"><use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="#mega-nav-icon-angle"></use></svg><span class="visuallyhidden">Open</span></button>
20
+ <div id="mega-nav-body-ct" class="mega-nav-body-ct" aria-labelledby="mega-nav-ctrl">
21
+ <div class="mega-nav-body">
22
+ <button type="button" id="mega-nav-close" class="mega-nav-close"><svg class="mega-nav-icon mega-nav-icon-close" aria-hidden="true"><use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="#mega-nav-icon-close"></use></svg><span class="visuallyhidden">Close</span></button>
23
+ <div class="mega-nav-body-header">
24
+ <div class="mega-nav-body-header-item">
25
+ <h2 class="mega-nav-h1">Provision, Secure, and&nbsp;Run</h2>
26
+ <p class="mega-nav-h2">Any infrastructure for any&nbsp;application</p>
27
+ </div>
28
+ <div class="mega-nav-body-header-item">
29
+ <a href="#" class="mega-nav-btn"><img src="<%= image_path("mega-nav/logo-hashicorp.svg") %>" alt="HashiCorp Logo" /> Learn the HashiCorp Suite <svg class="mega-nav-icon mega-nav-icon-angle-right" aria-hidden="true"><use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="#mega-nav-icon-angle"></use></svg></a>
30
+ </div>
31
+ </div>
32
+ <div class="mega-nav-body-grid">
33
+ <div class="mega-nav-body-grid-item">
34
+ <h3 class="mega-nav-h3">Provision</h3>
35
+ <ul class="mega-nav-grid">
36
+ <li>
37
+ <a href="#" class="mega-nav-grid-item mega-nav-grid-item-vagrant">
38
+ <div class="mega-nav-grid-item-img">
39
+ <img src="<%= image_path("mega-nav/logo-vagrant.svg") %>" alt="Vagrant Logo" />
40
+ </div>
41
+ <b>Vagrant</b>
42
+ <ul>
43
+ <li><span class="mega-nav-tag">Build</span></li>
44
+ <li><span class="mega-nav-tag">Test</span></li>
45
+ </ul>
46
+ </a>
47
+ </li>
48
+ <li>
49
+ <a href="#" class="mega-nav-grid-item mega-nav-grid-item-packer">
50
+ <div class="mega-nav-grid-item-img">
51
+ <img src="<%= image_path("mega-nav/logo-packer.svg") %>" alt="Packer Logo" />
52
+ </div>
53
+ <b>Packer</b>
54
+ <ul>
55
+ <li><span class="mega-nav-tag">Package</span></li>
56
+ </ul>
57
+ </a>
58
+ </li>
59
+ <li>
60
+ <a href="#" class="mega-nav-grid-item mega-nav-grid-item-terraform">
61
+ <div class="mega-nav-grid-item-img">
62
+ <img src="<%= image_path("mega-nav/logo-terraform.svg") %>" alt="Terraform Logo" />
63
+ </div>
64
+ <b>Terraform</b>
65
+ <ul>
66
+ <li><span class="mega-nav-tag">Provision</span></li>
67
+ </ul>
68
+ </a>
69
+ </li>
70
+ </ul>
71
+ </div>
72
+ <div class="mega-nav-body-grid-item">
73
+ <h3 class="mega-nav-h3">Secure</h3>
74
+ <ul class="mega-nav-grid">
75
+ <li>
76
+ <a href="#" class="mega-nav-grid-item mega-nav-grid-item-vault">
77
+ <div class="mega-nav-grid-item-img">
78
+ <img src="<%= image_path("mega-nav/logo-vault.svg") %>" alt="Vault Logo" />
79
+ </div>
80
+ <b>Vault</b>
81
+ <ul>
82
+ <li><span class="mega-nav-tag">Secure</span></li>
83
+ </ul>
84
+ </a>
85
+ </li>
86
+ </ul>
87
+ </div>
88
+ <div class="mega-nav-body-grid-item">
89
+ <h3 class="mega-nav-h3">Run</h3>
90
+ <ul class="mega-nav-grid">
91
+ <li>
92
+ <a href="#" class="mega-nav-grid-item mega-nav-grid-item-nomad">
93
+ <div class="mega-nav-grid-item-img">
94
+ <img src="<%= image_path("mega-nav/logo-nomad.svg") %>" alt="Nomad Logo" />
95
+ </div>
96
+ <b>Nomad</b>
97
+ <ul>
98
+ <li><span class="mega-nav-tag">Deploy</span></li>
99
+ </ul>
100
+ </a>
101
+ </li>
102
+ <li>
103
+ <a href="#" class="mega-nav-grid-item mega-nav-grid-item-consul">
104
+ <div class="mega-nav-grid-item-img">
105
+ <img src="<%= image_path("mega-nav/logo-consul.svg") %>" alt="Consul Logo" />
106
+ </div>
107
+ <b>Consul</b>
108
+ <ul>
109
+ <li><span class="mega-nav-tag">Maintain</span></li>
110
+ </ul>
111
+ </a>
112
+ </li>
113
+ </ul>
114
+ </div>
115
+ </div>
116
+ <div class="mega-nav-body-footer">
117
+ <p>Seven elements of the modern Application Lifecycle</p>
118
+ </div>
119
+ </div>
120
+ </div>
121
+ </div>
122
+ </div>
123
+ </div>
124
+ </div>
@@ -1,5 +1,5 @@
1
1
  module Middleman
2
2
  module HashiCorp
3
- VERSION = "0.3.6"
3
+ VERSION = "0.3.7"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: middleman-hashicorp
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.6
4
+ version: 0.3.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Seth Vargo
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-11-17 00:00:00.000000000 Z
11
+ date: 2017-02-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: middleman
@@ -168,16 +168,27 @@ files:
168
168
  - assets/images/icons/icon_rpm.png
169
169
  - assets/images/icons/icon_solaris.png
170
170
  - assets/images/icons/icon_windows.png
171
+ - assets/images/mega-nav/logo-consul.svg
172
+ - assets/images/mega-nav/logo-hashicorp-wordmark.svg
173
+ - assets/images/mega-nav/logo-hashicorp.svg
174
+ - assets/images/mega-nav/logo-nomad.svg
175
+ - assets/images/mega-nav/logo-packer.svg
176
+ - assets/images/mega-nav/logo-terraform.svg
177
+ - assets/images/mega-nav/logo-vagrant.svg
178
+ - assets/images/mega-nav/logo-vault.svg
171
179
  - assets/javascripts/bootstrap.js
180
+ - assets/javascripts/hashicorp/mega-nav.js
172
181
  - assets/javascripts/ie-compat.js
173
182
  - assets/javascripts/ie-compat/html5shiv-printshiv.js
174
183
  - assets/javascripts/ie-compat/html5shiv.js
175
184
  - assets/javascripts/ie-compat/respond.js
176
185
  - assets/javascripts/jquery.js
186
+ - assets/stylesheets/hashicorp/mega-nav.scss
177
187
  - docker/Dockerfile
178
188
  - docker/entrypoint.sh
179
189
  - lib/middleman-hashicorp.rb
180
190
  - lib/middleman-hashicorp/extension.rb
191
+ - lib/middleman-hashicorp/partials/_mega.html.erb
181
192
  - lib/middleman-hashicorp/redcarpet.rb
182
193
  - lib/middleman-hashicorp/releases.rb
183
194
  - lib/middleman-hashicorp/rouge.rb
@@ -208,7 +219,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
208
219
  version: '0'
209
220
  requirements: []
210
221
  rubyforge_project:
211
- rubygems_version: 2.6.7
222
+ rubygems_version: 2.6.8
212
223
  signing_key:
213
224
  specification_version: 4
214
225
  summary: A series of helpers for consistency among HashiCorp's middleman sites