/
main.js
37 lines (29 loc) · 1.03 KB
/
main.js
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
/* jshint esversion: 6, browser: true, devel: true, indent: 2, curly: true, eqeqeq: true, futurehostile: true, latedef: true, undef: true, unused: true */
import '../styl/site.styl'; // import styl for webpack
import $ from 'jquery';
import lazySizes from 'lazysizes';
import { Analytics } from './modules/Analytics.js';
import { Header } from './modules/Header.js';
import { Search } from './modules/Search.js';
import { Support } from './modules/Support.js';
import { MailchimpSignup } from './modules/MailchimpSignup.js';
import { Utilities } from './modules/Utilities.js';
class Site {
constructor() {
this.analytics = new Analytics();
this.header = new Header();
this.search = new Search();
this.support = new Support();
this.mailchimpSignup = new MailchimpSignup();
this.utilties = new Utilities();
$(document).ready(this.onReady.bind(this));
}
onReady() {
lazySizes.init();
this.header.onReady();
this.search.onReady();
this.support.onReady();
this.utilties.onReady();
}
}
new Site();