Skip to content

Commit bb26aa9

Browse files
committed
init commit
1 parent 5e45269 commit bb26aa9

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

51 files changed

+14294
-0
lines changed

LICENSE.txt

+63
Large diffs are not rendered by default.

assets/css/fontawesome-all.min.css

+101
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

assets/css/main.css

+3,357
Large diffs are not rendered by default.

assets/css/noscript.css

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
2+
3+
/* Tiles */
4+
5+
body.is-preload .tiles article {
6+
-moz-transform: none;
7+
-webkit-transform: none;
8+
-ms-transform: none;
9+
transform: none;
10+
opacity: 1;
11+
}

assets/js/breakpoints.min.js

+2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

assets/js/browser.min.js

+2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

assets/js/jquery.min.js

+2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

assets/js/main.js

+181
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,181 @@
1+
2+
3+
(function($) {
4+
5+
var $window = $(window),
6+
$body = $('body');
7+
8+
// Breakpoints.
9+
breakpoints({
10+
xlarge: [ '1281px', '1680px' ],
11+
large: [ '981px', '1280px' ],
12+
medium: [ '737px', '980px' ],
13+
small: [ '481px', '736px' ],
14+
xsmall: [ '361px', '480px' ],
15+
xxsmall: [ null, '360px' ]
16+
});
17+
18+
// Play initial animations on page load.
19+
$window.on('load', function() {
20+
window.setTimeout(function() {
21+
$body.removeClass('is-preload');
22+
}, 100);
23+
});
24+
25+
// Touch?
26+
if (browser.mobile)
27+
$body.addClass('is-touch');
28+
29+
// Forms.
30+
var $form = $('form');
31+
32+
// Auto-resizing textareas.
33+
$form.find('textarea').each(function() {
34+
35+
var $this = $(this),
36+
$wrapper = $('<div class="textarea-wrapper"></div>'),
37+
$submits = $this.find('input[type="submit"]');
38+
39+
$this
40+
.wrap($wrapper)
41+
.attr('rows', 1)
42+
.css('overflow', 'hidden')
43+
.css('resize', 'none')
44+
.on('keydown', function(event) {
45+
46+
if (event.keyCode == 13
47+
&& event.ctrlKey) {
48+
49+
event.preventDefault();
50+
event.stopPropagation();
51+
52+
$(this).blur();
53+
54+
}
55+
56+
})
57+
.on('blur focus', function() {
58+
$this.val($.trim($this.val()));
59+
})
60+
.on('input blur focus --init', function() {
61+
62+
$wrapper
63+
.css('height', $this.height());
64+
65+
$this
66+
.css('height', 'auto')
67+
.css('height', $this.prop('scrollHeight') + 'px');
68+
69+
})
70+
.on('keyup', function(event) {
71+
72+
if (event.keyCode == 9)
73+
$this
74+
.select();
75+
76+
})
77+
.triggerHandler('--init');
78+
79+
// Fix.
80+
if (browser.name == 'ie'
81+
|| browser.mobile)
82+
$this
83+
.css('max-height', '10em')
84+
.css('overflow-y', 'auto');
85+
86+
});
87+
88+
// Menu.
89+
var $menu = $('#menu');
90+
91+
$menu.wrapInner('<div class="inner"></div>');
92+
93+
$menu._locked = false;
94+
95+
$menu._lock = function() {
96+
97+
if ($menu._locked)
98+
return false;
99+
100+
$menu._locked = true;
101+
102+
window.setTimeout(function() {
103+
$menu._locked = false;
104+
}, 350);
105+
106+
return true;
107+
108+
};
109+
110+
$menu._show = function() {
111+
112+
if ($menu._lock())
113+
$body.addClass('is-menu-visible');
114+
115+
};
116+
117+
$menu._hide = function() {
118+
119+
if ($menu._lock())
120+
$body.removeClass('is-menu-visible');
121+
122+
};
123+
124+
$menu._toggle = function() {
125+
126+
if ($menu._lock())
127+
$body.toggleClass('is-menu-visible');
128+
129+
};
130+
131+
$menu
132+
.appendTo($body)
133+
.on('click', function(event) {
134+
event.stopPropagation();
135+
})
136+
.on('click', 'a', function(event) {
137+
138+
var href = $(this).attr('href');
139+
140+
event.preventDefault();
141+
event.stopPropagation();
142+
143+
// Hide.
144+
$menu._hide();
145+
146+
// Redirect.
147+
if (href == '#menu')
148+
return;
149+
150+
window.setTimeout(function() {
151+
window.location.href = href;
152+
}, 350);
153+
154+
})
155+
.append('<a class="close" href="#menu">Close</a>');
156+
157+
$body
158+
.on('click', 'a[href="#menu"]', function(event) {
159+
160+
event.stopPropagation();
161+
event.preventDefault();
162+
163+
// Toggle.
164+
$menu._toggle();
165+
166+
})
167+
.on('click', function(event) {
168+
169+
// Hide.
170+
$menu._hide();
171+
172+
})
173+
.on('keydown', function(event) {
174+
175+
// Hide on escape.
176+
if (event.keyCode == 27)
177+
$menu._hide();
178+
179+
});
180+
181+
})(jQuery);

0 commit comments

Comments
 (0)