Commit ff6a3eb3 authored by seotts's avatar seotts Committed by Karishma Chadha

Add CPS video

parent 79bc95a4
...@@ -30,6 +30,7 @@ class VideoPreview extends React.Component { ...@@ -30,6 +30,7 @@ class VideoPreview extends React.Component {
<Video <Video
className="video" className="video"
height={this.props.videoHeight} height={this.props.videoHeight}
isYouTube={this.props.isYouTube}
videoId={this.props.videoId} videoId={this.props.videoId}
width={this.props.videoWidth} width={this.props.videoWidth}
/> />
...@@ -60,8 +61,13 @@ class VideoPreview extends React.Component { ...@@ -60,8 +61,13 @@ class VideoPreview extends React.Component {
} }
} }
VideoPreview.defaultProps = {
isYouTube: false
};
VideoPreview.propTypes = { VideoPreview.propTypes = {
buttonMessage: PropTypes.string.isRequired, buttonMessage: PropTypes.string.isRequired,
isYouTube: PropTypes.bool,
thumbnail: PropTypes.string.isRequired, thumbnail: PropTypes.string.isRequired,
thumbnailHeight: PropTypes.string, thumbnailHeight: PropTypes.string,
thumbnailWidth: PropTypes.string, thumbnailWidth: PropTypes.string,
......
...@@ -1504,25 +1504,27 @@ class AnnualReport extends React.Component { ...@@ -1504,25 +1504,27 @@ class AnnualReport extends React.Component {
<div className="video-background cps"> <div className="video-background cps">
<MediaQuery minWidth={frameless.tabletPortrait}> <MediaQuery minWidth={frameless.tabletPortrait}>
<VideoPreview <VideoPreview
isYouTube
buttonMessage={ buttonMessage={
this.props.intl.formatMessage({id: 'annualReport.watchVideo'}) this.props.intl.formatMessage({id: 'annualReport.watchVideo'})
} }
thumbnail="/images/annual-report/initiatives/schools/CPS Story/CPS Video Thumbnail.png" thumbnail="/images/annual-report/initiatives/schools/CPS Story/CPS Video Thumbnail.png"
thumbnailWidth="580" thumbnailWidth="580"
videoHeight="320" videoHeight="320"
videoId="joal01i8b1" videoId="9QD9IxOinLg"
videoWidth="568" videoWidth="568"
/> />
</MediaQuery> </MediaQuery>
<MediaQuery maxWidth={frameless.tabletPortrait - 1}> <MediaQuery maxWidth={frameless.tabletPortrait - 1}>
<VideoPreview <VideoPreview
isYouTube
buttonMessage={ buttonMessage={
this.props.intl.formatMessage({id: 'annualReport.watchVideo'}) this.props.intl.formatMessage({id: 'annualReport.watchVideo'})
} }
thumbnail="/images/annual-report/initiatives/schools/CPS Story/CPS Video Thumbnail.png" thumbnail="/images/annual-report/initiatives/schools/CPS Story/CPS Video Thumbnail.png"
thumbnailWidth="400" thumbnailWidth="400"
videoHeight="216" videoHeight="216"
videoId="joal01i8b1" videoId="9QD9IxOinLg"
videoWidth="380" videoWidth="380"
/> />
</MediaQuery> </MediaQuery>
......
...@@ -1721,6 +1721,10 @@ p { ...@@ -1721,6 +1721,10 @@ p {
&.cps { &.cps {
background-image: url("/images/annual-report/initiatives/schools/CPS Story/CPS Video Splash.svg"); background-image: url("/images/annual-report/initiatives/schools/CPS Story/CPS Video Splash.svg");
.button {
background-color: $ui-purple;
}
} }
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment