middleman-hashicorp 0.3.17 → 0.3.18
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ce3284876fcd013172f2b3ee5e62c8e84eddf9f4
|
4
|
+
data.tar.gz: 4b19c1be5a46960207172f12e3c6b70ffa3d395c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d22dc6551ad7316f1b9a2ce5c030a9ef2489bade9f5484bee7ed6b7933727f980e6efe61e78b2d901697badb8856e2522e574925cb5959f6c189913035a95d3d
|
7
|
+
data.tar.gz: 6126066e64f55ab476ecff3a4b7342bcd9f42c3c19202123923419a22d9bba113cb2b5d157efc8da87b658b9408b1027cad2cc098b3b872ad566d5d34e8a7f29
|
@@ -21,56 +21,50 @@ var HashiMegaNav = function() {
|
|
21
21
|
}
|
22
22
|
}
|
23
23
|
|
24
|
-
var
|
24
|
+
var $body = $('#mega-nav-body-ct');
|
25
|
+
var $arrow = $('#mega-nav-ctrl');
|
26
|
+
var $nav = $arrow.parent();
|
27
|
+
var $close = $('#mega-nav-close');
|
25
28
|
|
26
|
-
function
|
27
|
-
|
28
|
-
role: 'dialog',
|
29
|
-
tabindex: -1
|
30
|
-
});
|
31
|
-
|
32
|
-
$('#mega-nav-ctrl').on('click.megaNav', function(){
|
33
|
-
$('#mega-nav-body-ct').modal({
|
34
|
-
backdrop: false
|
35
|
-
});
|
36
|
-
});
|
37
|
-
|
38
|
-
$('#mega-nav-close').on('click.megaNav', function() {
|
39
|
-
$('#mega-nav-body-ct').modal('hide');
|
40
|
-
});
|
29
|
+
function matchesBreakpoint() {
|
30
|
+
return window.matchMedia("(min-width: 980px)").matches;
|
41
31
|
}
|
42
32
|
|
43
|
-
function
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
.
|
49
|
-
|
33
|
+
function openNav() {
|
34
|
+
if(matchesBreakpoint()) {
|
35
|
+
$body.slideDown('fast');
|
36
|
+
$nav.addClass('open');
|
37
|
+
} else {
|
38
|
+
$body.fadeIn('fast');
|
39
|
+
}
|
50
40
|
}
|
51
41
|
|
52
|
-
function
|
53
|
-
|
42
|
+
function closeNav() {
|
43
|
+
if(matchesBreakpoint()) {
|
44
|
+
$body.slideUp('fast');
|
45
|
+
$nav.removeClass('open');
|
46
|
+
} else {
|
47
|
+
$body.fadeOut('fast');
|
48
|
+
}
|
54
49
|
}
|
55
50
|
|
56
|
-
function
|
57
|
-
$
|
58
|
-
$('#mega-nav-ctrl').removeAttr('data-toggle aria-expanded');
|
59
|
-
$('#mega-nav-body-ct').removeAttr('aria-labelledby');
|
51
|
+
function isNavOpen() {
|
52
|
+
return $nav.hasClass('open');
|
60
53
|
}
|
61
54
|
|
62
|
-
function
|
63
|
-
|
64
|
-
|
65
|
-
|
55
|
+
$arrow.unbind().on('click', function(e) {
|
56
|
+
e.preventDefault(); // Don't jump page to "#"
|
57
|
+
|
58
|
+
if(isNavOpen()) {
|
59
|
+
closeNav();
|
66
60
|
} else {
|
67
|
-
|
68
|
-
megaNavModal();
|
61
|
+
openNav();
|
69
62
|
}
|
70
|
-
}
|
63
|
+
});
|
71
64
|
|
72
|
-
|
73
|
-
|
65
|
+
$close.unbind().on('click', function() {
|
66
|
+
closeNav();
|
67
|
+
});
|
74
68
|
}
|
75
69
|
|
76
70
|
// Handle document ready function and the turbolinks load.
|
@@ -18,12 +18,12 @@ var HashiSidebar = function() {
|
|
18
18
|
|
19
19
|
// Hide the sidebar when the user clicks on the overlay. The overlay is
|
20
20
|
// only "clickable" when it's active.
|
21
|
-
$overlay.on('click', function(e){
|
21
|
+
$overlay.unbind().on('click', function(e){
|
22
22
|
hideSidebar();
|
23
23
|
});
|
24
24
|
|
25
25
|
// Show the sidebar when the user clicks the hamburger menu.
|
26
|
-
$toggle.on('click', function(e) {
|
26
|
+
$toggle.unbind().on('click', function(e) {
|
27
27
|
e.preventDefault(); // Don't jump page to "#"
|
28
28
|
|
29
29
|
// Only activate the sidebar if it's not already active. Since these
|
@@ -144,8 +144,11 @@ class Middleman::HashiCorpExtension < ::Middleman::Extension
|
|
144
144
|
#
|
145
145
|
# @return [String] (html)
|
146
146
|
#
|
147
|
-
def system_icon(name)
|
148
|
-
image_tag("icons/icon_#{name.to_s.downcase}.png"
|
147
|
+
def system_icon(name, options = {})
|
148
|
+
image_tag("icons/icon_#{name.to_s.downcase}.png", {
|
149
|
+
height: 75,
|
150
|
+
width: 75,
|
151
|
+
}.merge(options))
|
149
152
|
end
|
150
153
|
|
151
154
|
#
|
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.
|
4
|
+
version: 0.3.18
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Seth Vargo
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-03-
|
11
|
+
date: 2017-03-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: middleman
|
@@ -238,7 +238,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
238
238
|
version: '0'
|
239
239
|
requirements: []
|
240
240
|
rubyforge_project:
|
241
|
-
rubygems_version: 2.
|
241
|
+
rubygems_version: 2.5.2
|
242
242
|
signing_key:
|
243
243
|
specification_version: 4
|
244
244
|
summary: A series of helpers for consistency among HashiCorp's middleman sites
|