Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added typewriter effect #38

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 28 additions & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@
"react-responsive-carousel": "^3.2.23",
"react-router-dom": "^6.14.2",
"react-slick": "^0.29.0",
"slick-carousel": "^1.8.1"
"slick-carousel": "^1.8.1",
"typewriter-effect": "^2.20.1"
},
"devDependencies": {
"@types/react": "^18.2.14",
Expand Down
12 changes: 11 additions & 1 deletion src/components/hero/Hero.jsx
Original file line number Diff line number Diff line change
@@ -1,14 +1,24 @@
import React from 'react';
import "./hero.css"
import image from "../../assets/images/22635333_6583017.svg";
import Typewriter from 'typewriter-effect'

export default function Hero() {
return (
<>
<div className="hero-section">
<div className="left">
<h1>Welcome To Our <span>Hackathon</span></h1>
<p>a weekend of innovation and creativity awaits! Join us for electrifying challenges, collaborative brilliance, and the chance to shape the future. Unleash y our potential and be part of a vibrant community driving positive change. Let's hack together!</p>
<h2>
<Typewriter
options={{
strings: ['A weekend of innovation', 'A weekend of creativity', 'A weekend of challenges'],
autoStart: true,
loop: true,
}}
/>
</h2>
<p>A weekend of innovation and creativity awaits! Join us for electrifying challenges, collaborative brilliance, and the chance to shape the future. Unleash y our potential and be part of a vibrant community driving positive change. Let's hack together!</p>
<div className="action-buttons">
<button className="apply-button">Apply Now</button>
</div>
Expand Down
7 changes: 6 additions & 1 deletion src/components/hero/hero.css
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,11 @@
color: #6b5b95;
}

.left h2 {
font-size: 2.5vw;
margin-top: 20px;
}

.left p {
font-size: 20px;
margin-top: 2vw;
Expand Down Expand Up @@ -117,7 +122,7 @@
margin-bottom: 5vw;
}
.left p {
font-size: 3.5vw;
font-size: 5vw;
margin-bottom: 8vw;
}
.apply-button {
Expand Down