diff --git a/app/assets/css/main.css b/app/assets/css/main.css
index 68c9f35..4c050f2 100644
--- a/app/assets/css/main.css
+++ b/app/assets/css/main.css
@@ -26,13 +26,6 @@
.badge a{
color: yellow;
}
-h2:before, h3:before, h4:before, h5:before, h6:before {
- display: block;
- content: " ";
- margin-top: -50px;
- height: 50px;
- visibility: hidden;
-}
#project-selector{
float: left;
padding: 5px;
diff --git a/app/assets/js/main.js b/app/assets/js/main.js
index 01f16e0..4a9e01f 100644
--- a/app/assets/js/main.js
+++ b/app/assets/js/main.js
@@ -56,4 +56,11 @@ function toggleClassified(el){
btn.addClass("btn-danger");
}
});
-}
\ No newline at end of file
+}
+
+function updatePosition(){
+ // document.getElementById(…) is used over $('#'+…) in order to reduce attack surface: It does not look like a good idea to pass untrusted input to “omnipotent” `$` function.
+ $.scrollTo(document.getElementById(location.hash.substr(1)), {offset: -$('#navbar').height()});
+}
+$(window).bind('hashchange', function(e) { updatePosition(); });
+$(window).bind('load', function(e) { updatePosition(); });
\ No newline at end of file
diff --git a/app/views/main.scala.html b/app/views/main.scala.html
index fea26ce..26aecf7 100644
--- a/app/views/main.scala.html
+++ b/app/views/main.scala.html
@@ -10,6 +10,7 @@
+
diff --git a/build.sbt b/build.sbt
index accf104..04eb8be 100644
--- a/build.sbt
+++ b/build.sbt
@@ -67,6 +67,8 @@ libraryDependencies ++= Seq(
"com.mohiva" %% "play-silhouette-testkit" % "3.0.4" % "test"
)
+libraryDependencies += "org.webjars.bower" % "jquery.scrollTo" % "2.1.2"
+
libraryDependencies += "net.codingwell" %% "scala-guice" % "4.0.0"
libraryDependencies += "net.ceedubs" %% "ficus" % "1.1.2"