mirror of
https://github.com/scratchfoundation/scratchx.git
synced 2025-03-14 07:19:48 -04:00
Fix the little jump when you go to #home etc.
This commit is contained in:
parent
0d73f38bbb
commit
bf52f90457
4 changed files with 10 additions and 7 deletions
|
@ -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
|
@ -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";
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
Loading…
Reference in a new issue