mirror of
https://github.com/scratchfoundation/scratchjr.git
synced 2024-11-25 08:38:30 -05:00
Includes and code stubs for rest of in-app help
This commit is contained in:
parent
def37de218
commit
fdbf07b6d9
4 changed files with 57 additions and 68 deletions
|
@ -1,25 +1,11 @@
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<script type="text/javascript" src="../Settings.js"></script>
|
|
||||||
<script type="text/javascript" src="../jssource/utils/Cookie.js"></script>
|
|
||||||
<script type="text/javascript" src="../jssource/utils/lib.js"></script>
|
|
||||||
<script type="text/javascript" src="../jssource/iPad/iOS.js"></script>
|
|
||||||
<script>
|
|
||||||
preprocessAndLoadCss("style", "style/style.css");
|
|
||||||
preprocessAndLoadCss("style", "style/blocks.css");
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<!-- Localization includes -->
|
|
||||||
<script type="text/javascript" src="../jssource/external/Intl/Intl.min.js"></script>
|
|
||||||
<script type="text/javascript" src="../jssource/external/intl-messageformat/intl-messageformat.min.js"></script>
|
|
||||||
<script type="text/javascript" src="../jssource/utils/Localization.js"></script>
|
|
||||||
<script>
|
|
||||||
Localization.root = "../";
|
|
||||||
Localization.includeLocales();
|
|
||||||
</script>
|
|
||||||
<!-- End localization includes -->
|
|
||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
|
<script>
|
||||||
|
window.scratchJrPage = 'inappBlocksGuide';
|
||||||
|
</script>
|
||||||
|
<script type="text/javascript" src="../jssource/build/bundles/app.bundle.js"></script>
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
|
|
|
@ -1,24 +1,11 @@
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<script type="text/javascript" src="../Settings.js"></script>
|
|
||||||
<script type="text/javascript" src="../jssource/utils/Cookie.js"></script>
|
|
||||||
<script type="text/javascript" src="../jssource/utils/lib.js"></script>
|
|
||||||
<script>
|
|
||||||
preprocessAndLoadCss("style", "style/style.css");
|
|
||||||
preprocessAndLoadCss("style", "style/interface.css");
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<!-- Localization includes -->
|
|
||||||
<script type="text/javascript" src="../jssource/external/Intl/Intl.min.js"></script>
|
|
||||||
<script type="text/javascript" src="../jssource/external/intl-messageformat/intl-messageformat.min.js"></script>
|
|
||||||
<script type="text/javascript" src="../jssource/utils/Localization.js"></script>
|
|
||||||
<script>
|
|
||||||
Localization.root = "../";
|
|
||||||
Localization.includeLocales();
|
|
||||||
</script>
|
|
||||||
<!-- End localization includes -->
|
|
||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
|
<script>
|
||||||
|
window.scratchJrPage = 'inappInterfaceGuide';
|
||||||
|
</script>
|
||||||
|
<script type="text/javascript" src="../jssource/build/bundles/app.bundle.js"></script>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div id="content">
|
<div id="content">
|
||||||
|
|
|
@ -1,24 +1,11 @@
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<script type="text/javascript" src="../Settings.js"></script>
|
|
||||||
<script type="text/javascript" src="../jssource/utils/Cookie.js"></script>
|
|
||||||
<script type="text/javascript" src="../jssource/utils/lib.js"></script>
|
|
||||||
<script>
|
|
||||||
preprocessAndLoadCss("style", "style/style.css");
|
|
||||||
preprocessAndLoadCss("style", "style/paint.css");
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<!-- Localization includes -->
|
|
||||||
<script type="text/javascript" src="../jssource/external/Intl/Intl.min.js"></script>
|
|
||||||
<script type="text/javascript" src="../jssource/external/intl-messageformat/intl-messageformat.min.js"></script>
|
|
||||||
<script type="text/javascript" src="../jssource/utils/Localization.js"></script>
|
|
||||||
<script>
|
|
||||||
Localization.root = "../";
|
|
||||||
Localization.includeLocales();
|
|
||||||
</script>
|
|
||||||
<!-- End localization includes -->
|
|
||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
|
<script>
|
||||||
|
window.scratchJrPage = 'inappPaintEditorGuide';
|
||||||
|
</script>
|
||||||
|
<script type="text/javascript" src="../jssource/build/bundles/app.bundle.js"></script>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div id="content">
|
<div id="content">
|
||||||
|
|
|
@ -132,6 +132,8 @@ function loadSettings (settingsRoot, whenDone) {
|
||||||
|
|
||||||
let place;
|
let place;
|
||||||
function gettingStartedVideo () {
|
function gettingStartedVideo () {
|
||||||
|
gn('closeHelp').onclick = gettingStartedCloseMe;
|
||||||
|
gn('closeHelp').ontouchstart = gettingStartedCloseMe;
|
||||||
var videoObj = gn('myVideo');
|
var videoObj = gn('myVideo');
|
||||||
if (isiOS) {
|
if (isiOS) {
|
||||||
// On iOS we can load from server
|
// On iOS we can load from server
|
||||||
|
@ -157,11 +159,40 @@ function gettingStartedCloseMe () {
|
||||||
window.location.href = 'home.html?place=' + place;
|
window.location.href = 'home.html?place=' + place;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function inappAbout () {
|
||||||
|
gn('aboutScratchjrTitle').textContent = Localization.localize('ABOUT_SCRATCHJR');
|
||||||
|
gn('aboutWhatIs').textContent = Localization.localize('ABOUT_WHAT_IS');
|
||||||
|
gn('aboutDescription').innerHTML = Localization.localize('ABOUT_DESCRIPTION') + '<br/><br/>' +
|
||||||
|
Localization.localize('ABOUT_INSPIRED_BY');
|
||||||
|
gn('aboutWhyCreate').textContent = Localization.localize('ABOUT_WHY_CREATE');
|
||||||
|
gn('aboutWhyCreateDescription').innerHTML = Localization.localize('ABOUT_WHY_CREATE_DESCRIPTION');
|
||||||
|
gn('aboutWhoCreated').textContent = Localization.localize('ABOUT_WHO_CREATED');
|
||||||
|
gn('aboutWhoCreatedDescription').innerHTML = (
|
||||||
|
Localization.localize('ABOUT_WHO_CREATED_DESCRIPTION'));
|
||||||
|
gn('aboutWhoSupported').textContent = Localization.localize('ABOUT_WHO_SUPPORTED');
|
||||||
|
gn('aboutWhoSupportedDescription').innerHTML = (
|
||||||
|
Localization.localize('ABOUT_WHO_SUPPORTED_DESCRIPTION')
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
function inappInterfaceGuide () {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
function inappPaintEditorGuide () {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
function inappBlocksGuide () {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
// App-wide entry-point
|
// App-wide entry-point
|
||||||
window.onload = () => {
|
window.onload = () => {
|
||||||
let page = window.scratchJrPage;
|
let page = window.scratchJrPage;
|
||||||
let root = './';
|
let root = './';
|
||||||
if (page == 'inappAbout') {
|
if (page == 'inappAbout' || page == 'inappInterfaceGuide' ||
|
||||||
|
page == 'inappPaintEditorGuide' || page == 'inappBlocksGuide') {
|
||||||
root = '../';
|
root = '../';
|
||||||
}
|
}
|
||||||
// Load settings from JSON
|
// Load settings from JSON
|
||||||
|
@ -201,24 +232,22 @@ window.onload = () => {
|
||||||
preprocessAndLoadCss('css', 'css/font.css');
|
preprocessAndLoadCss('css', 'css/font.css');
|
||||||
preprocessAndLoadCss('css', 'css/base.css');
|
preprocessAndLoadCss('css', 'css/base.css');
|
||||||
preprocessAndLoadCss('css', 'css/gs.css');
|
preprocessAndLoadCss('css', 'css/gs.css');
|
||||||
gn('closeHelp').onclick = gettingStartedCloseMe;
|
|
||||||
gn('closeHelp').ontouchstart = gettingStartedCloseMe;
|
|
||||||
iOS.waitForInterface(gettingStartedVideo);
|
iOS.waitForInterface(gettingStartedVideo);
|
||||||
} else if (page == 'inappAbout') {
|
} else if (page == 'inappAbout') {
|
||||||
preprocessAndLoadCss('style', 'style/about.css');
|
preprocessAndLoadCss('style', 'style/about.css');
|
||||||
gn('aboutScratchjrTitle').textContent = Localization.localize('ABOUT_SCRATCHJR');
|
iOS.waitForInterface(inappAbout);
|
||||||
gn('aboutWhatIs').textContent = Localization.localize('ABOUT_WHAT_IS');
|
} else if (page == 'inappInterfaceGuide') {
|
||||||
gn('aboutDescription').innerHTML = Localization.localize('ABOUT_DESCRIPTION') + '<br/><br/>' +
|
preprocessAndLoadCss('style', 'style/style.css');
|
||||||
Localization.localize('ABOUT_INSPIRED_BY');
|
preprocessAndLoadCss('style', 'style/interface.css');
|
||||||
gn('aboutWhyCreate').textContent = Localization.localize('ABOUT_WHY_CREATE');
|
iOS.waitForInterface(inappInterfaceGuide);
|
||||||
gn('aboutWhyCreateDescription').innerHTML = Localization.localize('ABOUT_WHY_CREATE_DESCRIPTION');
|
} else if (page == 'inappPaintEditorGuide') {
|
||||||
gn('aboutWhoCreated').textContent = Localization.localize('ABOUT_WHO_CREATED');
|
preprocessAndLoadCss('style', 'style/style.css');
|
||||||
gn('aboutWhoCreatedDescription').innerHTML = (
|
preprocessAndLoadCss('style', 'style/paint.css');
|
||||||
Localization.localize('ABOUT_WHO_CREATED_DESCRIPTION'));
|
iOS.waitForInterface(inappPaintEditorGuide);
|
||||||
gn('aboutWhoSupported').textContent = Localization.localize('ABOUT_WHO_SUPPORTED');
|
} else if (page == 'inappBlocksGuide') {
|
||||||
gn('aboutWhoSupportedDescription').innerHTML = (
|
preprocessAndLoadCss('style', 'style/style.css');
|
||||||
Localization.localize('ABOUT_WHO_SUPPORTED_DESCRIPTION')
|
preprocessAndLoadCss('style', 'style/blocks.css');
|
||||||
);
|
iOS.waitForInterface(inappBlocksGuide);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue