Skip to content

Commit 00079a6

Browse files
committed
add jumobotrom on homepage
1 parent 660c4c3 commit 00079a6

File tree

3 files changed

+69
-7
lines changed

3 files changed

+69
-7
lines changed

src/components/Header.module.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
.header {
44
position: fixed;
55
width: 100vw;
6-
height: 68px;
6+
height: 69px;
77
background: $theme-accent;
88
top: 0;
99
left: 0;

src/pages/Home.tsx

Lines changed: 31 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,42 @@
11
import React from "react";
22
import Counter from "../features/counter/Counter";
33
import TodoList from "../features/todos/TodoList";
4+
import styles from "./styles/home.module.scss";
45

56
// Define a home page component that renders some content and features
67
const Home: React.FC = () => {
78
// Return the JSX element for the home page component
89
return (
9-
<div>
10-
<h1>Welcome to React Boilerplate</h1>
11-
<p>
12-
This is a simple app to demonstrate how to use CRA, react router and
13-
redux toolkit.
14-
</p>
10+
<div className={styles.container}>
11+
<div className={styles.jumbotron}>
12+
<h1>Welcome to React Boilerplate</h1>
13+
<p>
14+
This is a simple{" "}
15+
<a href="https://create-react-app.dev/" target="_blank">
16+
Create React App
17+
</a>{" "}
18+
boilerplate. It comes with a pre-defined structure that includes{" "}
19+
<a href="https://redux.js.org/" target="_blank">
20+
redux
21+
</a>
22+
,{" "}
23+
<a
24+
href="https://redux.js.org/introduction/installation#redux-toolkit"
25+
target="_blank"
26+
>
27+
redux-toolkit
28+
</a>
29+
,{" "}
30+
<a href="https://reactrouter.com/en/main" target="_blank">
31+
react-router-dom
32+
</a>
33+
, and support for{" "}
34+
<a href="https://sass-lang.com/" target="_blank">
35+
Sass
36+
</a>{" "}
37+
(scss modules).
38+
</p>
39+
</div>
1540
<Counter />
1641
<TodoList />
1742
</div>

src/pages/styles/home.module.scss

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
@import "/src/theme/colors.scss";
2+
3+
.container {
4+
margin-top: 69px;
5+
width: 100vw;
6+
display: flex;
7+
flex-direction: column;
8+
justify-content: center;
9+
align-items: center;
10+
11+
.jumbotron {
12+
background: $accent-accent-dark;
13+
width: 100%;
14+
text-align: center;
15+
height: 30vh;
16+
display: flex;
17+
flex-direction: column;
18+
justify-content: center;
19+
20+
h1,
21+
p {
22+
color: $white;
23+
24+
a {
25+
color: $theme-accent;
26+
}
27+
}
28+
29+
h1 {
30+
text-transform: uppercase;
31+
}
32+
33+
p {
34+
padding: 0 69px;
35+
}
36+
}
37+
}

0 commit comments

Comments
 (0)