From b9a232d90b0ebba66cd51275cd9f92324d3df116 Mon Sep 17 00:00:00 2001 From: Tim Mickel Date: Thu, 24 Mar 2016 15:46:15 -0400 Subject: [PATCH 1/3] Add gear icon to top right of splash page --- editions/free/src/css/start.css | 14 ++++++++++++++ editions/free/src/index.html | 1 + src/entry/index.js | 1 + 3 files changed, 16 insertions(+) diff --git a/editions/free/src/css/start.css b/editions/free/src/css/start.css index fc7ec2c..b74cf5c 100644 --- a/editions/free/src/css/start.css +++ b/editions/free/src/css/start.css @@ -152,6 +152,20 @@ div.frame { .gettings.hide {display: none;} .gettings.show {display: block;} +.gear.hide {display: none;} +.gear.show {display: block;} + +.gear { + position: absolute; + top: 10px; + right: 25px; + background: url('../assets/lobby/gearOff.svg'); + background-repeat: no-repeat; + background-size: auto 100%; + width: 60px; + height: 60px; +} + .startcode { position: absolute; top: 65%; diff --git a/editions/free/src/index.html b/editions/free/src/index.html index 644e11d..90f879a 100644 --- a/editions/free/src/index.html +++ b/editions/free/src/index.html @@ -22,6 +22,7 @@ +
diff --git a/src/entry/index.js b/src/entry/index.js index 0a96bb6..e680aa1 100644 --- a/src/entry/index.js +++ b/src/entry/index.js @@ -72,6 +72,7 @@ function indexLoadOptions () { gn('purpleguy').className = 'purple hide'; gn('blueguy').className = 'blue hide'; gn('redguy').className = 'red hide'; + gn('gear').className = 'gear show'; } gn('gettings').className = 'gettings show'; gn('startcode').className = 'startcode show'; From c49870dd6bf9873a37450d878f40b5cb53d05b63 Mon Sep 17 00:00:00 2001 From: Tim Mickel Date: Thu, 24 Mar 2016 15:57:36 -0400 Subject: [PATCH 2/3] Add link for gear icon to settings page --- src/entry/index.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/entry/index.js b/src/entry/index.js index e680aa1..135b2da 100644 --- a/src/entry/index.js +++ b/src/entry/index.js @@ -25,6 +25,8 @@ export function indexMain () { gn('topbar-moreapps').ontouchstart = indexMoreApps; gn('topbar-info').ontouchstart = indexInfo; + } else { + gn('gear').ontouchstart = indexGoSettings; } setTimeout(function () { @@ -100,6 +102,13 @@ function indexGohome () { } } +function indexGoSettings () { + // Switch to the settings selection page + // Triggered by tapping the gear icon in the top right + ScratchAudio.sndFX('tap.wav'); + window.location.href = 'home.html?place=gear'; +} + function indexGettingstarted () { ScratchAudio.sndFX('tap.wav'); window.location.href = 'gettingstarted.html?place=home'; From 56ff66b6a80ada7dec88c78141feea8091e6f7c9 Mon Sep 17 00:00:00 2001 From: Tim Mickel Date: Thu, 24 Mar 2016 15:57:51 -0400 Subject: [PATCH 3/3] Include .gear CSS for taps --- editions/free/src/css/start.css | 3 +++ 1 file changed, 3 insertions(+) diff --git a/editions/free/src/css/start.css b/editions/free/src/css/start.css index b74cf5c..a09a7c4 100644 --- a/editions/free/src/css/start.css +++ b/editions/free/src/css/start.css @@ -162,6 +162,9 @@ div.frame { background: url('../assets/lobby/gearOff.svg'); background-repeat: no-repeat; background-size: auto 100%; + background-position-x: center; + -webkit-tap-highlight-color: transparent; + z-index: 1000; width: 60px; height: 60px; }