summaryrefslogtreecommitdiff
path: root/src/pages/Home.js
blob: b09365027ca6f43a3aefe0edeecf91b35fcdc228 (plain)
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
46
47
48
49
50
import React from 'react';
import ContactSection from "../components/home/ContactSection";
import IntroSection from "../components/home/IntroSection";
import JumbotronHeader from "../components/home/JumbotronHeader";
import ModelingSection from "../components/home/ModelingSection";
import SimulationSection from "../components/home/SimulationSection";
import StakeholderSection from "../components/home/StakeholderSection";
import TeamSection from "../components/home/TeamSection";
import TechnologiesSection from "../components/home/TechnologiesSection";
import HomeNavbar from "../components/navigation/HomeNavbar";
import jQuery from "../util/jquery";
import "./Home.css";

class Home extends React.Component {
    componentDidMount() {
        const scrollOffset = 60;
        jQuery("#navbar").find("li a").click(function (e) {
            if (jQuery(e.target).parents(".auth-links").length > 0) {
                return;
            }
            e.preventDefault();
            jQuery(jQuery(this).attr('href'))[0].scrollIntoView();
            window.scrollBy(0, -scrollOffset);
        });
        jQuery("body").scrollspy({
            target: "#navbar",
            offset: scrollOffset
        });
    }

    render() {
        return (
            <div>
                <HomeNavbar/>
                <div className="body-wrapper page-container">
                    <JumbotronHeader/>
                    <IntroSection/>
                    <StakeholderSection/>
                    <ModelingSection/>
                    <SimulationSection/>
                    <TechnologiesSection/>
                    <TeamSection/>
                    <ContactSection/>
                </div>
            </div>
        );
    }
}

export default Home;