Skip to content

Commit 5db84c6

Browse files
authored
Merge pull request #81 from CodeHarborHub/dev-2
Update code for header for responsive
2 parents 20e5476 + 57b7478 commit 5db84c6

File tree

4 files changed

+26
-20
lines changed

4 files changed

+26
-20
lines changed

community/team.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,6 @@ If you are interested in joining the team, or would like to contribute to the Op
2121

2222
## Contributors {#contributors}
2323

24-
[![contributors](https://opencollective.com/codeharborhub/contributors.svg?button=false)](https://opencollective.com/codeharborhub/contributors.svg?button=false)
24+
<a href="https://github.com/codeharborhub/codeharborhub/graphs/contributors">
25+
<img src="https://contrib.rocks/image?repo=codeharborhub/codeharborhub" />
26+
</a>

src/components/HomePage/header.css

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
align-items: center;
55
transform-style: preserve-3d;
66
overflow: hidden;
7-
padding: 3rem 1.5rem;
7+
padding: 3rem auto;
88
}
99

1010
.chh__header {
@@ -14,12 +14,13 @@
1414
}
1515

1616
.chh__header-content {
17+
width: 100%;
1718
flex: 1;
1819
display: flex;
1920
justify-content: center;
2021
align-items: flex-start;
2122
flex-direction: column;
22-
margin-right: 5rem;
23+
margin-right: 2rem;
2324
}
2425

2526
.chh__header-content h1 {
@@ -87,28 +88,27 @@
8788
}
8889

8990
.chh__header-image {
90-
width: 400px;
91-
height: 400px;
91+
width: auto;
92+
height: auto;
9293
flex: 1 0 0%;
9394
display: flex;
9495
justify-content: center;
9596
align-items: center;
96-
padding: 0.5rem;
97-
background: linear-gradient(
98-
90deg,
99-
#ff49208d 0%,
100-
#ffc80097 25%,
101-
#20e3a28d 50%,
102-
#ff49208b 75%,
103-
#ffc8008a 100%
104-
);
105-
background-image: url("/bg-img.gif");
97+
padding: 0.3rem;
98+
background-image: url("/bg.gif");
10699
border-radius: 10% 40%;
107100
border: 1px solid #20e3a2;
108101
}
109102

110103
.chh__header-image:hover {
111-
background-image: url("/bg.gif");
104+
background: linear-gradient(
105+
90deg,
106+
#ff4920f6 0%,
107+
#ffc800f3 25%,
108+
#20e3a2 50%,
109+
#ff4920 75%,
110+
#ffc800 100%
111+
);
112112
}
113113

114114
.chh__header-image img {
@@ -277,4 +277,4 @@
277277
font-size: 12px;
278278
line-height: 16px;
279279
}
280-
}
280+
}

src/pages/index.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,11 @@ export default function Home() {
1919
title={`Hello from ${siteConfig.title}`}
2020
description="Welcome to CodeHarborHub. Learn the basics to advanced concepts of web development. html, css, javascript, react, node.js, dsa, and more."
2121
>
22-
<main>
22+
<main>
23+
<div className={styles.home__header}>
24+
<Header />
25+
</div>
2326

24-
<Header />
25-
2627
<hr className={styles.home__hr} />
2728

2829
<div className={styles.home__divider}>

src/pages/index.module.css

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
.home__header {
2+
margin: 1rem;
3+
}
14
.home__divider h2 {
25
text-align: center;
36
}

0 commit comments

Comments
 (0)