Skip to content

Commit fefdff3

Browse files
committed
improve contact form and changes texts and reduced home image size
1 parent 2ae3079 commit fefdff3

10 files changed

Lines changed: 116 additions & 75 deletions

File tree

app.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,12 @@ const webRouter = require('./router/web.router.js');
1414
app.use('/', webRouter);
1515
app.use('/api', emailRouter);
1616

17-
app.use(express.static(path.resolve(__dirname, "public")));
17+
app.use(express.static(path.resolve(__dirname, "public"),{
18+
setHeaders: (res, path) => {
19+
res.status(200);
20+
res.setHeader('Cache-Control', 'public, max-age=86400');
21+
}
22+
}));
1823
const PORT = process.env.PORT || 3000;
1924
app.listen(PORT, () => {
2025
console.log(`App is running at PORT:${PORT}`);

public/css/style.css

Lines changed: 68 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -608,14 +608,46 @@ video {
608608
bottom: 1.5rem;
609609
}
610610

611+
.bottom-\[10\%\] {
612+
bottom: 10%;
613+
}
614+
611615
.left-1\/2 {
612616
left: 50%;
613617
}
614618

619+
.left-\[15\%\] {
620+
left: 15%;
621+
}
622+
623+
.left-\[20\%\] {
624+
left: 20%;
625+
}
626+
627+
.left-\[23\%\] {
628+
left: 23%;
629+
}
630+
631+
.left-\[50\%\] {
632+
left: 50%;
633+
}
634+
635+
.left-\[55\%\] {
636+
left: 55%;
637+
}
638+
615639
.right-6 {
616640
right: 1.5rem;
617641
}
618642

643+
.right-\[10\%\] {
644+
right: 10%;
645+
}
646+
647+
.right-\[5\%\] {
648+
right: 5%;
649+
}
650+
619651
.top-1\/2 {
620652
top: 50%;
621653
}
@@ -624,6 +656,22 @@ video {
624656
top: 1.75rem;
625657
}
626658

659+
.top-\[10\%\] {
660+
top: 10%;
661+
}
662+
663+
.top-\[15\%\] {
664+
top: 15%;
665+
}
666+
667+
.top-\[25\%\] {
668+
top: 25%;
669+
}
670+
671+
.top-\[50\%\] {
672+
top: 50%;
673+
}
674+
627675
.z-0 {
628676
z-index: 0;
629677
}
@@ -649,6 +697,11 @@ video {
649697
margin-right: auto;
650698
}
651699

700+
.my-1 {
701+
margin-top: 0.25rem;
702+
margin-bottom: 0.25rem;
703+
}
704+
652705
.mb-14 {
653706
margin-bottom: 3.5rem;
654707
}
@@ -697,10 +750,6 @@ video {
697750
margin-top: 3.75rem;
698751
}
699752

700-
.mb-10 {
701-
margin-bottom: 2.5rem;
702-
}
703-
704753
.box-border {
705754
box-sizing: border-box;
706755
}
@@ -761,10 +810,6 @@ video {
761810
height: 360px;
762811
}
763812

764-
.h-dvh {
765-
height: 100dvh;
766-
}
767-
768813
.h-full {
769814
height: 100%;
770815
}
@@ -781,10 +826,6 @@ video {
781826
min-height: 120px;
782827
}
783828

784-
.min-h-dvh {
785-
min-height: 100dvh;
786-
}
787-
788829
.w-36 {
789830
width: 9rem;
790831
}
@@ -1120,6 +1161,10 @@ video {
11201161
background-color: rgb(255 255 255 / var(--tw-bg-opacity, 1));
11211162
}
11221163

1164+
.bg-\[url\(\/img\/homeBg\.jpg\)\] {
1165+
background-image: url(/img/homeBg.jpg);
1166+
}
1167+
11231168
.bg-\[url\(\/img\/homeBg\.jpeg\)\] {
11241169
background-image: url(/img/homeBg.jpeg);
11251170
}
@@ -1211,6 +1256,10 @@ video {
12111256
padding-bottom: 1rem;
12121257
}
12131258

1259+
.pb-32 {
1260+
padding-bottom: 8rem;
1261+
}
1262+
12141263
.pb-6 {
12151264
padding-bottom: 1.5rem;
12161265
}
@@ -1239,28 +1288,12 @@ video {
12391288
padding-top: 0.25rem;
12401289
}
12411290

1242-
.pt-4 {
1243-
padding-top: 1rem;
1244-
}
1245-
1246-
.pb-10 {
1247-
padding-bottom: 2.5rem;
1248-
}
1249-
1250-
.pb-28 {
1251-
padding-bottom: 7rem;
1252-
}
1253-
1254-
.pb-32 {
1255-
padding-bottom: 8rem;
1256-
}
1257-
12581291
.pt-16 {
12591292
padding-top: 4rem;
12601293
}
12611294

1262-
.pb-24 {
1263-
padding-bottom: 6rem;
1295+
.pt-4 {
1296+
padding-top: 1rem;
12641297
}
12651298

12661299
.text-center {
@@ -1378,6 +1411,11 @@ video {
13781411
color: rgb(75 85 99 / var(--tw-text-opacity, 1));
13791412
}
13801413

1414+
.text-red-500 {
1415+
--tw-text-opacity: 1;
1416+
color: rgb(239 68 68 / var(--tw-text-opacity, 1));
1417+
}
1418+
13811419
.text-white {
13821420
--tw-text-opacity: 1;
13831421
color: rgb(255 255 255 / var(--tw-text-opacity, 1));
@@ -1568,16 +1606,6 @@ video {
15681606
display: none;
15691607
}
15701608

1571-
.dark\:border-\[\#3d3d3d\]:is(.dark *) {
1572-
--tw-border-opacity: 1;
1573-
border-color: rgb(61 61 61 / var(--tw-border-opacity, 1));
1574-
}
1575-
1576-
.dark\:border-gray-200:is(.dark *) {
1577-
--tw-border-opacity: 1;
1578-
border-color: rgb(229 231 235 / var(--tw-border-opacity, 1));
1579-
}
1580-
15811609
.dark\:border-white:is(.dark *) {
15821610
--tw-border-opacity: 1;
15831611
border-color: rgb(255 255 255 / var(--tw-border-opacity, 1));

public/img/homeBg.jpeg

-2.35 MB
Binary file not shown.

public/img/homeBg.jpg

900 KB
Loading

public/js/script.js

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,24 +3,29 @@ let form = document.querySelector('form');
33
form.querySelectorAll('input, textarea').forEach(field => {
44
field.addEventListener('input', () => {
55
field.classList.remove('border-red-500');
6+
form.querySelector(`#${field.id}Error`)?.classList.add('hidden');
67
});
78
});
9+
810
form.onsubmit = (e) => {
911
e.preventDefault();
1012

1113
let name = form.querySelector('#name');
1214
if (!name.value.trim()) {
1315
name.classList.add('border-red-500');
16+
form.querySelector('#nameError').classList.remove('hidden')
1417
return;
1518
}
1619
let email = form.querySelector('#email');
1720
if (!email.value.trim()) {
1821
email.classList.add('border-red-500');
22+
form.querySelector('#emailError').classList.remove('hidden')
1923
return;
2024
}
2125
let message = form.querySelector('#message');
2226
if (!message.value.trim()) {
2327
message.classList.add('border-red-500');
28+
form.querySelector('#messageError').classList.remove('hidden')
2429
return;
2530
}
2631

@@ -137,7 +142,7 @@ let achievements = [
137142
KeyAchievement: [
138143
"Created a carpooling web app to solve university commute issues.",
139144
"Developed backend using Express.js and MongoDB to handle ride creation, joining, and real-time updates via WebSockets.",
140-
"Designed responsive frontend using EJS and Tailwind CSS for a unified login and dashboard experience.",
145+
"Designed frontend using EJS and Tailwind CSS.",
141146
"Implemented ride history, live ride tracking, and notification system for cancellations"
142147
]
143148
},
@@ -147,11 +152,11 @@ let achievements = [
147152
name: "Bachelor's in Software Engineering",
148153
place: "MUET, Jamshoro",
149154
url: "https://www.muet.edu.pk/",
150-
shortDesc: "Completed 4-year undergraduate degree with a strong foundation in full-stack web development and software engineering principles.",
155+
shortDesc: "Pursuing Bachelor’s with practical projects, covering areas like web development, AI, and more—graduating in 2026.",
151156
KeyAchievement: [
152-
"Graduated with hands-on experience in MERN stack development, database design, and RESTful APIs.",
153-
"Built multiple academic projects, including a real-time carpooling app, a weather dashboard, and a file-sharing platform.",
154-
"Contributed to open-source projects and actively participated in hackathons and coding competitions.",
157+
"Studied core and advanced software engineering topics with practicals, and hands-on projects.",
158+
"Gained experience in DSA, Web Development, and Database Systems.",
159+
"Developed skills in Software Project Management, Object-Oriented Programming, and Human-Computer Interaction.",
155160
"Developed strong problem-solving skills through regular coursework, labs, and collaborative team-based projects."
156161
]
157162
},
@@ -161,12 +166,12 @@ let achievements = [
161166
name: "Web Development Course",
162167
place: "National Freelancing Training Program",
163168
url: "https://nftp.pitb.gov.pk/",
164-
shortDesc: "Completed a comprehensive full-stack web development training with a focus on Node.js backend, RESTful APIs, and database integration.",
169+
shortDesc: "Joined during my <b>First year</b> of university to learn basics of web development.",
165170
KeyAchievement: [
166-
"Built foundational knowledge in JavaScript, Node.js, and Express.js.",
167-
"Learned RESTful API design, server-side rendering, and web security best practices.",
168-
"Worked with both SQL and NoSQL databases for backend integration.",
169-
"Practiced version control using Git and gained exposure to real-world web development workflows."
171+
"Learned the basics of HTML, CSS, and JavaScript.",
172+
"Gained an understanding of how backend systems work behind the scenes.",
173+
"Learned to use MySQL for managing databases and organizing data.",
174+
"Created multiple projects to apply concepts learned from course."
170175
]
171176
}
172177
];
@@ -242,6 +247,7 @@ document.querySelectorAll('#menu a').forEach(a => {
242247
a.addEventListener('click', () => {
243248
menu.classList.add('hidden');
244249
menu.classList.remove('flex');
250+
document.body.classList.remove('overflow-hidden');
245251
});
246252
});
247253

views/index.ejs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
<meta property="og:image" content="https://sunjay.xyz/img/me.jpg" />
1515
<meta property="og:url" content="https://sunjay.xyz/" />
1616
<meta property="og:type" content="website" />
17-
<title>Sunjay Kumar | MERN Stack Developer</title>
17+
<title>Sunjay Kumar | Full Stack Developer</title>
1818
<link href="/css/style.css" rel="stylesheet" />
1919
</head>
2020

views/partials/about.ejs

Lines changed: 18 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -3,22 +3,21 @@
33
<div class="grid grid-cols-1 md:grid-cols-2 gap-12">
44
<!-- Left Side -->
55
<div class="space-y-4 sm:px-0 px-6">
6-
<h2 class="text-4xl font-bold text-[#3d3d3d] mb-14"><u>About </u>me</h2>
6+
<h2 class="text-4xl font-bold mb-14"><u>About </u>me</h2>
77
<p class="text-2xl font-semibold">Hey! I'm Sunjay Kumar</p>
88
<div class="font-normal opacity-80 selection:opacity-100 space-y-4">
99

10-
<p>I am a passionate software engineer specializing in full-stack development. I love crafting clean,
10+
<p>I am a passionate software engineer specializing in full-stack development. I love writing clean,
1111
efficient code and building amazing user experiences.</p>
12-
<p>Skilled in JavaScript, Node.js, React, and databases like MongoDB, I enjoy working on innovative
12+
<p>Skilled in JavaScript, Node.js, React, and databases like MongoDB, and MySQL, I enjoy working on innovative
1313
projects that solve real-world problems.</p>
1414
<p>Always eager to learn new technologies and improve my skills through collaborative teamwork and
1515
challenging tasks.</p>
16-
1716
</div>
1817
</div>
1918

2019
<!-- Right Side Avatar + Icons -->
21-
<div class="relative w-[360px] h-[360px] sm:w-[480px] sm:h-[480px] mx-auto sm:-mt-10">
20+
<div class="relative w-[360px] h-[360px] sm:w-[480px] sm:h-[480px] mx-auto sm:-mt-10 select-none">
2221
<div
2322
class="absolute border border-dashed border-gray-300 rounded-full w-[340px] h-[340px] sm:w-[440px] sm:h-[440px] top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2">
2423
</div>
@@ -31,44 +30,44 @@
3130

3231
<!-- Icons -->
3332

34-
<div class="absolute px-3 py-3 bg-white rounded-full shadow-lg animate-float"
35-
style="top: 10%; left: 50%; transform: translate(-50%, 0);">
33+
<div class="absolute px-3 py-3 top-[10%] left-[50%] bg-white rounded-full shadow-lg animate-float"
34+
style="transform: translate(-50%, 0);">
3635
<img src="/svg/techIcons/react.svg"
3736
class="w-7 h-7 sm:w-8 sm:h-8" alt="React" />
3837
</div>
3938

40-
<div class="absolute px-3 py-3 bg-white rounded-full shadow-lg animate-float"
41-
style="top: 50%; right: 10%; animation-delay: 0.5s; transform: translate(50%, -50%);">
39+
<div class="absolute px-3 py-3 top-[50%] right-[10%] bg-white rounded-full shadow-lg animate-float"
40+
style="animation-delay: 0.5s; transform: translate(50%, -50%);">
4241
<img src="/svg/techIcons/javascript.svg"
4342
class="w-7 h-7 sm:w-8 sm:h-8" alt="JavaScript" />
4443
</div>
4544

46-
<div class="absolute px-3 py-3 bg-white rounded-full shadow-lg animate-float"
47-
style="bottom: 10%; left: 55%; animation-delay: 1s; transform: translate(-50%, 0);">
45+
<div class="absolute px-3 py-3 bottom-[10%] left-[55%] bg-white rounded-full shadow-lg animate-float"
46+
style="animation-delay: 1s; transform: translate(-50%, 0);">
4847
<img src="/svg/techIcons/typescript.svg"
4948
class="w-7 h-7 sm:w-8 sm:h-8" alt="TypeScript" />
5049
</div>
5150

52-
<div class="absolute px-3 py-3 bg-white rounded-full shadow-lg animate-float"
53-
style="top: 15%; left: 20%; animation-delay: 0.7s;">
51+
<div class="absolute px-3 py-3 bg-white top-[15%] left-[20%] rounded-full shadow-lg animate-float"
52+
style="animation-delay: 0.7s;">
5453
<img src="/svg/techIcons/nodejs.svg"
5554
class="w-7 h-7 sm:w-8 sm:h-8" alt="Node.js" />
5655
</div>
5756

58-
<div class="absolute px-2 py-2 bg-white rounded-full shadow-lg animate-float"
59-
style="top: 25%; right: 5%; animation-delay: 1.3s;">
57+
<div class="absolute px-2 py-2 top-[25%] right-[5%] bg-white rounded-full shadow-lg animate-float"
58+
style="animation-delay: 1.3s;">
6059
<img src="/svg/techIcons/docker.svg"
6160
class="w-9 h-9 sm:w-10 sm:h-10" alt="Docker" />
6261
</div>
6362

64-
<div class="absolute px-3 py-3 bg-white rounded-full shadow-lg animate-float"
65-
style="top: 50%; left: 15%; animation-delay: 0.9s; transform: translateY(-50%);">
63+
<div class="absolute px-3 py-3 top-[50%] left-[15%] bg-white rounded-full shadow-lg animate-float"
64+
style="animation-delay: 0.9s; transform: translateY(-50%);">
6665
<img src="/svg/techIcons/mongodb.svg"
6766
class="w-7 h-7 sm:w-8 sm:h-8" alt="MongoDB" />
6867
</div>
6968

70-
<div class="absolute px-3 py-3 bg-white rounded-full shadow-lg animate-float"
71-
style="bottom: 5%; left: 25%; animation-delay: 1.5s; transform: translateX(-50%);">
69+
<div class="absolute px-3 py-3 bottom-[10%] left-[23%] bg-white rounded-full shadow-lg animate-float"
70+
style="animation-delay: 1.5s; transform: translateX(-50%);">
7271
<img src="/svg/techIcons/tailwindcss.svg"
7372
class="w-7 h-7 sm:w-8 sm:h-8" alt="Tailwind CSS" />
7473
</div>

0 commit comments

Comments
 (0)