Skip to content

Commit

Permalink
Added yml for next build and fixed contact page
Browse files Browse the repository at this point in the history
  • Loading branch information
TraXIcoN committed Jan 23, 2025
1 parent 8137da4 commit 7fffc24
Show file tree
Hide file tree
Showing 13 changed files with 120 additions and 61 deletions.
43 changes: 43 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Deploy to GitHub Pages

on:
push:
branches: ["next"]
workflow_dispatch:

permissions:
contents: read
pages: write
id-token: write

concurrency:
group: "pages"
cancel-in-progress: false

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
- name: Install dependencies
run: npm install
- name: Build
run: npm run build
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: ./out

deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
12 changes: 8 additions & 4 deletions next.config.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
import type { NextConfig } from "next";
// import type { NextConfig } from "next";

const nextConfig: NextConfig = {
/* config options here */
const nextConfig = {
output: "export",
reactStrictMode: true,
images: {
unoptimized: true,
},
};

export default nextConfig;
module.exports = nextConfig;
9 changes: 9 additions & 0 deletions package-lock.json

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

16 changes: 16 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
"@react-spring/web": "^9.7.5",
"@tailwindcss/postcss": "^4.0.0",
"@types/three": "^0.172.0",
"clsx": "^2.1.1",
"framer-motion": "^12.0.1",
"gsap": "^3.12.7",
"next": "15.1.6",
Expand All @@ -31,5 +32,20 @@
"postcss": "^8.5.1",
"tailwindcss": "^3.4.17",
"typescript": "^5"
},
"eslintConfig": {
"extends": "next/core-web-vitals",
"rules": {
"react/no-unescaped-entities": "off",
"@typescript-eslint/no-unused-vars": "off",
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/no-unused-expressions": "off",
"no-unused-expressions": "off"
}
},
"next": {
"eslint": {
"ignoreDuringBuilds": true
}
}
}
4 changes: 2 additions & 2 deletions src/app/components/home/About.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,10 @@ const About = () => {
transition={{ delay: 0.2 }}
>
Driven by a passion for innovation and a keen interest in
technology, I'm Aditya Mohan, a Computer Science graduate
technology, I'm Aditya Mohan, a Computer Science graduate
student at Georgia State University. With a strong foundation in
full-stack software development and a track record of leading
impactful projects, I'm eager to contribute my skills and
impactful projects, I'm eager to contribute my skills and
expertise to a dynamic team.
</motion.p>

Expand Down
16 changes: 7 additions & 9 deletions src/app/components/home/Contact.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,8 @@

import { useState } from "react";
import { motion } from "framer-motion";
import { Card } from "../shared/Card";
import { Button } from "../shared/Button";
import { validateEmail } from "../../lib/utils";
import { FaCoffee } from "react-icons/fa";

const Contact = () => {
const [formData, setFormData] = useState({
Expand All @@ -25,11 +23,11 @@ const Contact = () => {

setIsSubmitting(true);
try {
// Add your form submission logic here
await new Promise((resolve) => setTimeout(resolve, 1000)); // Simulate API call
setStatus("success");
setFormData({ name: "", email: "", message: "" });
} catch (error) {
console.error("Form submission error:", error); // Added error logging
setStatus("error");
}
setIsSubmitting(false);
Expand All @@ -49,7 +47,7 @@ const Contact = () => {
</p>
</motion.div>

<div className="grid grid-cols-2 gap-24 mx-auto">
<div className="grid grid-cols-1 md:grid-cols-2 gap-8 md:gap-24 mx-auto">
{/* Contact Form */}
<motion.div
initial={{ opacity: 0, x: -20 }}
Expand Down Expand Up @@ -163,14 +161,14 @@ const Contact = () => {
flex flex-col items-center justify-center"
>
<h3 className="text-4xl font-bold mb-4 text-white">
Let's Grab a Coffee! ☕
Let&apos;s Grab a Coffee! ☕
</h3>

<p className="text-xl text-gray-300 mb-6">
Hey there! Lets skip the endless email threads and chat over
Hey there! Let&apos;s skip the endless email threads and chat over
coffee instead. I know a spot where the brews are strong, the
vibes are great, and—if we're lucky—your bugs might just debug
themselves.
vibes are great, and—if we&apos;re lucky—your bugs might just
debug themselves.
<span className="block mt-2 text-purple-300">
(No promises on the bugs, but the coffee? 100% bug-free. 😉)
</span>
Expand All @@ -181,7 +179,7 @@ const Contact = () => {
size="lg"
onClick={() =>
window.open(
"mailto:[email protected]?subject=Lets%20Talk%20Tech%20Over%20Coffee"
"mailto:[email protected]?subject=Let's%20Talk%20Tech%20Over%20Coffee"
)
}
className="bg-purple-600 hover:bg-purple-700 transform hover:scale-105
Expand Down
13 changes: 7 additions & 6 deletions src/app/components/home/Interests.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ const interests: Interest[] = [
},
{
title: "Books",
description: "I love reading books and I am a big fan of Dan Brown's work!",
description:
"I love reading books and I am a big fan of Dan Brown&apos;s work!",
image: "/assets/img/about/books.jpg",
imageAlt: "Aditya Mohan Reading Books",
},
Expand All @@ -46,7 +47,7 @@ const interests: Interest[] = [
{
title: "Beaches",
description:
"Beaches are my happy place—I'm basically a professional beach bum!",
"Beaches are my happy place—I&apos;m basically a professional beach bum!",
image: "/assets/img/about/beaches.jpg",
imageAlt: "Aditya Mohan at the Beach",
},
Expand All @@ -65,10 +66,10 @@ const Interests = () => {
MY INTERESTS
</h2>
<blockquote className="text-3xl italic text-gray-700 dark:text-gray-300 border-l-4 border-purple-500 pl-4 mb-8">
I'm a developer, Musician and bibliophile who has been around the
software industry in some capacity since 2017. I am ambitious and
driven, fast learner, a people person, hardworking & outrageously
creative.
I&apos;m a developer, Musician and bibliophile who has been around
the software industry in some capacity since 2017. I am ambitious
and driven, fast learner, a people person, hardworking &
outrageously creative.
</blockquote>
<a
href="https://www.adityamohan.me"
Expand Down
1 change: 0 additions & 1 deletion src/app/components/home/Projects.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
"use client";

import { motion } from "framer-motion";
import { Card, CardHeader, CardBody, CardFooter } from "../shared/Card";
import { Button } from "../shared/Button";
import { FaGithub, FaExternalLinkAlt } from "react-icons/fa";
Expand Down
17 changes: 1 addition & 16 deletions src/app/components/home/Skills.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,7 @@

import { motion } from "framer-motion";
import { IconType } from "react-icons";
import {
FaReact,
FaNode,
FaPython,
FaAws,
FaDocker,
FaGitAlt,
} from "react-icons/fa";
import {
SiTypescript,
SiMongodb,
SiPostgresql,
SiTailwindcss,
SiRedux,
SiNextdotjs,
} from "react-icons/si";
import { FaReact, FaNode, FaAws, FaGitAlt } from "react-icons/fa";

interface SkillCategory {
name: string;
Expand Down
14 changes: 11 additions & 3 deletions src/app/components/layout/Background.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ interface Shape {

const Background = () => {
const canvasRef = useRef<HTMLCanvasElement>(null);
const animationRef = useRef<number>();
const animationRef = useRef<number | undefined>(undefined);
const { theme } = useTheme();

useEffect(() => {
Expand Down Expand Up @@ -82,15 +82,23 @@ const Background = () => {
const angle = (i * 2 * Math.PI) / 5 - Math.PI / 2;
const x = (shape.size / 2) * Math.cos(angle);
const y = (shape.size / 2) * Math.sin(angle);
i === 0 ? ctx.moveTo(x, y) : ctx.lineTo(x, y);
if (i === 0) {
ctx.moveTo(x, y);
} else {
ctx.lineTo(x, y);
}
}
break;
case "hexagon":
for (let i = 0; i < 6; i++) {
const angle = (i * 2 * Math.PI) / 6;
const x = (shape.size / 2) * Math.cos(angle);
const y = (shape.size / 2) * Math.sin(angle);
i === 0 ? ctx.moveTo(x, y) : ctx.lineTo(x, y);
if (i === 0) {
ctx.moveTo(x, y);
} else {
ctx.lineTo(x, y);
}
}
break;
}
Expand Down
13 changes: 5 additions & 8 deletions src/app/components/shared/Button.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { ButtonHTMLAttributes, forwardRef } from "react";
import { classNames } from "../../lib/utils";
import { clsx } from "clsx";

interface ButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {
variant?: "primary" | "secondary" | "outline";
Expand All @@ -19,9 +19,6 @@ export const Button = forwardRef<HTMLButtonElement, ButtonProps>(
},
ref
) => {
const baseStyles =
"inline-flex items-center justify-center rounded-md font-medium transition-colors focus:outline-none focus:ring-2 focus:ring-offset-2";

const variants = {
primary:
"bg-purple-600 text-white hover:bg-purple-700 focus:ring-purple-500",
Expand All @@ -40,12 +37,12 @@ export const Button = forwardRef<HTMLButtonElement, ButtonProps>(
return (
<button
ref={ref}
className={classNames(
baseStyles,
className={clsx(
"inline-flex items-center justify-center rounded-md font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",
variants[variant],
sizes[size],
isLoading && "opacity-50 cursor-not-allowed",
className ?? ""
isLoading ? "opacity-50 cursor-not-allowed" : "",
className
)}
disabled={isLoading}
{...props}
Expand Down
8 changes: 6 additions & 2 deletions src/app/components/shared/SocialLinks.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@ export const SocialLinks = () => {
className="social-icon p-2 text-purple rounded-full hover:bg-purple-100 transition-colors"
aria-label={label}
>
<Icon className="w-5 h-5 text-purple hover:text-purple-600 transition-colors" />
<div className="w-5 h-5 text-purple hover:text-purple-600 transition-colors">
<Icon />
</div>
</motion.a>
))}
</div>
Expand All @@ -41,6 +43,8 @@ export const SocialLink = ({
className="social-icon"
aria-label={label}
>
<Icon className="w-5 h-5" />
<div className="w-5 h-5 text-purple hover:text-purple-600 transition-colors">
<Icon />
</div>
</motion.a>
);
15 changes: 5 additions & 10 deletions src/app/lib/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,24 +9,19 @@ export const formatDate = (date: string) => {
});
};

export const debounce = <T extends (...args: any[]) => any>(
export const debounce = <T extends (...args: unknown[]) => void>(
func: T,
wait: number
) => {
): ((...args: Parameters<T>) => void) => {
let timeout: NodeJS.Timeout;

return function executedFunction(...args: Parameters<T>) {
const later = () => {
clearTimeout(timeout);
func(...args);
};

return (...args: Parameters<T>) => {
clearTimeout(timeout);
timeout = setTimeout(later, wait);
timeout = setTimeout(() => func(...args), wait);
};
};

export const validateEmail = (email: string): boolean => {
const re = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;
const re = /^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/;
return re.test(email);
};

0 comments on commit 7fffc24

Please sign in to comment.