Show/hide the editor by putting it on/off screen

This commit is contained in:
Ray Schamp 2015-05-06 15:06:32 -04:00
parent e4180f8adb
commit 32a4a9b3e3
4 changed files with 12 additions and 5 deletions

View file

@ -1027,7 +1027,8 @@ body > main > header {
#editor {
position: absolute;
width: 100%;
height: 100%; }
height: 100%;
top: -9999px; }
.scratch_unsupported p {
color: #aaa;

File diff suppressed because one or more lines are too long

View file

@ -155,12 +155,17 @@ $("[data-staticlink]").click(function(e) {
});
function showPage(path) {
var toHide = "body > main, body > main > article, #editor";
var toHide = "body > main, body > main > article";
var toShow = "#" + path;
var $toShow = $(toShow);
$(toHide).hide();
$("body > main, body > main > article").has(toShow).show();
$(toShow).show();
$("#editor").css({top: "-9999px"});
$("body > main, body > main > article").has($toShow).show();
$toShow.show();
if (path == "editor") {
$toShow.css({top: 0});
}
window.location.hash = toShow;
if ($("body > main > article").has(toShow).length == 0) {

View file

@ -2,6 +2,7 @@
position: absolute;
width: 100%;
height: 100%;
top: -9999px;
}
.scratch_unsupported p {