Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions website/src/css/index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -658,20 +658,20 @@ html[data-theme="dark"] .Section p a {
@extend %link-style-dark;
}

/* Talks */
/* VideoContent */

.Talks {
.VideoContent {
.twitter-follow-button {
margin-top: 1.5rem;
}
}

@media only screen and (max-width: 960px) {
.Talks .TwoColumns {
.VideoContent .TwoColumns {
grid-gap: 2rem;
}

.Talks .column.last {
.VideoContent .column.last {
width: 100%;
display: flex;
justify-content: center;
Expand All @@ -681,13 +681,13 @@ html[data-theme="dark"] .Section p a {
* If the full-width video won't fit, make it full-width.
* https://jameshfisher.com/2017/08/30/how-do-i-make-a-full-width-iframe/
*/
.Talks .vidWrapper {
.VideoContent .vidWrapper {
position: relative;
width: 100%;
padding-top: 56.25%;
}

.Talks iframe {
.VideoContent iframe {
position: absolute;
top: 0;
left: 0;
Expand All @@ -698,11 +698,11 @@ html[data-theme="dark"] .Section p a {

@media only screen and (min-width: 961px) {
/* Give more width for the video */
.Talks .TwoColumns {
.VideoContent .TwoColumns {
grid-template-columns: 1fr 2fr;
}

.Talks iframe {
.VideoContent iframe {
width: 560px;
height: 315px;
}
Expand Down
60 changes: 45 additions & 15 deletions website/src/pages/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,13 @@ Members of the React Native team frequently speak at various conferences.
<br/><br/>
You can follow the latest news from the React Native team on Twitter
`,
introVideo: `
The <a href="https://opensource.facebook.com/">Meta Open Source team</a> has put together a short overview of React Native,
where they explained the project in beginner's terms. You can also find
other content about Meta Open Source projects on their <a href="https://www.youtube.com/channel/UCCQY962PmHabTjaHv2wJzfQ">YouTube Channel</a>.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is odd to add -- I don't think coming to the React Native homepage folks are generally looking for other Meta Open Source projects. Can we remove the text "You can also find other content... You can follow the latest Meta OSS news.. " and just keep the twitter follow button?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As well as re-ordering so the React Native talk video is on top as mentioned earlier?

<br/><br/>
You can follow the latest Meta OSS news from the Meta Open Source team on Twitter
`,
};

function Heading({text}) {
Expand Down Expand Up @@ -122,13 +129,13 @@ function HomeCallToAction() {
);
}

function TwitterButton() {
function TwitterButton({accountName}) {
return (
<a
href="https://twitter.com/intent/follow?screen_name=reactnative&region=follow_link"
href={`https://twitter.com/intent/follow?screen_name=${accountName}&region=follow_link`}
className="twitter-follow-button">
<div className="icon" />
Follow @reactnative
Follow @{accountName}
</a>
);
}
Expand Down Expand Up @@ -245,7 +252,7 @@ function HeaderHero() {
return (
<Section background="dark" className="HeaderHero">
<div className="socialLinks">
<TwitterButton />
<TwitterButton accountName="reactnative"/>
<GitHubStarButton />
</div>
<TwoColumns
Expand Down Expand Up @@ -365,30 +372,53 @@ function FastRefresh() {
);
}

function Talks() {
function VideoContent() {
return (
<Section className="Talks" background="tint">
<TwoColumns
<div>
<Section className="VideoContent" background="tint">
<TwoColumns
columnOne={
<TextColumn
title="Talks"
text={textContent.talks}
moreContent={<TwitterButton />}
title="Brief Intro Video"
text={textContent.introVideo}
moreContent={<TwitterButton accountName="MetaOpenSource" />}
/>
}
columnTwo={
<div className="vidWrapper">
<iframe
src="https://www.youtube.com/embed/NCAY0HIfrwc"
title="Mobile Innovation with React Native, ComponentKit, and Litho"
src="https://www.youtube.com/embed/wUDeLT6WXnQ"
title="Explain Like I'm 5: React Native"
frameBorder="0"
allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture"
allowFullScreen
/>
</div>
}
/>
</Section>
/>
<br/>
<TwoColumns
columnOne={
<TextColumn
title="Talks"
text={textContent.talks}
moreContent={<TwitterButton accountName="reactnative" />}
/>
}
columnTwo={
<div className="vidWrapper">
<iframe
src="https://www.youtube.com/embed/NCAY0HIfrwc"
title="Mobile Innovation with React Native, ComponentKit, and Litho"
frameBorder="0"
allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture"
allowFullScreen
/>
</div>
}
/>
</Section>
</div>
);
}

Expand Down Expand Up @@ -542,7 +572,7 @@ const Index = () => {
<NativeDevelopment />
<CrossPlatform />
<FastRefresh />
<Talks />
<VideoContent />
<Community />
<GetStarted />
</Layout>
Expand Down