mirror of
https://github.com/ysoftdevs/odc-analyzer.git
synced 2026-01-15 00:03:59 +01:00
Fixed glitches with headings by replacing a CSS hack by a JS solution.
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -56,4 +56,11 @@ function toggleClassified(el){
|
||||
btn.addClass("btn-danger");
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
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(); });
|
||||
@@ -10,6 +10,7 @@
|
||||
<link rel="stylesheet" type="text/css" href="@routes.Assets.versioned("lib/bootstrap-datepicker/css/bootstrap-datepicker3.css")">
|
||||
<link rel="stylesheet" type="text/css" href="@routes.Assets.versioned("css/main.css")">
|
||||
<script type="text/javascript" src="@routes.Assets.versioned("lib/jquery/jquery.js")"></script>
|
||||
<script type="text/javascript" src="@routes.Assets.versioned("lib/jquery.scrollTo/jquery.scrollTo.min.js")"></script>
|
||||
<script type="text/javascript" src="@routes.Assets.versioned("lib/bootstrap/js/bootstrap.js")"></script>
|
||||
<script type="text/javascript" src="@routes.Assets.versioned("lib/bootstrap-datepicker/js/bootstrap-datepicker.js")"></script>
|
||||
<script type="text/javascript" src="@routes.Application.javascriptRoutes"></script>
|
||||
|
||||
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user