Skip to content

Commit 4b1d656

Browse files
committed
feat: ✨ improve landing layout
1 parent 42c7220 commit 4b1d656

File tree

2 files changed

+47
-23
lines changed

2 files changed

+47
-23
lines changed

apps/cookbook/src/pages/index.module.css

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,23 @@
33
* and scoped locally.
44
*/
55

6+
.wrapper {
7+
background-color: #eed9ff;
8+
}
9+
10+
.container {
11+
display: flex;
12+
flex-direction: row;
13+
align-items: center;
14+
justify-content: space-evenly;
15+
}
16+
17+
@media screen and (max-width: 996px) {
18+
.container {
19+
flex-direction: column;
20+
}
21+
}
22+
623
.heroBanner {
724
background: #eed9ff;
825
color: var(--marmicode-primary);
@@ -50,19 +67,19 @@
5067
display: flex;
5168
flex-direction: column;
5269
gap: 1rem;
53-
margin: 2rem auto;
70+
margin: 2rem 0;
5471
width: 250px;
5572
}
5673

57-
.link {
74+
.button {
5875
display: flex;
5976
align-items: center;
6077
height: 50px;
6178
padding: 5px 30px;
6279
gap: 1rem;
6380
}
6481

65-
.link p {
82+
.button p {
6683
color: var(--marmicode-primary);
6784
margin: 0;
6885
}

apps/cookbook/src/pages/index.tsx

Lines changed: 27 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ export default function Home(): JSX.Element {
1212
const { siteConfig } = useDocusaurusContext();
1313
return (
1414
<Layout
15+
wrapperClassName={styles.wrapper}
1516
title={siteConfig.tagline}
1617
description={
1718
'Ingredients & Recipes for Cooking Delicious Apps with Angular & Nx'
@@ -23,32 +24,38 @@ export default function Home(): JSX.Element {
2324
}
2425

2526
function HomepageHeader() {
26-
const { siteConfig } = useDocusaurusContext();
2727
return (
2828
<header className={styles.heroBanner}>
29-
<div className="container">
30-
<img
31-
alt="Marmicode Pot"
32-
className={styles.heroLogo}
33-
src={useBaseUrl('/img/hero.png')}
34-
height="300"
35-
/>
36-
<p className={clsx(styles.heroSubtitle)}>MARMICODE</p>
37-
<p className={clsx(styles.heroSubtitle, styles.heroSubtitleSecondary)}>
38-
COOKBOOK
39-
</p>
40-
<p className={styles.heroTagline}>{siteConfig.tagline}</p>
41-
<div className={styles.buttons}>
42-
<Links />
43-
</div>
29+
<div className={clsx('container', styles.container)}>
30+
<Hero />
31+
<Buttons />
4432
</div>
4533
</header>
4634
);
4735
}
4836

49-
function Links() {
37+
function Hero() {
38+
const { siteConfig } = useDocusaurusContext();
39+
return (
40+
<section>
41+
<img
42+
alt="Marmicode Pot"
43+
className={styles.heroLogo}
44+
src={useBaseUrl('/img/hero.png')}
45+
height="300"
46+
/>
47+
<p className={clsx(styles.heroSubtitle)}>MARMICODE</p>
48+
<p className={clsx(styles.heroSubtitle, styles.heroSubtitleSecondary)}>
49+
COOKBOOK
50+
</p>
51+
<p className={styles.heroTagline}>{siteConfig.tagline}</p>
52+
</section>
53+
);
54+
}
55+
56+
function Buttons() {
5057
return (
51-
<>
58+
<div className={styles.buttons}>
5259
{[
5360
{
5461
href: '/angular/why-vitest',
@@ -70,13 +77,13 @@ function Links() {
7077
},
7178
].map(({ href, content }) => (
7279
<Link
73-
className={clsx('button button--secondary button--lg', styles.link)}
80+
className={clsx('button button--secondary button--lg', styles.button)}
7481
key={href}
7582
to={href}
7683
>
7784
{content}
7885
</Link>
7986
))}
80-
</>
87+
</div>
8188
);
8289
}

0 commit comments

Comments
 (0)