Skip to content

Commit 8b5b53f

Browse files
committed
Nav bar of css added
1 parent 99c57f8 commit 8b5b53f

File tree

5 files changed

+30
-66
lines changed

5 files changed

+30
-66
lines changed

src/Components/landingpage/Navbar.jsx

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import React, { useState, useEffect } from 'react';
22
import fullogo from '../../assets/LandingPage/logo.png';
33
import { Link } from 'react-router-dom';
4+
import Container from 'react-bootstrap/Container';
45
const Navbar = () => {
56
const [sticky, setSticky] = useState(false);
67

@@ -18,16 +19,18 @@ const Navbar = () => {
1819
}, []);
1920

2021
return (
22+
<Container>
2123
<nav className={`Navbar ${sticky ? 'Navbar-dark' : ''}`}>
2224
<img src={fullogo} alt="NepTech Tribe Logo" className="Navbar-logo" />
2325
<ul className="Navbar-menu">
24-
<li><Link to="/" >Home</Link></li>
25-
<li><Link to="/" >Gallery</Link></li>
26-
<li><Link to="/">About Us</Link> </li>
27-
<li><Link to="/">Upcoming Events</Link></li>
28-
<li><Link to="/" >Contact us</Link></li>
26+
<li><Link to="/" className='link-default' >Home</Link></li>
27+
<li><Link to="/gallary" className='link-default' >Gallery</Link></li>
28+
<li><Link to="/about" className='link-default'>About Us</Link> </li>
29+
<li><Link to="/events" className='link-default'> Upcoming Events</Link></li>
30+
<li><Link to="/contact" className='link-default' >Contact us</Link></li>
2931
</ul>
3032
</nav>
33+
</Container>
3134
);
3235
};
3336

src/Styles/App.css

Lines changed: 7 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,14 @@
11
@import 'bootstrap/dist/css/bootstrap.min.css';
2+
@import url("https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap");
23
.Navbar {
34
width: 100%;
5+
padding: 1.25rem 0rem;
46
background: #fff;
5-
padding: 4px 0;
6-
position: fixed;
7-
top: 0;
8-
left: 0;
97
display: flex;
108
align-items: center;
119
justify-content: space-between;
1210
z-index: 100;
11+
font-family: "Poppins", sans-serif;
1312
}
1413
.Navbar-dark {
1514
background: #212ea0;
@@ -26,31 +25,10 @@
2625
font-size: 1rem;
2726
}
2827

29-
nav {
30-
width: 100%;
31-
/* color: #fff; */
32-
/* background-color: #212EA0; */
33-
/* background-color: #212EA0; */
34-
background: #fff;
35-
padding: 4px 0;
36-
position: fixed;
37-
top: 0;
38-
left: 0;
39-
display: flex;
40-
align-items: center;
41-
justify-content: space-between;
42-
z-index: 10;
43-
}
44-
45-
.logo {
46-
width: 180px;
47-
}
48-
49-
nav ul li {
50-
display: inline-block;
51-
list-style: none;
52-
margin: 5px 20px;
53-
font-size: 16px;
28+
.link-default {
29+
color: inherit;
30+
font-size: inherit;
31+
text-decoration: inherit;
5432
}
5533

5634
.menu-icon {

src/Styles/App.css.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/Styles/App.scss

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
11
@import 'bootstrap/dist/css/bootstrap.min.css';
2+
@import url('https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap');
3+
4+
5+
$font : "Poppins", sans-serif;
6+
27

38
@import 'LandingPage/Index';
49
@import 'AboutPage/Index';

src/Styles/LandingPage/_Navbar.scss

Lines changed: 9 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,19 @@
11
.Navbar{
22
width: 100%;
3+
padding: 1.25rem 0rem;
34
background: #fff;
4-
padding: 4px 0;
5-
position: fixed;
6-
top: 0;
7-
left: 0;
85
display: flex;
96
align-items: center;
107
justify-content: space-between;
118
z-index: 100;
9+
font-family: $font;
1210
&-dark{
1311
background: #212ea0;
1412
transition: .5s;
1513
color: #fff;
14+
// top: 0;
15+
// left: 0;
16+
// position: fixed;
1617
}
1718
&-logo{
1819
width: 11rem;
@@ -23,39 +24,16 @@
2324
list-style: none;
2425
margin: 5px 20px;
2526
font-size: 1rem;
26-
// list-style: none;
2727
}
2828
}
2929
}
3030

31-
32-
nav {
33-
width: 100%;
34-
/* color: #fff; */
35-
/* background-color: #212EA0; */
36-
/* background-color: #212EA0; */
37-
background: #fff;
38-
padding: 4px 0;
39-
position: fixed;
40-
top: 0;
41-
left: 0;
42-
display: flex;
43-
align-items: center;
44-
justify-content: space-between;
45-
z-index: 10
46-
}
47-
.logo {
48-
width: 180px;
31+
.link-default{
32+
color: inherit;
33+
font-size: inherit;
34+
text-decoration: inherit;
4935
}
5036

51-
nav ul li {
52-
display: inline-block;
53-
list-style: none;
54-
margin: 5px 20px;
55-
font-size: 16px
56-
}
57-
58-
5937
.menu-icon {
6038
display: none;
6139
}

0 commit comments

Comments
 (0)