-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
completed the website--except the funtioning of navbar
- Loading branch information
1 parent
00eaf5f
commit f2ce48b
Showing
9 changed files
with
407 additions
and
84 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,106 @@ | ||
import React from "react"; | ||
import { motion } from "framer-motion"; | ||
import { useState } from "react"; | ||
import { fadeIn } from "../Variants"; | ||
|
||
function ContactUs() { | ||
const [selectedOption, setSelectedOption] = useState(null); | ||
const [formData, setFormData] = useState({ | ||
name: "", | ||
email: "", | ||
option: "", | ||
budget: "", | ||
message: "", | ||
}); | ||
|
||
const handleOptionClick = (option, field) => { | ||
setFormData({ | ||
...formData, | ||
[field]: option, | ||
}); | ||
setSelectedOption(option); | ||
}; | ||
|
||
const handleChange = (e) => { | ||
setFormData({ | ||
...formData, | ||
[e.target.name]: e.target.value, | ||
}); | ||
}; | ||
|
||
const handleSubmit = (e) => { | ||
e.preventDefault(); | ||
const { name, option, budget, message } = formData; | ||
|
||
const subject = `Hello there, I am ${name}`; | ||
const body = `${message}`; | ||
const mailtoLink = `mailto:[email protected]?subject=${encodeURIComponent( | ||
subject | ||
)}&body=${encodeURIComponent(body)}&[email protected]`; | ||
|
||
window.location.href = mailtoLink; | ||
}; | ||
|
||
return ( | ||
<motion.div> | ||
<div className="md:my-20 my-16"> | ||
<motion.form | ||
variants={fadeIn("down", 0.3)} | ||
initial="hidden" | ||
whileInView={"show"} | ||
viewport={{ once: true, amount: 0.7 }} | ||
className="max-w-md md:max-w-xl mx-auto p-5 rounded-3xl border-2 border-gray-500 text-white" | ||
onSubmit={handleSubmit} | ||
> | ||
<div className="mb-5 md:mb-10"> | ||
<label className="block mb-2 text-lg">Your name </label> | ||
<input | ||
type="text" | ||
name="name" | ||
value={formData.name} | ||
onChange={handleChange} | ||
className="w-full py-2 px-4 bg-transparent border-b " | ||
placeholder="Enter your name" | ||
required | ||
/> | ||
</div> | ||
<div className="mb-5 md:mb-10"> | ||
<label className="block mb-2 text-lg">Your email </label> | ||
<input | ||
type="email" | ||
name="email" | ||
value={formData.email} | ||
onChange={handleChange} | ||
className="w-full py-2 px-4 border-b bg-transparent " | ||
placeholder="Enter your email" | ||
required | ||
/> | ||
</div> | ||
|
||
<div className="mb-5 md:mb-10"> | ||
<label htmlFor="message" className="block mb-2 text-lg"> | ||
Your message: | ||
</label> | ||
<textarea | ||
id="message" | ||
name="message" | ||
value={formData.brief} | ||
onChange={handleChange} | ||
className="w-full py-2 px-4 min-h-20 bg-transparent border rounded-b-lg border-t-0 " | ||
placeholder="write your messaage..." | ||
></textarea> | ||
</div> | ||
|
||
<button | ||
type="submit" | ||
className="w-full py-2 px-4 bg-transparent rounded-md hover:bg-cyan-600" | ||
> | ||
<span className="text-xl font-bold">Submit</span> | ||
</button> | ||
</motion.form> | ||
</div> | ||
</motion.div> | ||
); | ||
} | ||
|
||
export default ContactUs; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
import { motion } from "framer-motion"; | ||
import { fadeIn } from "../Variants"; | ||
const Footer = () => { | ||
return ( | ||
<div className="flex my-10 md:mx-40 items-center justify-center "> | ||
<div className="flex items-center justify-around gap-7"> | ||
<a href="https://www.linkedin.com/in/ayush215mb/" target="_blank"> | ||
<motion.img | ||
variants={fadeIn("up", 0.2)} | ||
initial="hidden" | ||
whileInView={"show"} | ||
viewport={{ once: true, amount: 0.7 }} | ||
src="https://cdn2.iconfinder.com/data/icons/social-media-2285/512/1_Linkedin_unofficial_colored_svg-512.png" | ||
alt="Linkedin_logo" | ||
className="max-w-12" | ||
/> | ||
</a> | ||
<a | ||
href="https://www.instagram.com/ayush215mb?igsh=MWk4OGRtMW11Mzl0aA==" | ||
target="_blank" | ||
> | ||
<motion.img | ||
variants={fadeIn("up", 0.3)} | ||
initial="hidden" | ||
whileInView={"show"} | ||
viewport={{ once: true, amount: 0.7 }} | ||
src=" https://cdn2.iconfinder.com/data/icons/social-media-2285/512/1_Instagram_colored_svg_1-512.png" | ||
alt="Insta_logo" | ||
className="max-w-12" | ||
/> | ||
</a> | ||
<a href="https://github.com/Ayush215mb" target="_blank"> | ||
<motion.img | ||
variants={fadeIn("up", 0.4)} | ||
initial="hidden" | ||
whileInView={"show"} | ||
viewport={{ once: true, amount: 0.7 }} | ||
src=" https://cdn1.iconfinder.com/data/icons/logotypes/32/github-256.png" | ||
alt="Github_logo" | ||
className="max-w-12 bg-slate-200" | ||
/> | ||
</a> | ||
|
||
<a href="mailto: [email protected]" target="_blank"> | ||
<motion.img | ||
variants={fadeIn("up", 0.5)} | ||
initial="hidden" | ||
whileInView={"show"} | ||
viewport={{ once: true, amount: 0.7 }} | ||
src="https://cdn1.iconfinder.com/data/icons/google-s-logo/150/Google_Icons-02-512.png" | ||
alt="gmail_logo" | ||
className="max-w-12 " | ||
/> | ||
</a> | ||
<a href="https://discord.com/users/903294131768545291" target="_blank"> | ||
<motion.img | ||
variants={fadeIn("up", 0.6)} | ||
initial="hidden" | ||
whileInView={"show"} | ||
viewport={{ once: true, amount: 0.7 }} | ||
src=" https://cdn0.iconfinder.com/data/icons/free-social-media-set/24/discord-64.png" | ||
alt="discord_logo" | ||
className="max-w-12 " | ||
/> | ||
</a> | ||
</div> | ||
</div> | ||
); | ||
}; | ||
|
||
export default Footer; |
Oops, something went wrong.