Skip to content

Commit

Permalink
chore: improve responsive
Browse files Browse the repository at this point in the history
  • Loading branch information
Jeremie-Chauvel authored and EwenQuim committed Feb 14, 2024
1 parent e4a7a59 commit eb5163b
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 16 deletions.
27 changes: 24 additions & 3 deletions documentation/src/pages/index.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@
*/

.heroBanner {
padding: 4rem 0;
padding: 1rem;
text-align: center;
position: relative;
overflow: hidden;
}

@media screen and (max-width: 996px) {
@media screen and (min-width: 996px) {
.heroBanner {
padding: 2rem;
padding: 4rem 2rem;
}
}

Expand All @@ -21,3 +21,24 @@
align-items: center;
justify-content: center;
}

.main {
padding: 0 1rem 1rem;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
}

@media screen and (min-width: 996px) {
.main {
padding: 0 3rem 3rem;
}

}

.video {
margin-top: 5rem;
width: 100%;
max-width: 50rem;
}
26 changes: 13 additions & 13 deletions documentation/src/pages/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import clsx from "clsx";
import Link from "@docusaurus/Link";
import useDocusaurusContext from "@docusaurus/useDocusaurusContext";
import Layout from "@theme/Layout";
import HomepageFeatures from "@site/src/components/HomepageFeatures";
import Heading from "@theme/Heading";

import styles from "./index.module.css";
Expand All @@ -18,13 +17,24 @@ function HomepageHeader() {
{siteConfig.title}
</Heading>
<p className="hero__subtitle">{siteConfig.tagline}</p>
</div>
</header>
);
}

export default function Home(): JSX.Element {
const { siteConfig } = useDocusaurusContext();
return (
<Layout title={siteConfig.title} description={siteConfig.tagline}>
<HomepageHeader />
<main className={styles.main}>
<div className={styles.buttons}>
<Link className="button button--secondary button--lg" to="/docs/">
Tutorial - 5 min ⏱️
</Link>
</div>
<iframe
style={{ marginTop: "80px", width: "100%", maxWidth: "900px" }}
className={styles.video}
width="640"
height="360"
src="https://www.youtube.com/embed/OxokKDcYUK0"
Expand All @@ -33,17 +43,7 @@ function HomepageHeader() {
allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share"
allowFullScreen
></iframe>
</div>
</header>
);
}

export default function Home(): JSX.Element {
const { siteConfig } = useDocusaurusContext();
return (
<Layout title={siteConfig.title} description={siteConfig.tagline}>
<HomepageHeader />
<main>{/* <HomepageFeatures /> */}</main>
</main>
</Layout>
);
}

0 comments on commit eb5163b

Please sign in to comment.