This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@import '../../styles/shared.scss'; | |
.video-info-box { | |
/* ... */ | |
grid: auto auto / calc(#{$avatar-diameter} + #{$avatar-margin}) auto max-content; | |
/* ... */ | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react'; | |
import {Button, Divider, Icon} from "semantic-ui-react"; | |
import './VideoMetadata.scss'; | |
export function VideoMetadata(props) { | |
/* Todo */ | |
return (<div/>); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
render() { | |
/* ... */ | |
return ( | |
<div> | |
<div className='video-info-box'> | |
{/* ... */} | |
<div className="video-description"> | |
<div className={descriptionTextClass}> | |
{descriptionParagraphs} | |
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* ... */ | |
render() { | |
let descriptionTextClass = 'collapsed'; | |
let buttonTitle = 'Show More'; | |
if (!this.state.collapsed) { | |
descriptionTextClass = 'expanded'; | |
buttonTitle = 'Show Less'; | |
} | |
/* ... */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.video-description { | |
/* Leave the old content just as it was and add the code below */ | |
p { | |
line-height: 1.4rem; | |
margin-bottom: 0; | |
} | |
.collapsed { | |
max-height: 2.8rem; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export class VideoInfoBox extends React.Component { | |
constructor(props) { | |
super(props); | |
this.state = { | |
collapsed: true, | |
}; | |
} | |
render() { | |
/* ... */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div className='video-info-box'> | |
<Image className='channel-image' src='http://via.placeholder.com/48x48' circular/> | |
<div className="video-info"> | |
<div className='channel-name'>Channel Name</div> | |
<div className='video-publication-date'>Thu 24, 2017</div> | |
</div> | |
<Button color='youtube'>91.5K Subscribe</Button> | |
<div className="video-description"> | |
<p>Paragraph 1</p> | |
<p>Paragraph 2</p> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.video-info-box { | |
/* ... */ | |
.channel-image { | |
grid-row: 1 / 2; | |
grid-column: 1 / 2; | |
} | |
.video-info { | |
grid-row: 1 / 2; | |
grid-column: 2 / 3; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const embedUrl = `${BASE_EMBED_URL}${props.id}?autoplay=1`; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@import '../../styles/shared.scss'; | |
.video-preview { | |
display: grid; | |
grid: 118px auto / 210px; | |
} | |
.image-container { | |
position: relative; | |
grid-row: 1 / 2; |