-
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.
safety commit before i delete pages dir
- Loading branch information
1 parent
5d81cce
commit 90287bb
Showing
13 changed files
with
916 additions
and
321 deletions.
There are no files selected for viewing
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 @@ | ||
// Next.js API route support: https://nextjs.org/docs/api-routes/introduction | ||
import type { NextApiRequest, NextApiResponse } from "next" | ||
import nodemailer from "nodemailer" | ||
|
||
type Data = { | ||
success: boolean | ||
message?: string | ||
name?: string | ||
error?: any | ||
} | ||
|
||
const { EMAIL, RECEIPIENT_EMAIL, PASSWORD } = process.env | ||
|
||
const transporter = nodemailer.createTransport({ | ||
service: "gmail", | ||
auth: { | ||
user: EMAIL, | ||
pass: PASSWORD, | ||
}, | ||
}) | ||
|
||
export default async function handler( | ||
req: NextApiRequest, | ||
res: NextApiResponse<Data> | ||
) { | ||
const { email, name, desc } = req.body | ||
|
||
if (req.method !== "POST") { | ||
return res | ||
.status(404) | ||
.json({ success: false, message: "The method is not defined" }) | ||
} | ||
|
||
if (!email || !name || !desc) { | ||
return res | ||
.status(400) | ||
.json({ success: false, message: "Fill all the fields!!" }) | ||
} | ||
|
||
const mailData = { | ||
from: EMAIL, | ||
to: RECEIPIENT_EMAIL, | ||
subject: `Message from ${name}`, | ||
text: desc + " | Sent by: " + email, | ||
html: `<div>${desc}</div><p>Sent by: | ||
${email}</p>`, | ||
} | ||
|
||
try { | ||
await new Promise((resolve, reject) => { | ||
transporter.sendMail(mailData, (error, info) => { | ||
if (error) { | ||
console.log(error) | ||
reject(error) | ||
return res.status(500).json({ success: false, error: error }) | ||
} else { | ||
console.log("Mail has been sent successfully") | ||
resolve(true) | ||
return res.status(200).json({ | ||
success: true, | ||
name, | ||
message: `${name} your mail has been sent. Thank You :)`, | ||
}) | ||
} | ||
}) | ||
}) | ||
} catch (error) { | ||
console.log(error) | ||
return res.status(500).json({ success: false, error: error }) | ||
} | ||
} |
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,24 @@ | ||
import Navbar from "@/components/UIComponents/Navbar/Navbar" | ||
import Blob from "@/components/UIComponents/Blob/Blob" | ||
import styles from "../../styles/ArtGallery.module.css" | ||
import ArtGallery from "@/components/ArtGallery/ArtGallery" | ||
import { Metadata } from "next" | ||
|
||
export const metadata: Metadata = { | ||
title: "Deveesh Shetty - Art Gallery", | ||
description: "Arts - Paintings / Sketches made by Deveesh Shetty", | ||
} | ||
|
||
function ArtGalleryPage() { | ||
return ( | ||
<> | ||
<Blob /> | ||
<Navbar /> | ||
<main className={styles.main}> | ||
<ArtGallery /> | ||
</main> | ||
</> | ||
) | ||
} | ||
|
||
export default ArtGalleryPage |
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,26 @@ | ||
import Navbar from "@/components/UIComponents/Navbar/Navbar" | ||
import Blob from "@/components/UIComponents/Blob/Blob" | ||
import Contact from "@/components/Contact/Contact" | ||
import ContactForm from "@/components/Contact/ContactForm" | ||
import styles from "../../styles/Contact.module.css" | ||
import { Metadata } from "next" | ||
|
||
export const metadata: Metadata = { | ||
title: "Deveesh Shetty - Contact", | ||
description: "Deveesh Shetty Contact Info", | ||
} | ||
|
||
function ContactPage() { | ||
return ( | ||
<> | ||
<Blob /> | ||
<Navbar /> | ||
<main className={styles.main}> | ||
<Contact /> | ||
<ContactForm /> | ||
</main> | ||
</> | ||
) | ||
} | ||
|
||
export default ContactPage |
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,27 @@ | ||
import { Metadata } from "next" | ||
import NextNProgress from "nextjs-progressbar" | ||
import { ToastContainer } from "react-toastify" | ||
import "@/styles/globals.css" | ||
|
||
export const metadata: Metadata = { | ||
title: "Deveesh Shetty", | ||
description: "Portfolio Site of Deveesh Shetty", | ||
} | ||
|
||
export default function RootLayout({ | ||
// Layouts must accept a children prop. | ||
// This will be populated with nested layouts or pages | ||
children, | ||
}: { | ||
children: React.ReactNode | ||
}) { | ||
return ( | ||
<html lang="en"> | ||
<body> | ||
<NextNProgress color="var(--clr-primary-100)" /> | ||
{children} | ||
<ToastContainer /> | ||
</body> | ||
</html> | ||
) | ||
} |
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,29 @@ | ||
import Head from "next/head" | ||
import Landing from "@/components/Landing/Landing" | ||
import Navbar from "@/components/UIComponents/Navbar/Navbar" | ||
import Blob from "@/components/UIComponents/Blob/Blob" | ||
import Home from "@/components/Home/Home" | ||
import Skills from "@/components/Skills/Skills" | ||
import styles from "../styles/Landing.module.css" | ||
import Achievements from "@/components/Achievements/Achievements" | ||
|
||
export default function LandingPage() { | ||
return ( | ||
<> | ||
<Head> | ||
<title>Deveesh Shetty</title> | ||
<meta name="description" content="Portfolio Site of Deveesh Shetty" /> | ||
</Head> | ||
<> | ||
<Blob /> | ||
<Navbar /> | ||
<main className={styles.main}> | ||
<Landing /> | ||
<Home /> | ||
<Achievements /> | ||
<Skills /> | ||
</main> | ||
</> | ||
</> | ||
) | ||
} |
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,23 @@ | ||
import Projects from "@/components/Projects/Projects" | ||
import Blob from "@/components/UIComponents/Blob/Blob" | ||
import Navbar from "@/components/UIComponents/Navbar/Navbar" | ||
import Head from "next/head" | ||
import { Metadata } from "next" | ||
|
||
export const metadata: Metadata = { | ||
title: "Deveesh Shetty - Projects", | ||
description: | ||
"Projects built by Deveesh Shetty showcased in my portfolio site", | ||
} | ||
|
||
function ProjectPage() { | ||
return ( | ||
<> | ||
<Navbar /> | ||
<Blob /> | ||
<Projects /> | ||
</> | ||
) | ||
} | ||
|
||
export default ProjectPage |
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,127 @@ | ||
import { Dispatch, SetStateAction, useEffect } from "react" | ||
import { motion, AnimatePresence } from "framer-motion" | ||
import Image from "next/image" | ||
import { Icon } from "@iconify/react" | ||
import { ProjectObject } from "@/lib/types" | ||
import { projectsLength } from "@/lib/projects" | ||
import styles from "./Projects.module.css" | ||
|
||
type Props = { | ||
index: number | ||
setIndex: Dispatch<SetStateAction<number>> | ||
project: ProjectObject | ||
} | ||
|
||
function Project({ project, setIndex, index }: Props) { | ||
const { | ||
name, | ||
tagline, | ||
sourceCode, | ||
liveUrl, | ||
blogUrl, | ||
descriptionOne, | ||
descriptionTwo, | ||
img, | ||
} = project | ||
|
||
function next() { | ||
setIndex((prev) => (prev + 1) % projectsLength) | ||
} | ||
|
||
function prev() { | ||
if (index === 0) setIndex((prev) => (prev = projectsLength - 1)) | ||
else setIndex((prev) => prev - 1) | ||
} | ||
|
||
function handleToggle(e: KeyboardEvent) { | ||
if (e.key === "ArrowLeft") prev() | ||
else if (e.key == "ArrowRight") next() | ||
} | ||
|
||
useEffect(() => { | ||
document.addEventListener("keyup", handleToggle) | ||
|
||
return () => { | ||
document.removeEventListener("keyup", handleToggle) | ||
} | ||
}, []) | ||
|
||
return ( | ||
<AnimatePresence> | ||
<motion.section | ||
className={styles.container} | ||
initial={{ x: 1000, opacity: 0 }} | ||
animate={{ x: 0, opacity: 1 }} | ||
transition={{ ease: "easeInOut", duration: 0.2 }} | ||
> | ||
<div className={styles.projects}> | ||
<div className={styles.content}> | ||
<div className={styles.content_heading}> | ||
<h2>{name}</h2> | ||
<h3>{tagline}</h3> | ||
</div> | ||
<div className={styles.content_paragraph}> | ||
<p>{descriptionOne}</p> | ||
<p>{descriptionTwo}</p> | ||
</div> | ||
<div className={styles.content_navigations}> | ||
<div> | ||
<button className={styles.code_btn}> | ||
<Icon icon="ph:code" /> | ||
<a href={sourceCode!} target="_blank"> | ||
<p>Source Code</p> | ||
</a> | ||
</button> | ||
<button className={styles.blog_btn}> | ||
<a href={blogUrl!} target="_blank"> | ||
Blog | ||
</a> | ||
</button> | ||
</div> | ||
<button className={styles.live_btn}> | ||
<a href={liveUrl!} target="_blank"> | ||
Go Live | ||
</a> | ||
</button> | ||
</div> | ||
<div className={styles.primary_navigation}> | ||
<button data-function="prev" onClick={prev}> | ||
<Icon icon="ic:baseline-arrow-left" /> | ||
<p>Prev</p> | ||
</button> | ||
<button data-function="next" onClick={next}> | ||
<p>Next</p> | ||
<Icon icon="ic:baseline-arrow-right" /> | ||
</button> | ||
</div> | ||
</div> | ||
<div className={styles.image_container}> | ||
<a href={liveUrl!} target="_blank"> | ||
<Image src={img} alt="Chromatico Mobile" /> | ||
</a> | ||
</div> | ||
</div> | ||
<div className={styles.scroll_text_container}> | ||
<div className={styles.scroll_text}> | ||
<p>{name}</p> | ||
<p>•</p> | ||
<p>{name}</p> | ||
<p>•</p> | ||
<p>{name}</p> | ||
<p>•</p> | ||
</div> | ||
<div className={styles.scroll_text}> | ||
<p>{name}</p> | ||
<p>•</p> | ||
<p>{name}</p> | ||
<p>•</p> | ||
<p>{name}</p> | ||
<p>•</p> | ||
</div> | ||
</div> | ||
</motion.section> | ||
</AnimatePresence> | ||
) | ||
} | ||
|
||
export default Project |
Oops, something went wrong.