Skip to content

Commit c0182c0

Browse files
committed
Added header
1 parent 4ab4242 commit c0182c0

File tree

2 files changed

+74
-0
lines changed

2 files changed

+74
-0
lines changed

news-app/src/Components/Header.css

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;700&display=swap');
2+
3+
* {
4+
margin: 0;
5+
padding: 0;
6+
}
7+
8+
.header {
9+
background-color: rgb(252, 252, 252);
10+
border-bottom: 1px solid rgb(214, 214, 214);
11+
}
12+
13+
.header-container {
14+
max-width: 1250px;
15+
margin: 0 auto;
16+
display: flex;
17+
justify-content: space-between;
18+
align-items: center;
19+
height: 80px;
20+
}
21+
22+
.logo h1 {
23+
font-family: 'Roboto', sans-serif;
24+
font-size: 27px;
25+
letter-spacing: 0.7px;
26+
color: #111;
27+
}
28+
.icon-container {
29+
width: 150px;
30+
text-align: center;
31+
}
32+
33+
.icon-container i {
34+
font-size: 40px;
35+
transition: all 0.2s;
36+
color: #111;
37+
}
38+
39+
.icon-container i:hover {
40+
color: gray;
41+
}
42+
43+
@media (max-width: 1290px) {
44+
.header {
45+
padding: 0 40px;
46+
}
47+
}
48+
49+
50+
@media (max-width: 410px) {
51+
.icon-container {
52+
width: 50px;
53+
}
54+
}

news-app/src/Components/Header.js

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
import "./Header.css";
2+
3+
function Header() {
4+
return(
5+
<header className="header">
6+
<div className="header-container">
7+
<div className="logo">
8+
<h1>NewsHub.</h1>
9+
</div>
10+
<div className="icon-container">
11+
<a href="https://github.com/RiyaGupta89">
12+
<i class="fab fa-2x fa-github"></i>
13+
</a>
14+
</div>
15+
</div>
16+
</header>
17+
);
18+
}
19+
20+
export default Header;

0 commit comments

Comments
 (0)