summaryrefslogtreecommitdiff
path: root/src/pages/Home.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/pages/Home.js')
-rw-r--r--src/pages/Home.js18
1 files changed, 16 insertions, 2 deletions
diff --git a/src/pages/Home.js b/src/pages/Home.js
index c315b73e..4f3e2cc0 100644
--- a/src/pages/Home.js
+++ b/src/pages/Home.js
@@ -1,5 +1,6 @@
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";
@@ -12,15 +13,28 @@ import "./Home.css";
class Home extends React.Component {
componentDidMount() {
- jQuery("body-wrapper").scrollspy({target: "#navbar"});
+ const scrollOffset = 60;
+ jQuery("#navbar").find("li a").click(function (e) {
+ if (jQuery(e.target).parent(".auth-links")) {
+ 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" data-spy="scroll" data-target="#navbar">
+ <div className="body-wrapper page-container">
<JumbotronHeader/>
+ <IntroSection/>
<StakeholderSection/>
<ModelingSection/>
<SimulationSection/>