Skip to content

Commit 2e31d2f

Browse files
committed
refactor: redesign home page
1 parent 279133b commit 2e31d2f

File tree

2 files changed

+56
-35
lines changed

2 files changed

+56
-35
lines changed

src/pages/index.module.css

Lines changed: 36 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,53 @@
1-
/**
2-
* CSS files with the .module.css suffix will be treated as CSS modules
3-
* and scoped locally.
4-
*/
5-
6-
.heroBanner {
7-
padding: 4rem 0;
8-
text-align: center;
1+
.hero {
92
position: relative;
3+
padding: 4rem 0;
4+
display: flex;
5+
justify-content: center;
6+
align-items: center;
7+
flex-direction: column;
8+
gap: 1rem;
9+
flex-grow: 1;
1010
overflow: hidden;
11-
11+
text-align: center;
1212
color: white;
1313
background-color: var(--w-brand-500);
14+
15+
@media screen and (max-width: 996px) {
16+
padding: 2rem;
17+
}
1418
}
1519

16-
@media screen and (max-width: 996px) {
17-
.heroBanner {
18-
padding: 2rem;
20+
.heroTitle {
21+
font-size: 4rem;
22+
line-height: 1;
23+
display: flex;
24+
flex-direction: column;
25+
gap: 1rem;
26+
27+
@media screen and (max-width: 996px) {
28+
font-size: 3rem;
1929
}
2030
}
2131

22-
.heroBannerTitle {
32+
.heroTitleLogo {
33+
@media screen and (max-width: 540px) {
34+
display: none;
35+
}
36+
}
37+
38+
.heroTitleBrand {
39+
font-size: 2.5rem;
2340
display: flex;
24-
justify-content: center;
2541
align-items: center;
42+
justify-content: center;
2643
gap: 1rem;
44+
45+
@media screen and (max-width: 996px) {
46+
font-size: 2rem;
47+
}
2748
}
2849

29-
.buttons {
50+
.heroButtons {
3051
display: flex;
3152
align-items: center;
3253
justify-content: center;

src/pages/index.tsx

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import type {ReactNode} from 'react';
2-
import clsx from 'clsx';
32
import Link from '@docusaurus/Link';
43
import useDocusaurusContext from '@docusaurus/useDocusaurusContext';
54
import Layout from '@theme/Layout';
@@ -10,27 +9,28 @@ import styles from './index.module.css';
109
function HomepageHeader() {
1110
const {siteConfig} = useDocusaurusContext();
1211
return (
13-
<header className={clsx('hero hero--primary', styles.heroBanner)}>
14-
<div className="container">
15-
<Heading as="h1" className={clsx('hero__title', styles.heroBannerTitle)}>
16-
<svg width={50} height={50} viewBox='0 0 50 50'>
12+
<header className={styles.hero}>
13+
<Heading as="h1" className={styles.heroTitle}>
14+
<span className={styles.heroTitleBrand}>
15+
<svg className={styles.heroTitleLogo} width={50} height={50} viewBox='0 0 50 50'>
1716
<image href='img/logo.svg' width={50} height={50} />
1817
</svg>
19-
{siteConfig.title}
20-
</Heading>
21-
<p className="hero__subtitle">{siteConfig.tagline}</p>
22-
<div className={styles.buttons}>
23-
<Link
24-
className="button button--secondary button--lg"
25-
to="/docs/sirosid">
26-
SIROS ID
27-
</Link>
28-
<Link
29-
className="button button--secondary button--lg"
30-
to="/docs/wwwallet">
31-
wwWallet
32-
</Link>
33-
</div>
18+
SIROS Foundation
19+
</span>
20+
<span>Developer Docs</span>
21+
</Heading>
22+
{siteConfig.tagline && <p className={styles.heroSubtitle}>{siteConfig.tagline}</p>}
23+
<div className={styles.heroButtons}>
24+
<Link
25+
className="button button--secondary button--lg"
26+
to="/docs/sirosid">
27+
SIROS ID
28+
</Link>
29+
<Link
30+
className="button button--secondary button--lg"
31+
to="/docs/wwwallet">
32+
wwWallet
33+
</Link>
3434
</div>
3535
</header>
3636
);

0 commit comments

Comments
 (0)