Skip to content

Commit

Permalink
Home page done with animation
Browse files Browse the repository at this point in the history
  • Loading branch information
harshita1611 committed Jun 12, 2024
1 parent de3d401 commit 4d6a3ba
Show file tree
Hide file tree
Showing 3 changed files with 49 additions and 4 deletions.
25 changes: 22 additions & 3 deletions Front-with-React/VigyBag/src/pages/Home/Home.jsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import React from 'react';
import Navbar from '../../components/Navbar/Navbar';
import background from '../../assets/images/background.png';
import './typewriter.css';

function Home() {
return (
Expand All @@ -11,9 +12,27 @@ function Home() {
height: '100vh',
position: 'relative',
}}>
<h1>Welcome to Vigy Bag</h1>
<h1>Your Eco-Friendly</h1>
<h1>Shopping Heaven</h1>
<div className="container mx-auto my-auto sm:py-24 leading-snug ">
<div className="text-left">
<div className="typewriter">
<h1 className="text-4xl sm:text-6xl font-bold tracking-widest">
Welcome to <span className="text-green-900">VigyBag!</span>
</h1>
</div>
<h2 className="text-3xl sm:text-6xl tracking-widest font-bold mt-5 mb-4">Your Eco-Friendly</h2>
<h2 className="text-3xl sm:text-6xl font-bold mb-8 tracking-widest">Shopping Heaven</h2>
<p className=" text-lg sm:text-3xl mb-8 leadinh-snug tracking-widest">
At VigyBag, we curate the finest earth-friendly <br></br>
essentials to help you reduce your environmental <br></br>
footprint without compromising on quality or style.<br></br>
Shop smart, live green, and embrace a sustainable <br></br>
future with VigyBag.
</p>
<button className="bg-green-900 tracking-widest text-white px-6 py-3 mt-10 rounded-md hover:bg-green-800 transition-colors duration-300">
Shop Now
</button>
</div>
</div>
</div>
);
}
Expand Down
21 changes: 21 additions & 0 deletions Front-with-React/VigyBag/src/pages/Home/typewriter.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
/* Typewriter.css */
@keyframes typewriter {
from {width: 0;}
to {width: 100%;}
}

@keyframes blink {
from, to {border-color: transparent;}
50% {border-color: transparent;}
}

.typewriter h1 {
overflow: hidden;
border-right: .15em solid black;
white-space: nowrap;
margin: 0 auto;
letter-spacing: .15em;
animation:
typewriter 3.5s steps(40, end),
blink .75s step-end infinite;
}
7 changes: 6 additions & 1 deletion Front-with-React/VigyBag/tailwind.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,12 @@ export default {
"./src/**/*.{js,ts,jsx,tsx}",
],
theme: {
extend: {},
extend: {
fontFamily:{
'league': ['League Spartan'],
'pop': ['Poppins'],
}
},
},
plugins: [],
}
Expand Down

0 comments on commit 4d6a3ba

Please sign in to comment.