mirror of
https://github.com/scratchfoundation/scratchx.git
synced 2024-11-28 18:45:49 -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 {
|
#editor {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%; }
|
height: 100%;
|
||||||
|
top: -9999px; }
|
||||||
|
|
||||||
.scratch_unsupported p {
|
.scratch_unsupported p {
|
||||||
color: #aaa;
|
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) {
|
function showPage(path) {
|
||||||
var toHide = "body > main, body > main > article, #editor";
|
var toHide = "body > main, body > main > article";
|
||||||
var toShow = "#" + path;
|
var toShow = "#" + path;
|
||||||
|
var $toShow = $(toShow);
|
||||||
|
|
||||||
$(toHide).hide();
|
$(toHide).hide();
|
||||||
$("body > main, body > main > article").has(toShow).show();
|
$("#editor").css({top: "-9999px"});
|
||||||
$(toShow).show();
|
$("body > main, body > main > article").has($toShow).show();
|
||||||
|
$toShow.show();
|
||||||
|
if (path == "editor") {
|
||||||
|
$toShow.css({top: 0});
|
||||||
|
}
|
||||||
|
|
||||||
window.location.hash = toShow;
|
window.location.hash = toShow;
|
||||||
if ($("body > main > article").has(toShow).length == 0) {
|
if ($("body > main > article").has(toShow).length == 0) {
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
position: absolute;
|
position: absolute;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
|
top: -9999px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.scratch_unsupported p {
|
.scratch_unsupported p {
|
||||||
|
|
Loading…
Reference in a new issue