-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathroutes.js
More file actions
executable file
·45 lines (37 loc) · 802 Bytes
/
routes.js
File metadata and controls
executable file
·45 lines (37 loc) · 802 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
Router.map(function() {
Router.configure({
loadingTemplate: 'loading'
});
this.route('home', {
path: '/'
});
this.route('codeOfConduct', {
path: '/about/code-of-conduct'
});
this.route('about', {
path: '/about'
});
this.route('tools', {
path: '/about/tools'
});
this.route('manifesto', {
path: '/about/manifesto'
});
this.route('notFound', {
path: '*',
where: 'server',
action: function() {
this.response.statusCode = 404;
this.response.end(Handlebars.templates['404']());
}
});
Router._scrollToHash = function(hash) {
var section = $(hash);
if (section.length) {
var sectionTop = section.offset().top;
$("html, body").animate({
scrollTop: sectionTop
}, "slow");
}
};
});