Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
scratch-www
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
xpstem
scratch-www
Commits
61bfc254
Unverified
Commit
61bfc254
authored
Jul 17, 2018
by
Andrew Sliwinski
Committed by
GitHub
Jul 17, 2018
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1956 from technoboy10/feature/beta-banner
Add top and middle splash page banners for beta launch
parents
cdeb9f50
90bd2af3
Changes
13
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
366 additions
and
5 deletions
+366
-5
src/routes.json
src/routes.json
+9
-3
src/views/preview-faq/l10n.json
src/views/preview-faq/l10n.json
+1
-1
src/views/splash/beta/middle-banner.jsx
src/views/splash/beta/middle-banner.jsx
+43
-0
src/views/splash/beta/middle-banner.scss
src/views/splash/beta/middle-banner.scss
+99
-0
src/views/splash/beta/small-top-banner.jsx
src/views/splash/beta/small-top-banner.jsx
+26
-0
src/views/splash/beta/small-top-banner.scss
src/views/splash/beta/small-top-banner.scss
+27
-0
src/views/splash/beta/top-banner.jsx
src/views/splash/beta/top-banner.jsx
+37
-0
src/views/splash/beta/top-banner.scss
src/views/splash/beta/top-banner.scss
+82
-0
src/views/splash/l10n.json
src/views/splash/l10n.json
+5
-1
src/views/splash/presentation.jsx
src/views/splash/presentation.jsx
+37
-0
static/images/beta/bg-pattern.png
static/images/beta/bg-pattern.png
+0
-0
static/images/beta/left-illustration.png
static/images/beta/left-illustration.png
+0
-0
static/images/beta/right-illustration.png
static/images/beta/right-illustration.png
+0
-0
No files found.
src/routes.json
View file @
61bfc254
...
...
@@ -205,11 +205,17 @@
"title"
:
"Scratch 3.0 Preview"
},
{
"name"
:
"preview-faq"
,
"name"
:
"3faq"
,
"pattern"
:
"^/3faq/?$"
,
"routeAlias"
:
"/3faq/?$"
,
"view"
:
"preview-faq/preview-faq"
,
"title"
:
"Scratch 3.0 FAQ"
},
{
"name"
:
"preview-faq-redirect"
,
"pattern"
:
"^/preview-faq/?$"
,
"routeAlias"
:
"/preview-faq/?$"
,
"view"
:
"preview-faq/preview-faq"
,
"title"
:
"Scratch 3.0 Preview FAQ"
"redirect"
:
"/3faq"
},
{
"name"
:
"privacypolicy"
,
...
...
src/views/preview-faq/l10n.json
View file @
61bfc254
{
"preview-faq.title"
:
"Scratch 3.0
Preview
FAQ"
"preview-faq.title"
:
"Scratch 3.0 FAQ"
}
src/views/splash/beta/middle-banner.jsx
0 → 100644
View file @
61bfc254
const
FormattedMessage
=
require
(
'
react-intl
'
).
FormattedMessage
;
const
injectIntl
=
require
(
'
react-intl
'
).
injectIntl
;
const
React
=
require
(
'
react
'
);
const
MediaQuery
=
require
(
'
react-responsive
'
).
default
;
const
FlexRow
=
require
(
'
../../../components/flex-row/flex-row.jsx
'
);
const
TitleBanner
=
require
(
'
../../../components/title-banner/title-banner.jsx
'
);
const
frameless
=
require
(
'
../../../lib/frameless
'
);
require
(
'
./middle-banner.scss
'
);
const
MiddleBanner
=
()
=>
(
<
TitleBanner
className=
"beta-middle-banner"
>
<
FlexRow
className=
"beta-middle-container column"
>
<
h2
className=
"beta-header"
>
<
FormattedMessage
id=
"betabanner.title"
/>
</
h2
>
<
h3
className=
"beta-copy"
>
<
FormattedMessage
id=
"betabanner.subtitle"
/>
</
h3
>
<
a
className=
"beta-try-it button"
href=
"https://beta.scratch.mit.edu/"
>
<
FormattedMessage
id=
"betabanner.callToAction"
/>
</
a
>
</
FlexRow
>
<
div
className=
"beta-banner-images"
>
<
MediaQuery
maxWidth=
{
frameless
.
desktop
-
1
}
>
<
div
className=
"beta-banner-image left"
>
<
img
src=
"/images/beta/left-illustration.png"
/>
</
div
>
</
MediaQuery
>
<
div
className=
"beta-banner-image right"
>
<
img
src=
"/images/beta/right-illustration.png"
/>
</
div
>
</
div
>
</
TitleBanner
>
);
module
.
exports
=
injectIntl
(
MiddleBanner
);
src/views/splash/beta/middle-banner.scss
0 → 100644
View file @
61bfc254
@import
"../../../colors"
;
@import
"../../../frameless"
;
.beta-middle-banner
{
display
:
flex
;
margin-top
:
20px
;
border-radius
:
16px
;
background-color
:
$ui-orange
;
background-image
:
url("/images/beta/bg-pattern.png")
;
background-size
:
cover
;
padding
:
0
;
height
:
17rem
;
overflow
:
hidden
;
box-sizing
:
border-box
;
justify-content
:
space-between
;
.beta-middle-container
{
padding-left
:
3rem
;
align-items
:
flex-start
;
flex-shrink
:
0
;
}
.beta-banner-images
{
display
:
flex
;
height
:
100%
;
align-self
:
flex-end
;
.beta-banner-image
{
display
:
flex
;
margin-right
:
2rem
;
min-width
:
0
;
height
:
100%
;
align-self
:
flex-end
;
img
{
display
:
block
;
max-width
:
100%
;
max-height
:
100%
;
align-self
:
flex-end
;
}
}
}
.beta-header
,
.beta-copy
,
.beta-try-it
{
color
:
$ui-white
;
}
.beta-header
{
font-size
:
1
.7rem
;
}
.beta-copy
{
margin-bottom
:
1rem
;
max-width
:
350px
;
line-height
:
1
.7rem
;
font-size
:
1
.3rem
;
}
.beta-try-it
{
border-radius
:
10px
;
padding
:
1em
2em
;
font-size
:
1em
;
}
}
@media
only
screen
and
(
min-width
:
$tablet
)
and
(
max-width
:
$desktop
-
1
)
{
.beta-middle-banner
{
margin
:
20px
auto
40px
auto
;
width
:
$cols8
;
height
:
initial
;
flex-direction
:
column
;
justify-content
:
center
;
.beta-middle-container
{
padding-top
:
4rem
;
padding-left
:
0
;
align-items
:
center
;
}
.beta-banner-images
{
.beta-banner-image
{
margin
:
0
;
padding
:
0
;
&
.left
{
margin-left
:
-2
.5rem
;
}
&
.right
{
margin-right
:
-2
.5rem
;
}
}
}
}
}
src/views/splash/beta/small-top-banner.jsx
0 → 100644
View file @
61bfc254
const
FormattedMessage
=
require
(
'
react-intl
'
).
FormattedMessage
;
const
injectIntl
=
require
(
'
react-intl
'
).
injectIntl
;
const
React
=
require
(
'
react
'
);
const
FlexRow
=
require
(
'
../../../components/flex-row/flex-row.jsx
'
);
const
TitleBanner
=
require
(
'
../../../components/title-banner/title-banner.jsx
'
);
require
(
'
./small-top-banner.scss
'
);
const
SmallTopBanner
=
()
=>
(
<
TitleBanner
className=
"beta-small-top-banner"
>
<
FlexRow
className=
"beta-small-top-container"
>
<
h2
className=
"beta-copy"
>
<
FormattedMessage
id=
"betabanner.subtitle"
/>
</
h2
>
<
a
className=
"beta-try-it button"
href=
"https://beta.scratch.mit.edu/"
>
<
FormattedMessage
id=
"betabanner.callToAction"
/>
</
a
>
</
FlexRow
>
</
TitleBanner
>
);
module
.
exports
=
injectIntl
(
SmallTopBanner
);
src/views/splash/beta/small-top-banner.scss
0 → 100644
View file @
61bfc254
@import
"../../../colors"
;
.beta-small-top-banner
{
background
:
$ui-orange
;
padding
:
5px
0
;
.beta-small-top-container
{
justify-content
:
center
;
}
.beta-copy
,
.beta-try-it
{
color
:
$ui-white
;
font-weight
:
500
;
}
.beta-copy
{
font-size
:
1
.1rem
;
}
.beta-try-it
{
margin-left
:
32px
;
border-radius
:
8px
;
padding
:
.625rem
1
.2rem
;
font-size
:
1rem
;
}
}
src/views/splash/beta/top-banner.jsx
0 → 100644
View file @
61bfc254
const
FormattedMessage
=
require
(
'
react-intl
'
).
FormattedMessage
;
const
injectIntl
=
require
(
'
react-intl
'
).
injectIntl
;
const
React
=
require
(
'
react
'
);
const
FlexRow
=
require
(
'
../../../components/flex-row/flex-row.jsx
'
);
const
TitleBanner
=
require
(
'
../../../components/title-banner/title-banner.jsx
'
);
require
(
'
./top-banner.scss
'
);
const
TopBanner
=
()
=>
(
<
TitleBanner
className=
"beta-top-banner"
>
<
FlexRow
className=
"beta-top-container column"
>
<
h1
className=
"beta-header"
>
<
FormattedMessage
id=
"betabanner.title"
/>
</
h1
>
<
h3
className=
"beta-copy"
>
<
FormattedMessage
id=
"betabanner.subtitle"
/>
</
h3
>
<
a
className=
"beta-try-it button"
href=
"https://beta.scratch.mit.edu/"
>
<
FormattedMessage
id=
"betabanner.callToAction"
/>
</
a
>
</
FlexRow
>
<
div
className=
"beta-banner-images"
>
<
div
className=
"beta-banner-image left"
>
<
img
src=
"/images/beta/left-illustration.png"
/>
</
div
>
<
div
className=
"beta-banner-image right"
>
<
img
src=
"/images/beta/right-illustration.png"
/>
</
div
>
</
div
>
</
TitleBanner
>
);
module
.
exports
=
injectIntl
(
TopBanner
);
src/views/splash/beta/top-banner.scss
0 → 100644
View file @
61bfc254
@import
"../../../colors"
;
@import
"../../../frameless"
;
.beta-top-banner
{
display
:
flex
;
position
:
relative
;
background-color
:
$ui-orange
;
background-image
:
url("/images/beta/bg-pattern.png")
;
background-size
:
cover
;
padding
:
0
;
height
:
20rem
;
overflow
:
hidden
;
justify-content
:
center
;
.beta-top-container
{
position
:
absolute
;
top
:
0
;
bottom
:
0
;
margin
:
auto
;
height
:
15rem
;
}
.beta-banner-images
{
display
:
flex
;
width
:
100%
;
justify-content
:
space-between
;
}
.beta-banner-image
{
display
:
flex
;
width
:
27rem
;
align-self
:
flex-end
;
img
{
max-width
:
100%
;
height
:
auto
;
align-self
:
flex-end
;
}
&
.left
{
margin-left
:
-2
.5rem
;
}
&
.right
{
margin-right
:
-2
.5rem
;
}
}
.beta-header
,
.beta-copy
,
.beta-try-it
{
color
:
$ui-white
;
}
.beta-header
{
font-size
:
2
.2rem
;
}
.beta-copy
{
font-size
:
1
.3rem
;
}
.beta-try-it
{
border-radius
:
10px
;
padding
:
1em
2em
;
font-size
:
1em
;
}
}
@media
only
screen
and
(
min-width
:
$tablet
)
and
(
max-width
:
1200px
)
{
.beta-top-banner
{
height
:
22rem
;
.beta-top-container
{
bottom
:
4rem
;
}
.beta-banner-image
{
width
:
20rem
;
}
}
}
src/views/splash/l10n.json
View file @
61bfc254
...
...
@@ -39,5 +39,9 @@
"welcome.welcomeToScratch"
:
"Welcome to Scratch!"
,
"welcome.learn"
:
"Learn how to make a project in Scratch"
,
"welcome.tryOut"
:
"Try out starter projects"
,
"welcome.connect"
:
"Connect with other Scratchers"
"welcome.connect"
:
"Connect with other Scratchers"
,
"betabanner.title"
:
"The Next Generation of Scratch"
,
"betabanner.subtitle"
:
"Scratch 3.0 is coming in January! Try the Beta version now."
,
"betabanner.callToAction"
:
"Try it!"
}
src/views/splash/presentation.jsx
View file @
61bfc254
...
...
@@ -31,6 +31,14 @@ const LoveProjectMessage = require('./activity-rows/love-project.jsx');
const
RemixProjectMessage
=
require
(
'
./activity-rows/remix-project.jsx
'
);
const
ShareProjectMessage
=
require
(
'
./activity-rows/share-project.jsx
'
);
// Beta Banner Components
const
TopBanner
=
require
(
'
./beta/top-banner.jsx
'
);
const
SmallTopBanner
=
require
(
'
./beta/small-top-banner.jsx
'
);
const
MiddleBanner
=
require
(
'
./beta/middle-banner.jsx
'
);
const
BETA_LAUNCH_TIME
=
1533128400000
;
// August 1 at 9am ET
const
SMALL_BANNER_TIME
=
1534942800000
;
// August 22 at 9am ET
require
(
'
./splash.scss
'
);
class
ActivityList
extends
React
.
Component
{
...
...
@@ -271,6 +279,21 @@ class SplashPresentation extends React.Component { // eslint-disable-line react/
);
}
if
(
this
.
props
.
sessionStatus
===
sessionActions
.
Status
.
FETCHED
&&
Object
.
keys
(
this
.
props
.
user
).
length
===
0
&&
Date
.
now
()
>=
BETA_LAUNCH_TIME
// Show middle banner on and after August 1
)
{
rows
.
push
(
<
MediaQuery
key=
"frameless-tablet"
minWidth=
{
frameless
.
tablet
}
>
<
MiddleBanner
/>
</
MediaQuery
>
);
}
if
(
this
.
props
.
featuredGlobal
.
scratch_design_studio
&&
this
.
props
.
featuredGlobal
.
scratch_design_studio
.
length
>
4
)
{
...
...
@@ -416,6 +439,20 @@ class SplashPresentation extends React.Component { // eslint-disable-line react/
messages=
{
messages
}
/>
]
:
[]
}
{
this
.
props
.
sessionStatus
===
sessionActions
.
Status
.
FETCHED
&&
Object
.
keys
(
this
.
props
.
user
).
length
!==
0
&&
// Only show top banner if user is logged in
Date
.
now
()
>=
BETA_LAUNCH_TIME
&&
<
MediaQuery
key=
"frameless-tablet"
minWidth=
{
frameless
.
tablet
}
>
{
Date
.
now
()
>=
SMALL_BANNER_TIME
?
<
SmallTopBanner
/>
:
// Show small banner starting September 1 at 9am ET
<
TopBanner
/>
}
</
MediaQuery
>
}
<
div
className=
"inner mod-splash"
key=
"inner"
...
...
static/images/beta/bg-pattern.png
0 → 100644
View file @
61bfc254
167 KB
static/images/beta/left-illustration.png
0 → 100644
View file @
61bfc254
64.7 KB
static/images/beta/right-illustration.png
0 → 100644
View file @
61bfc254
68.1 KB
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment