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
8c6013b2
Commit
8c6013b2
authored
Dec 05, 2018
by
Eric Rosenbaum
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add extension video component to wedo and ev3 pages
parent
d206b44a
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
40 additions
and
22 deletions
+40
-22
src/components/extension-landing/extension-landing.scss
src/components/extension-landing/extension-landing.scss
+2
-2
src/components/extension-landing/extension-video.jsx
src/components/extension-landing/extension-video.jsx
+29
-0
src/views/ev3/ev3.jsx
src/views/ev3/ev3.jsx
+5
-4
src/views/wedo2/wedo2.jsx
src/views/wedo2/wedo2.jsx
+4
-16
No files found.
src/components/extension-landing/extension-landing.scss
View file @
8c6013b2
...
@@ -117,8 +117,8 @@
...
@@ -117,8 +117,8 @@
.video-player
{
.video-player
{
height
:
180px
;
height
:
180px
;
border
:
2px
solid
$ui-border
;
border
:
0
.25rem
solid
$ui-white-15percent
;
border-radius
:
10px
;
border-radius
:
0
.75rem
;
overflow
:
hidden
;
overflow
:
hidden
;
}
}
}
}
...
...
src/components/extension-landing/extension-video.jsx
0 → 100644
View file @
8c6013b2
const
PropTypes
=
require
(
'
prop-types
'
);
const
React
=
require
(
'
react
'
);
require
(
'
./extension-landing.scss
'
);
const
ExtensionVideo
=
props
=>
(
<
div
className=
"video-player"
>
<
iframe
allowFullScreen
allowTransparency=
"true"
frameBorder=
"0"
height=
"180"
scrolling=
"no"
src=
{
`https://fast.wistia.net/embed/iframe/${props.videoId}?seo=false&videoFoam=true`
}
title=
"📹"
width=
"320"
/>
<
script
async
src=
"https://fast.wistia.net/assets/external/E-v1.js"
/>
</
div
>
);
ExtensionVideo
.
propTypes
=
{
videoId
:
PropTypes
.
string
};
module
.
exports
=
ExtensionVideo
;
src/views/ev3/ev3.jsx
View file @
8c6013b2
...
@@ -13,6 +13,7 @@ const OSChooser = require('../../components/os-chooser/os-chooser.jsx');
...
@@ -13,6 +13,7 @@ const OSChooser = require('../../components/os-chooser/os-chooser.jsx');
const
ExtensionLanding
=
require
(
'
../../components/extension-landing/extension-landing.jsx
'
);
const
ExtensionLanding
=
require
(
'
../../components/extension-landing/extension-landing.jsx
'
);
const
ExtensionHeader
=
require
(
'
../../components/extension-landing/extension-header.jsx
'
);
const
ExtensionHeader
=
require
(
'
../../components/extension-landing/extension-header.jsx
'
);
const
ExtensionVideo
=
require
(
'
../../components/extension-landing/extension-video.jsx
'
);
const
ExtensionRequirements
=
require
(
'
../../components/extension-landing/extension-requirements.jsx
'
);
const
ExtensionRequirements
=
require
(
'
../../components/extension-landing/extension-requirements.jsx
'
);
const
ExtensionSection
=
require
(
'
../../components/extension-landing/extension-section.jsx
'
);
const
ExtensionSection
=
require
(
'
../../components/extension-landing/extension-section.jsx
'
);
const
InstallScratchLink
=
require
(
'
../../components/extension-landing/install-scratch-link.jsx
'
);
const
InstallScratchLink
=
require
(
'
../../components/extension-landing/install-scratch-link.jsx
'
);
...
@@ -54,10 +55,10 @@ class EV3 extends ExtensionLanding {
...
@@ -54,10 +55,10 @@ class EV3 extends ExtensionLanding {
/>
/>
</
FlexRow
>
</
FlexRow
>
}
}
renderImage=
{
<
img
renderImage=
{
alt=
{
this
.
props
.
intl
.
formatMessage
({
id
:
'
ev3.imgAltEv3Illustration
'
})
}
<
ExtensionVideo
src=
"/images/ev3/ev3-illustration.png
"
videoId=
"0huu6wfiki
"
/>
}
/>
}
renderRequirements=
{
renderRequirements=
{
<
ExtensionRequirements
>
<
ExtensionRequirements
>
<
span
>
<
span
>
...
...
src/views/wedo2/wedo2.jsx
View file @
8c6013b2
...
@@ -13,6 +13,7 @@ const OSChooser = require('../../components/os-chooser/os-chooser.jsx');
...
@@ -13,6 +13,7 @@ const OSChooser = require('../../components/os-chooser/os-chooser.jsx');
const
ExtensionLanding
=
require
(
'
../../components/extension-landing/extension-landing.jsx
'
);
const
ExtensionLanding
=
require
(
'
../../components/extension-landing/extension-landing.jsx
'
);
const
ExtensionHeader
=
require
(
'
../../components/extension-landing/extension-header.jsx
'
);
const
ExtensionHeader
=
require
(
'
../../components/extension-landing/extension-header.jsx
'
);
const
ExtensionVideo
=
require
(
'
../../components/extension-landing/extension-video.jsx
'
);
const
ExtensionRequirements
=
require
(
'
../../components/extension-landing/extension-requirements.jsx
'
);
const
ExtensionRequirements
=
require
(
'
../../components/extension-landing/extension-requirements.jsx
'
);
const
ExtensionSection
=
require
(
'
../../components/extension-landing/extension-section.jsx
'
);
const
ExtensionSection
=
require
(
'
../../components/extension-landing/extension-section.jsx
'
);
const
InstallScratchLink
=
require
(
'
../../components/extension-landing/install-scratch-link.jsx
'
);
const
InstallScratchLink
=
require
(
'
../../components/extension-landing/install-scratch-link.jsx
'
);
...
@@ -52,22 +53,9 @@ class Wedo2 extends ExtensionLanding {
...
@@ -52,22 +53,9 @@ class Wedo2 extends ExtensionLanding {
</
FlexRow
>
</
FlexRow
>
}
}
renderImage=
{
renderImage=
{
<
div
className=
"video-player"
>
<
ExtensionVideo
<
iframe
videoId=
"4im7iizv47"
allowFullScreen
/>
allowTransparency=
"true"
frameBorder=
"0"
height=
"180"
scrolling=
"no"
src=
{
`https://fast.wistia.net/embed/iframe/4im7iizv47?seo=false&videoFoam=true`
}
title=
"📹"
width=
"320"
/>
<
script
async
src=
"https://fast.wistia.net/assets/external/E-v1.js"
/>
</
div
>
}
}
renderRequirements=
{
renderRequirements=
{
<
ExtensionRequirements
>
<
ExtensionRequirements
>
...
...
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