mirror of
https://github.com/scratchfoundation/scratchx.git
synced 2025-02-17 19:30:20 -05:00
Add static page navigation
This commit is contained in:
parent
53d0b66025
commit
a69d55e995
6 changed files with 34 additions and 13 deletions
|
@ -809,7 +809,7 @@ body > main > footer > div {
|
||||||
body > main > article,
|
body > main > article,
|
||||||
body > section {
|
body > section {
|
||||||
display: none; }
|
display: none; }
|
||||||
body #privacy-policy {
|
body #home {
|
||||||
display: block; }
|
display: block; }
|
||||||
|
|
||||||
#dialogs {
|
#dialogs {
|
||||||
|
@ -999,10 +999,9 @@ body > main > header {
|
||||||
text-align: center; }
|
text-align: center; }
|
||||||
|
|
||||||
#editor {
|
#editor {
|
||||||
text-align: center;
|
position: absolute;
|
||||||
margin-top: 30px;
|
width: 100%;
|
||||||
display: none;
|
height: 100%; }
|
||||||
position: relative; }
|
|
||||||
|
|
||||||
.scratch_unsupported p {
|
.scratch_unsupported p {
|
||||||
color: #aaa;
|
color: #aaa;
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -169,10 +169,10 @@
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<nav>
|
<nav>
|
||||||
<h2>ScratchX</h2>
|
<h2><a href="#home" data-staticlink="home">ScratchX</a></h2>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="">Terms of Service</a></li>
|
<li><a href="">Terms of Service</a></li>
|
||||||
<li><a href="">Privacy Policy</a></li>
|
<li><a href="#privacy-policy" data-staticlink="privacy-policy">Privacy Policy</a></li>
|
||||||
<li><a href="">Contact Us</a></li>
|
<li><a href="">Contact Us</a></li>
|
||||||
<li><a href="">FAQ</a></li>
|
<li><a href="">FAQ</a></li>
|
||||||
<li><a href="">Forums</a></li>
|
<li><a href="">Forums</a></li>
|
||||||
|
|
|
@ -103,3 +103,26 @@ swfobject.switchOffAutoHideShow();
|
||||||
|
|
||||||
swfobject.embedSWF('Scratch.swf', 'editor', '100%', '100%', '11.7.0', 'libs/expressInstall.swf',
|
swfobject.embedSWF('Scratch.swf', 'editor', '100%', '100%', '11.7.0', 'libs/expressInstall.swf',
|
||||||
flashVars, params, null, handleEmbedStatus);
|
flashVars, params, null, handleEmbedStatus);
|
||||||
|
|
||||||
|
function showPage(path) {
|
||||||
|
var toHide = "body > main, body > main > article, #editor";
|
||||||
|
var toShow = "#" + path;
|
||||||
|
if (path != "editor") {
|
||||||
|
toShow += ", body > main";
|
||||||
|
}
|
||||||
|
|
||||||
|
$(toHide).hide();
|
||||||
|
$(toShow).show();
|
||||||
|
}
|
||||||
|
|
||||||
|
$("[data-staticlink]").click(function(e) {
|
||||||
|
e.preventDefault();
|
||||||
|
showPage(e.target.attributes['data-staticlink'].value)
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
$(function (){
|
||||||
|
if (window.location.hash) {
|
||||||
|
showPage(window.location.hash.substr(1));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
|
@ -1,8 +1,7 @@
|
||||||
#editor {
|
#editor {
|
||||||
text-align: center ;
|
position: absolute;
|
||||||
margin-top: 30px;
|
width: 100%;
|
||||||
display: none;
|
height: 100%;
|
||||||
position: relative;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.scratch_unsupported p {
|
.scratch_unsupported p {
|
||||||
|
|
|
@ -35,7 +35,7 @@ body {
|
||||||
> section {
|
> section {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
#privacy-policy {
|
#home {
|
||||||
display: block;
|
display: block;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue