Skip to content

Commit 337a021

Browse files
Merge pull request #61 from MarianaSouza/feature/add-meta-component
Feature/add meta component
2 parents 7640055 + 7e0ef91 commit 337a021

File tree

5 files changed

+72
-54
lines changed

5 files changed

+72
-54
lines changed

components/Layout.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,16 @@
11
import Nav from "./Nav";
2+
import Meta from "./Meta";
23
import styles from "../styles/Layout.module.scss";
34
import Footer from "./Footer";
45

56
export default function Layout({ children }) {
67
return (
78
<>
9+
<Meta />
810
<Nav />
9-
<div className={styles.container}>
10-
<main className={styles.main}>{children}</main>
11-
</div>
11+
<div className={styles.container}>
12+
<main className={styles.main}>{children}</main>
13+
</div>
1214
<Footer />
1315
</>
1416
);

components/Meta.js

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
import Head from "next/head";
2+
import { meta } from "../utils/meta";
3+
4+
export default function Meta() {
5+
return (
6+
<Head>
7+
<meta name="viewport" content="width=device-width, initial-scale=1" />
8+
<meta name="keywords" content={meta.keywords} />
9+
<meta name="description" content={meta.description} />
10+
<meta charSet="utf-8" />
11+
<title>{meta.title}</title>
12+
<link rel="icon" href="/favicon.ico" />
13+
</Head>
14+
);
15+
}

package-lock.json

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pages/index.js

Lines changed: 43 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -1,56 +1,51 @@
1-
import Head from "next/head";
21
import Link from "next/link";
32
import styles from "../styles/Home.module.scss";
43

54
export default function Home() {
6-
return (
7-
<div>
8-
<Head>
9-
<title>Web Dev Path</title>
10-
<link rel="icon" href="/favicon.ico" />
11-
</Head>
12-
<h1 className={styles.title}>&lt; Web Dev wannabe? /&gt;</h1>
13-
<div className={styles.description}>
14-
<p>
15-
Hold our hand and enjoy the road to learn how to start a new project,
16-
the magic behind Github while working in a team environment, and much
17-
more...
18-
</p>
19-
</div>
20-
<hr className={styles.divider} />
5+
return (
6+
<div>
7+
<h1 className={styles.title}>&lt; Web Dev wannabe? /&gt;</h1>
8+
<div className={styles.description}>
9+
<p>
10+
Hold our hand and enjoy the road to learn how to start a new project,
11+
the magic behind Github while working in a team environment, and much
12+
more...
13+
</p>
14+
</div>
15+
<hr className={styles.divider} />
2116

22-
<h2 className={styles.centerText}>
23-
Would you answer "yes" to any of these questions?
24-
</h2>
17+
<h2 className={styles.centerText}>
18+
Would you answer "yes" to any of these questions?
19+
</h2>
2520

26-
<div className={styles.grid}>
27-
<div className={styles.card}>
28-
<p>Are you learning web development and need mentorship?</p>
29-
</div>
30-
<div className={styles.card}>
31-
<p>Are you an experienced web dev who wants to become a mentor?</p>
32-
</div>
33-
<div className={styles.card}>
34-
<p>
35-
Are you a non-profit organization who needs help with a web project?
36-
</p>
37-
</div>
38-
<div className={styles.card}>
39-
<p>
40-
Are you a web dev looking for help or a code buddy for a project?
41-
</p>
42-
</div>
43-
</div>
21+
<div className={styles.grid}>
22+
<div className={styles.card}>
23+
<p>Are you learning web development and need mentorship?</p>
24+
</div>
25+
<div className={styles.card}>
26+
<p>Are you an experienced web dev who wants to become a mentor?</p>
27+
</div>
28+
<div className={styles.card}>
29+
<p>
30+
Are you a non-profit organization who needs help with a web project?
31+
</p>
32+
</div>
33+
<div className={styles.card}>
34+
<p>
35+
Are you a web dev looking for help or a code buddy for a project?
36+
</p>
37+
</div>
38+
</div>
4439

45-
<div className={`${styles.learn_more} ${styles.centerText}`}>
46-
<h3>
47-
If so, you are probably in the right place and should learn more about
48-
us
49-
</h3>
50-
<button className={styles.button}>
51-
<Link href="/about-us">Learn More</Link>
52-
</button>
53-
</div>
54-
</div>
55-
);
40+
<div className={`${styles.learn_more} ${styles.centerText}`}>
41+
<h3>
42+
If so, you are probably in the right place and should learn more about
43+
us
44+
</h3>
45+
<button className={styles.button}>
46+
<Link href="/about-us">Learn More</Link>
47+
</button>
48+
</div>
49+
</div>
50+
);
5651
}

utils/meta.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
export const meta = {
2+
title: "Web Dev Path",
3+
keywords: "web development, mentoring, volunteering, Next.js",
4+
description:
5+
"The Web Dev Path is a team of professional developers project that aims to provide a comprehensive path for people who seek to begin their web development journey.",
6+
};

0 commit comments

Comments
 (0)