diff --git a/website/src/pages/Home/CallToAction/index.tsx b/website/src/components/Home/CallToAction/index.tsx similarity index 100% rename from website/src/pages/Home/CallToAction/index.tsx rename to website/src/components/Home/CallToAction/index.tsx diff --git a/website/src/pages/Home/CallToAction/styles.module.css b/website/src/components/Home/CallToAction/styles.module.css similarity index 100% rename from website/src/pages/Home/CallToAction/styles.module.css rename to website/src/components/Home/CallToAction/styles.module.css diff --git a/website/src/pages/Home/Community/index.tsx b/website/src/components/Home/Community/index.tsx similarity index 97% rename from website/src/pages/Home/Community/index.tsx rename to website/src/components/Home/Community/index.tsx index fe4987f1703..05e5db13dec 100644 --- a/website/src/pages/Home/Community/index.tsx +++ b/website/src/components/Home/Community/index.tsx @@ -6,11 +6,12 @@ */ import React from 'react'; + import useBaseUrl from '@docusaurus/useBaseUrl'; import useDocusaurusContext from '@docusaurus/useDocusaurusContext'; -import Section from '../components/Section'; -import SectionTitle from '../components/SectionTitle'; +import Section from '../Section'; +import SectionTitle from '../SectionTitle'; import styles from './styles.module.css'; diff --git a/website/src/pages/Home/Community/styles.module.css b/website/src/components/Home/Community/styles.module.css similarity index 100% rename from website/src/pages/Home/Community/styles.module.css rename to website/src/components/Home/Community/styles.module.css diff --git a/website/src/pages/Home/Framework/index.tsx b/website/src/components/Home/Framework/index.tsx similarity index 77% rename from website/src/pages/Home/Framework/index.tsx rename to website/src/components/Home/Framework/index.tsx index 4dd1d0984e9..2bd04b08c06 100644 --- a/website/src/pages/Home/Framework/index.tsx +++ b/website/src/components/Home/Framework/index.tsx @@ -7,9 +7,11 @@ import React from 'react'; -import ThemeImage from '../components/ThemeImage'; -import Section from '../components/Section'; -import SectionTitle from '../components/SectionTitle'; +import useBaseUrl from '@docusaurus/useBaseUrl'; +import ThemedImage from '@theme/ThemedImage'; + +import Section from '../Section'; +import SectionTitle from '../SectionTitle'; import styles from './styles.module.css'; @@ -30,9 +32,11 @@ function Framework() { />
- @@ -45,11 +49,13 @@ function Framework() {
-

@@ -62,9 +68,11 @@ function Framework() {

- diff --git a/website/src/pages/Home/Framework/styles.module.css b/website/src/components/Home/Framework/styles.module.css similarity index 86% rename from website/src/pages/Home/Framework/styles.module.css rename to website/src/components/Home/Framework/styles.module.css index 90170878480..2b457135440 100644 --- a/website/src/pages/Home/Framework/styles.module.css +++ b/website/src/components/Home/Framework/styles.module.css @@ -24,6 +24,11 @@ .cardContent { padding: 16px 24px; + border-top: 1px solid var(--home-border); +} + +.cardImage { + aspect-ratio: 284/148; } .cardTitle { @@ -40,7 +45,7 @@ line-height: 150%; } -@media only screen and (max-width: 900px) { +@media only screen and (max-width: 996px) { .cardContainer { display: flex; flex-direction: column; @@ -51,9 +56,13 @@ text-align: start; } + .cardContent { + border-top: 0; + } + .cardImage { width: auto; - height: 150px; + max-height: 150px; margin: 1rem; border-radius: 0.5rem; border: 1px solid var(--home-border); diff --git a/website/src/pages/Home/Hero/Devices.tsx b/website/src/components/Home/Hero/Devices.tsx similarity index 100% rename from website/src/pages/Home/Hero/Devices.tsx rename to website/src/components/Home/Hero/Devices.tsx diff --git a/website/src/pages/Home/Hero/FloorBackground.tsx b/website/src/components/Home/Hero/FloorBackground.tsx similarity index 100% rename from website/src/pages/Home/Hero/FloorBackground.tsx rename to website/src/components/Home/Hero/FloorBackground.tsx diff --git a/website/src/pages/Home/Hero/GridBackground.tsx b/website/src/components/Home/Hero/GridBackground.tsx similarity index 100% rename from website/src/pages/Home/Hero/GridBackground.tsx rename to website/src/components/Home/Hero/GridBackground.tsx diff --git a/website/src/pages/Home/Hero/index.tsx b/website/src/components/Home/Hero/index.tsx similarity index 100% rename from website/src/pages/Home/Hero/index.tsx rename to website/src/components/Home/Hero/index.tsx index 265c0966d84..8c9251bf3c5 100644 --- a/website/src/pages/Home/Hero/index.tsx +++ b/website/src/components/Home/Hero/index.tsx @@ -9,10 +9,10 @@ import React from 'react'; import GitHubButton from 'react-github-btn'; import Logo from '../Logo'; - import GridBackground from './GridBackground'; import FloorBackground from './FloorBackground'; import Devices from './Devices'; + import styles from './styles.module.css'; function Hero() { diff --git a/website/src/pages/Home/Hero/styles.module.css b/website/src/components/Home/Hero/styles.module.css similarity index 99% rename from website/src/pages/Home/Hero/styles.module.css rename to website/src/components/Home/Hero/styles.module.css index 36d4633875c..c4f3701bd9c 100644 --- a/website/src/pages/Home/Hero/styles.module.css +++ b/website/src/components/Home/Hero/styles.module.css @@ -82,6 +82,7 @@ .content { position: relative; top: 120px; + padding-inline: 24px; display: flex; flex-direction: column; justify-content: center; diff --git a/website/src/pages/Home/Logo.tsx b/website/src/components/Home/Logo.tsx similarity index 100% rename from website/src/pages/Home/Logo.tsx rename to website/src/components/Home/Logo.tsx diff --git a/website/src/pages/Home/Native/index.tsx b/website/src/components/Home/Native/index.tsx similarity index 78% rename from website/src/pages/Home/Native/index.tsx rename to website/src/components/Home/Native/index.tsx index f8c84882d17..050b66ef67a 100644 --- a/website/src/pages/Home/Native/index.tsx +++ b/website/src/components/Home/Native/index.tsx @@ -7,9 +7,10 @@ import React from 'react'; -import Section from '../components/Section'; -import SectionTitle from '../components/SectionTitle'; -import ThemeImage from '../components/ThemeImage'; +import ThemedImage from '@theme/ThemedImage'; + +import Section from '../Section'; +import SectionTitle from '../SectionTitle'; import styles from './styles.module.css'; @@ -28,9 +29,11 @@ function Native() { } /> - diff --git a/website/src/pages/Home/Native/styles.module.css b/website/src/components/Home/Native/styles.module.css similarity index 100% rename from website/src/pages/Home/Native/styles.module.css rename to website/src/components/Home/Native/styles.module.css diff --git a/website/src/pages/Home/Platforms/FoxFact.tsx b/website/src/components/Home/Platforms/FoxFact.tsx similarity index 100% rename from website/src/pages/Home/Platforms/FoxFact.tsx rename to website/src/components/Home/Platforms/FoxFact.tsx diff --git a/website/src/pages/Home/Platforms/index.tsx b/website/src/components/Home/Platforms/index.tsx similarity index 78% rename from website/src/pages/Home/Platforms/index.tsx rename to website/src/components/Home/Platforms/index.tsx index 031229b1968..b060e542499 100644 --- a/website/src/pages/Home/Platforms/index.tsx +++ b/website/src/components/Home/Platforms/index.tsx @@ -7,11 +7,13 @@ import React from 'react'; -import Section from '../components/Section'; -import SectionTitle from '../components/SectionTitle'; -import ThemeImage from '../components/ThemeImage'; +import useBaseUrl from '@docusaurus/useBaseUrl'; +import ThemedImage from '@theme/ThemedImage'; +import Section from '../Section'; +import SectionTitle from '../SectionTitle'; import FoxFact from './FoxFact'; + import styles from './styles.module.css'; function Platforms() { @@ -19,7 +21,15 @@ function Platforms() {
+ React Native brings the best parts of developing with React to + native development. +
+ It's a best-in-class JavaScript library for building user + interfaces. + + } />
@@ -54,9 +64,11 @@ function Platforms() {
- diff --git a/website/src/pages/Home/Platforms/styles.module.css b/website/src/components/Home/Platforms/styles.module.css similarity index 100% rename from website/src/pages/Home/Platforms/styles.module.css rename to website/src/components/Home/Platforms/styles.module.css diff --git a/website/src/pages/Home/components/Section/index.tsx b/website/src/components/Home/Section/index.tsx similarity index 100% rename from website/src/pages/Home/components/Section/index.tsx rename to website/src/components/Home/Section/index.tsx diff --git a/website/src/pages/Home/components/Section/styles.module.css b/website/src/components/Home/Section/styles.module.css similarity index 100% rename from website/src/pages/Home/components/Section/styles.module.css rename to website/src/components/Home/Section/styles.module.css diff --git a/website/src/pages/Home/components/SectionTitle/index.tsx b/website/src/components/Home/SectionTitle/index.tsx similarity index 100% rename from website/src/pages/Home/components/SectionTitle/index.tsx rename to website/src/components/Home/SectionTitle/index.tsx diff --git a/website/src/pages/Home/components/SectionTitle/styles.module.css b/website/src/components/Home/SectionTitle/styles.module.css similarity index 85% rename from website/src/pages/Home/components/SectionTitle/styles.module.css rename to website/src/components/Home/SectionTitle/styles.module.css index 872d3ccba75..5582e85b7a4 100644 --- a/website/src/pages/Home/components/SectionTitle/styles.module.css +++ b/website/src/components/Home/SectionTitle/styles.module.css @@ -24,3 +24,9 @@ font-weight: normal; max-width: 850px; } + +@media only screen and (max-width: 996px) { + .title { + font-size: 40px; + } +} diff --git a/website/src/pages/Home/Watch/index.tsx b/website/src/components/Home/Watch/index.tsx similarity index 87% rename from website/src/pages/Home/Watch/index.tsx rename to website/src/components/Home/Watch/index.tsx index fb27d80860a..900a823f5a6 100644 --- a/website/src/pages/Home/Watch/index.tsx +++ b/website/src/components/Home/Watch/index.tsx @@ -7,8 +7,8 @@ import React from 'react'; -import Section from '../components/Section'; -import SectionTitle from '../components/SectionTitle'; +import Section from '../Section'; +import SectionTitle from '../SectionTitle'; import styles from './styles.module.css'; @@ -20,7 +20,12 @@ function Watch() { description={ <> Watch talks by the React team and learn how to get the most out of - React Native. Find the latest on{' '} + React Native. +
+ Find the latest on{' '} + + Bluesky + and{' '} X diff --git a/website/src/pages/Home/Watch/styles.module.css b/website/src/components/Home/Watch/styles.module.css similarity index 100% rename from website/src/pages/Home/Watch/styles.module.css rename to website/src/components/Home/Watch/styles.module.css diff --git a/website/src/pages/Home/index.tsx b/website/src/components/Home/index.tsx similarity index 100% rename from website/src/pages/Home/index.tsx rename to website/src/components/Home/index.tsx diff --git a/website/src/pages/Home/components/ThemeImage/index.tsx b/website/src/pages/Home/components/ThemeImage/index.tsx deleted file mode 100644 index 1b50f92d5af..00000000000 --- a/website/src/pages/Home/components/ThemeImage/index.tsx +++ /dev/null @@ -1,43 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ - -import React, {useState, useEffect} from 'react'; - -function ThemeImage({lightSrc, darkSrc, className, alt}) { - const [theme, setTheme] = useState('light'); - - useEffect(() => { - const themeObserver = new MutationObserver(mutations => { - mutations.forEach(mutation => { - if ( - mutation.type === 'attributes' && - mutation.attributeName === 'data-theme' && - mutation.target instanceof Element - ) { - setTheme(mutation.target.getAttribute('data-theme')); - } - }); - }); - - const htmlElement = document.documentElement; - themeObserver.observe(htmlElement, { - attributes: true, - }); - - return () => themeObserver.disconnect(); - }, []); - - return ( - {alt} - ); -} - -export default ThemeImage; diff --git a/website/src/pages/index.tsx b/website/src/pages/index.tsx index 93c5718ce30..cd743b733d4 100644 --- a/website/src/pages/index.tsx +++ b/website/src/pages/index.tsx @@ -8,10 +8,9 @@ import React from 'react'; import Head from '@docusaurus/Head'; - import Layout from '@theme/Layout'; -import Home from './Home'; +import Home from '../components/Home'; const Index = () => { return (