mirror of
https://github.com/scratchfoundation/scratchx.git
synced 2024-11-25 00:58:05 -05:00
Show/hide the editor by putting it on/off screen
This commit is contained in:
parent
e4180f8adb
commit
32a4a9b3e3
4 changed files with 12 additions and 5 deletions
|
@ -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
|
@ -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) {
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
position: absolute;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
top: -9999px;
|
||||
}
|
||||
|
||||
.scratch_unsupported p {
|
||||
|
|
Loading…
Reference in a new issue