Skip to content

Commit

Permalink
✅updated contact
Browse files Browse the repository at this point in the history
  • Loading branch information
Udoy2 committed Sep 8, 2024
1 parent 68c639b commit 51139ea
Show file tree
Hide file tree
Showing 4 changed files with 140 additions and 6 deletions.
39 changes: 39 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Deploy React to Netlify

on:
push:
branches:
- main

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: '20'

- name: Create .env file
run: |
echo "VITE_APP_EMAILJS_SERVICE_ID=${{ secrets.VITE_APP_EMAILJS_SERVICE_ID }}" >> .env
echo "VITE_APP_EMAILJS_TEMPLATE_ID=${{ secrets.VITE_APP_EMAILJS_TEMPLATE_ID }}" >> .env
echo "VITE_APP_EMAILJS_PUBLIC_KEY=${{ secrets.VITE_APP_EMAILJS_PUBLIC_KEY }}" >> .env
- name: Install dependencies with legacy peer deps and force
run: npm install --legacy-peer-deps --force

- name: Install Netlify CLI
run: npm install -g netlify-cli

- name: Build React app
run: npm run build

- name: Deploy to Netlify
run: netlify deploy --prod --dir=dist --site ${{ secrets.NETLIFY_SITE_ID }}
env:
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*

.env
node_modules
dist
dist-ssr
Expand Down
6 changes: 3 additions & 3 deletions src/components/Contact.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,16 +34,16 @@ const Contact = () => {

emailjs
.send(
process.env.VITE_APP_EMAILJS_SERVICE_ID,
process.env.VITE_APP_EMAILJS_TEMPLATE_ID,
import.meta.env.VITE_APP_EMAILJS_SERVICE_ID,
import.meta.env.VITE_APP_EMAILJS_TEMPLATE_ID,
{
from_name: form.name,
to_name: "Udoy Rahman",
from_email: form.email,
to_email: "udoyrahman983@gmail.com",
message: form.message,
},
process.env.VITE_APP_EMAILJS_PUBLIC_KEY
import.meta.env.VITE_APP_EMAILJS_PUBLIC_KEY
)
.then(
() => {
Expand Down
99 changes: 97 additions & 2 deletions src/components/Works.jsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React from "react";
import React, { useEffect, useState } from "react";
import Tilt from "react-tilt";
import { motion } from "framer-motion";

Expand All @@ -8,6 +8,60 @@ import { SectionWrapper } from "../hoc";
import { projects } from "../constants";
import { fadeIn, textVariant } from "../utils/motion";

const ProjectCardMobile = ({
index,
name,
description,
tags,
image,
source_code_link,
}) => {
return (
<div>
<div
className='bg-tertiary p-5 rounded-2xl sm:w-[360px] w-full'
>
<div className='relative w-full h-[230px]'>
<img
src={image}
alt='project_image'
className='w-full h-full object-cover rounded-2xl'
/>

<div className='absolute inset-0 flex justify-end m-3 card-img_hover'>
<div
onClick={() => window.open(source_code_link, "_blank")}
className='black-gradient w-10 h-10 rounded-full flex justify-center items-center cursor-pointer'
>
<img
src={github}
alt='source code'
className='w-1/2 h-1/2 object-contain'
/>
</div>
</div>
</div>

<div className='mt-5'>
<h3 className='text-white font-bold text-[24px]'>{name}</h3>
<p className='mt-2 text-secondary text-[14px]'>{description}</p>
</div>

<div className='mt-4 flex flex-wrap gap-2'>
{tags.map((tag) => (
<p
key={`${name}-${tag.name}`}
className={`text-[14px] ${tag.color}`}
>
#{tag.name}
</p>
))}
</div>
</div>
</div>
);
};

const ProjectCard = ({
index,
name,
Expand Down Expand Up @@ -68,14 +122,38 @@ const ProjectCard = ({
};

const Works = () => {
const [isMobile, setisMobile] = useState(false);

useEffect(() => {
const mediaQuery = window.matchMedia('(max-width: 500px)');
setisMobile(mediaQuery.matches);

const handleMediaQueryChange = (event) => {
setisMobile(event.matches);
};

mediaQuery.addEventListener('change', handleMediaQueryChange);

return () => {
mediaQuery.removeEventListener('change', handleMediaQueryChange);
};
}, []);
return (
<>
{!isMobile?
<motion.div variants={textVariant()}>
<p className={`${styles.sectionSubText} `}>My work</p>
<h2 className={`${styles.sectionHeadText}`}>Projects.</h2>
</motion.div>
:
<div variants={textVariant()}>
<p className={`${styles.sectionSubText} `}>My work</p>
<h2 className={`${styles.sectionHeadText}`}>Projects.</h2>
</div>
}

<div className='w-full flex'>
{!isMobile?
<motion.p
variants={fadeIn("", "", 0.1, 1)}
className='mt-3 text-secondary text-[17px] max-w-3xl leading-[30px]'
Expand All @@ -86,11 +164,28 @@ const Works = () => {
ability to solve complex problems, work with different technologies,
and manage projects effectively.
</motion.p>
:
<p
variants={fadeIn("", "", 0.1, 1)}
className='mt-3 text-secondary text-[17px] max-w-3xl leading-[30px]'
>
Following projects showcases my skills and experience through
real-world examples of my work. Each project is briefly described with
links to code repositories and live demos in it. It reflects my
ability to solve complex problems, work with different technologies,
and manage projects effectively.
</p>

}
</div>

<div className='mt-20 flex flex-wrap gap-7'>
{projects.map((project, index) => (
<ProjectCard key={`project-${index}`} index={index} {...project} />
!isMobile ?
<ProjectCard key={`project-${index}`} index={index} {...project} />
:
<ProjectCardMobile key={`project-${index}`} index={index} {...project} />

))}
</div>
</>
Expand Down

0 comments on commit 51139ea

Please sign in to comment.