Skip to content

Commit 6ba03f9

Browse files
committed
Hero section added
1 parent 8b5b53f commit 6ba03f9

File tree

10 files changed

+61
-89
lines changed

10 files changed

+61
-89
lines changed

src/Components/landingpage/Navbar.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ const Navbar = () => {
2727
<li><Link to="/gallary" className='link-default' >Gallery</Link></li>
2828
<li><Link to="/about" className='link-default'>About Us</Link> </li>
2929
<li><Link to="/events" className='link-default'> Upcoming Events</Link></li>
30-
<li><Link to="/contact" className='link-default' >Contact us</Link></li>
30+
<li><Link to="/contact" className='link-default' >Contact Us</Link></li>
3131
</ul>
3232
</nav>
3333
</Container>
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
function Button({buttontext,buttonclass}){
2+
return(
3+
<>
4+
<button className={buttonclass}>{buttontext}</button>
5+
</>
6+
)
7+
}
8+
9+
export default Button;
Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
1-
import React from 'react'
2-
import './Hero.css'
3-
const Hero = () => {
4-
return (
5-
6-
<div className="hero" id='hero'>
1+
function Hero(){
2+
return(
3+
<>
4+
<div className="hero">
75
<div className='container'>
86
<div className="hero-text">
97
<h1>Leaders are those who empower others.</h1>
@@ -13,7 +11,8 @@ const Hero = () => {
1311
</button>
1412
</div></div>
1513
</div>
14+
</>
1615
)
1716
}
1817

19-
export default Hero
18+
export default Hero;

src/Pages/Landingpage.jsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
import Navbar from "../Components/landingpage/Navbar";
2+
import Hero from "../Components/landingpage/hero";
23

34
function LandingPage(){
45
return(
56
<>
67
<Navbar/>
8+
<Hero/>
79
</>
810
)
911
}

src/Styles/App.css

Lines changed: 39 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -31,43 +31,49 @@
3131
text-decoration: inherit;
3232
}
3333

34-
.menu-icon {
35-
display: none;
34+
.hero {
35+
margin-top: auto;
36+
width: 100%;
37+
min-height: 100vh;
38+
background: linear-gradient(rgba(8, 0, 58, 0.7019607843), rgba(8, 0, 58, 0.7019607843)), url(/herobg.png);
39+
/* background: url(/herobg.png); */
40+
background-size: cover;
41+
background-position: center;
42+
color: #fff;
43+
display: flex;
44+
align-items: center;
45+
justify-content: center;
3646
}
3747

38-
@media (max-width: 1000px) {
39-
.logo {
40-
width: 140px;
41-
}
42-
nav ul li {
43-
margin: 10px 15px;
44-
}
48+
.hero-text {
49+
text-align: center;
50+
max-width: 800px;
4551
}
46-
@media (max-width: 840px) {
47-
nav {
48-
padding: 15px 0;
49-
}
50-
nav ul {
51-
position: fixed;
52-
top: 0;
53-
right: 0;
54-
bottom: 0;
55-
background: #212ea0;
56-
z-index: -1;
57-
width: 200px;
58-
padding-top: 70px;
59-
transition: 0.5s;
60-
}
61-
nav ul li {
62-
display: block;
63-
margin: 25px 40px;
52+
53+
.hero-text h1 {
54+
font-size: 60px;
55+
font-weight: 600;
56+
}
57+
58+
.hero-text p {
59+
max-width: 700px;
60+
margin: 10px auto 20px;
61+
line-height: 1.4;
62+
}
63+
64+
@media (max-width: 850px) {
65+
.hero-text h1 {
66+
font-size: 40px;
6467
}
65-
.menu-icon {
66-
display: block;
67-
width: 30px;
68-
cursor: pointer;
68+
}
69+
@media (max-width: 650px) {
70+
.hero-text h1 {
71+
font-size: 30px;
72+
max-width: 400px;
73+
margin: auto;
6974
}
70-
.hide-mobile-menu {
71-
right: -200px;
75+
.hero-text p {
76+
font-size: 14px;
77+
margin: 15px auto 30px;
7278
}
7379
}/*# sourceMappingURL=App.css.map */

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/LandingPage/_Button.scss

Whitespace-only changes.
File renamed without changes.

src/Styles/LandingPage/_Index.scss

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
1-
@import 'Navbar'
1+
@import 'Navbar';
2+
@import 'Hero';
3+
@import 'Button'

src/Styles/LandingPage/_Navbar.scss

Lines changed: 0 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -34,50 +34,4 @@
3434
text-decoration: inherit;
3535
}
3636

37-
.menu-icon {
38-
display: none;
39-
}
40-
41-
@media (max-width: 1000px) {
42-
.logo {
43-
width:140px
44-
}
45-
46-
nav ul li {
47-
margin: 10px 15px
48-
}
49-
}
50-
51-
@media (max-width: 840px) {
52-
nav {
53-
padding:15px 0
54-
}
55-
56-
nav ul {
57-
position: fixed;
58-
top: 0;
59-
right: 0;
60-
bottom: 0;
61-
background: #212ea0;
62-
z-index: -1;
63-
width: 200px;
64-
padding-top: 70px;
65-
transition: .5s
66-
}
67-
68-
nav ul li {
69-
display: block;
70-
margin: 25px 40px
71-
}
72-
73-
.menu-icon {
74-
display: block;
75-
width: 30px;
76-
cursor: pointer
77-
}
78-
79-
.hide-mobile-menu {
80-
right: -200px
81-
}
82-
}
8337

0 commit comments

Comments
 (0)