Fix the little jump when you go to #home etc.

This commit is contained in:
Ray Schamp 2015-05-07 18:06:28 -04:00
parent 0d73f38bbb
commit bf52f90457
4 changed files with 10 additions and 7 deletions

View file

@ -1098,6 +1098,10 @@ body > main > header {
content: "";
display: table; }
body > main > article {
padding-top: 3.75em;
margin-top: -3.75em; }
.scratchx-logo {
float: left; }
.scratchx-logo span {

File diff suppressed because one or more lines are too long

View file

@ -288,7 +288,6 @@ $("[data-action='static-link']").click(function(e) {
* <a href="#privacy-policy" data-action="static-link">Privacy Policy</a>
*
*/
e.preventDefault();
var path = $(this).attr("href").substring(1);
showPage(path);
});
@ -329,11 +328,6 @@ function showPage(path) {
if (path == "editor") {
$toShow.css({top: 0});
}
window.location.hash = toShow;
if ($("body > main > article").has(toShow).length == 0) {
document.body.scrollTop = 0;
}
}
var initialID = "home";

View file

@ -165,6 +165,11 @@ body > main > header {
line-height: $vertical-base * 10;
}
body > main > article {
padding-top: $vertical-base * 10;
margin-top: -$vertical-base * 10;
}
.scratchx-logo {
float: left;