mirror of
https://github.com/scratchfoundation/scratchjr.git
synced 2024-11-25 00:28:20 -05:00
Reconciliation of PBS KIDS edition splash page
This commit is contained in:
parent
1da87914cc
commit
1a0801b74d
3 changed files with 66 additions and 7 deletions
|
@ -16,14 +16,24 @@
|
|||
</head>
|
||||
<body style="margin:0px; background: black;">
|
||||
<div class="frame" id="frame">
|
||||
<div class="topbar" id="topbar">
|
||||
<div class="topbar-button" id="topbar-info"></div>
|
||||
<div class="topbar-button" id="topbar-moreapps">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="credits hide" id="authors"></div>
|
||||
<div class="creditsText hide" id="authorsText"></div>
|
||||
<div class="rays" id="rays"></div>
|
||||
<div class="catface"></div>
|
||||
<div class="catface" id="catface"></div>
|
||||
<div class="jrlogo"></div>
|
||||
<div class="purple hide" id="purpleguy"></div>
|
||||
<div class="red hide" id="redguy"></div>
|
||||
<div class="blue hide" id="blueguy"></div>
|
||||
|
||||
<div class="startButton hide" id="startButton"></div>
|
||||
<div class="pbschars hide" id="pbschars"></div>
|
||||
|
||||
<div class="gettings hide" id="gettings"></div>
|
||||
<div class="startcode hide" id="startcode"></div>
|
||||
</div>
|
||||
|
|
|
@ -39,6 +39,8 @@ window.onload = () => {
|
|||
preprocessAndLoadCss('css', 'css/base.css');
|
||||
preprocessAndLoadCss('css', 'css/start.css');
|
||||
preprocessAndLoadCss('css', 'css/thumbs.css');
|
||||
/* For parental gate. These CSS properties should be refactored */
|
||||
preprocessAndLoadCss('css', 'css/editor.css');
|
||||
entryFunction = () => iOS.waitForInterface(indexMain);
|
||||
break;
|
||||
case 'home':
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
import ScratchAudio from '../utils/ScratchAudio';
|
||||
import {gn, getUrlVars, isAndroid, isiOS} from '../utils/lib';
|
||||
import iOS from '../iPad/iOS';
|
||||
import UI from '../editor/ui/UI';
|
||||
import Localization from '../utils/Localization';
|
||||
|
||||
export function indexMain () {
|
||||
gn('gettings').ontouchend = indexGettingstarted;
|
||||
|
@ -12,6 +14,19 @@ export function indexMain () {
|
|||
} else {
|
||||
indexFirstTime();
|
||||
}
|
||||
|
||||
if (window.Settings.edition == 'PBS') {
|
||||
gn('topbar-moreapps').textContent = Localization.localize('PBS_MORE_APPS');
|
||||
gn('startButton').textContent = Localization.localize('PBS_START');
|
||||
gn('gettings').textContent = Localization.localize('PBS_HOW_TO');
|
||||
|
||||
gn('startButton').ontouchend = indexGohome;
|
||||
gn('pbschars').ontouchend = indexGohome;
|
||||
|
||||
gn('topbar-moreapps').ontouchstart = indexMoreApps;
|
||||
gn('topbar-info').ontouchstart = indexInfo;
|
||||
}
|
||||
|
||||
setTimeout(function () {
|
||||
gn('rays').className = 'rays spinme';
|
||||
}, 250);
|
||||
|
@ -20,9 +35,16 @@ export function indexMain () {
|
|||
function indexFirstTime () {
|
||||
gn('authors').className = 'credits show';
|
||||
gn('authorsText').className = 'creditsText show';
|
||||
gn('purpleguy').className = 'purple show';
|
||||
gn('blueguy').className = 'blue show';
|
||||
gn('redguy').className = 'red show';
|
||||
if (window.Settings.edition == 'PBS') {
|
||||
gn('pbschars').className = 'characters hide';
|
||||
gn('startcode').className = 'catlogo show';
|
||||
gn('topbar').className = 'topbar hide';
|
||||
gn('startButton').className = 'startButton hide';
|
||||
} else {
|
||||
gn('purpleguy').className = 'purple show';
|
||||
gn('blueguy').className = 'blue show';
|
||||
gn('redguy').className = 'red show';
|
||||
}
|
||||
iOS.askpermission(); // ask for sound recording
|
||||
setTimeout(function () {
|
||||
iOS.hidesplash(doit);
|
||||
|
@ -41,9 +63,16 @@ function indexFirstTime () {
|
|||
function indexLoadOptions () {
|
||||
gn('authors').className = 'credits hide';
|
||||
gn('authorsText').className = 'creditsText hide';
|
||||
gn('purpleguy').className = 'purple hide';
|
||||
gn('blueguy').className = 'blue hide';
|
||||
gn('redguy').className = 'red hide';
|
||||
|
||||
if (window.Settings.edition == 'PBS') {
|
||||
gn('pbschars').className = 'characters show';
|
||||
gn('topbar').className = 'topbar show';
|
||||
gn('startButton').className = 'startButton show';
|
||||
} else {
|
||||
gn('purpleguy').className = 'purple hide';
|
||||
gn('blueguy').className = 'blue hide';
|
||||
gn('redguy').className = 'red hide';
|
||||
}
|
||||
gn('gettings').className = 'gettings show';
|
||||
gn('startcode').className = 'startcode show';
|
||||
document.ontouchmove = function (e) {
|
||||
|
@ -74,3 +103,21 @@ function indexGettingstarted () {
|
|||
ScratchAudio.sndFX('tap.wav');
|
||||
window.location.href = 'gettingstarted.html?place=home';
|
||||
}
|
||||
|
||||
// For PBS KIDS edition only
|
||||
function indexInfo () {
|
||||
ScratchAudio.sndFX('tap.wav');
|
||||
window.location.href = 'home.html?place=book';
|
||||
}
|
||||
|
||||
function indexMoreApps () {
|
||||
ScratchAudio.sndFX('tap.wav');
|
||||
|
||||
UI.parentalGate(null, function () {
|
||||
if (isiOS) {
|
||||
window.location.href = 'https://itunes.apple.com/us/developer/pbs-kids/id324323339?mt=8';
|
||||
} else {
|
||||
window.location.href = 'http://to.pbs.org/ScJr_GPlay';
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue