-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathapp.js
More file actions
593 lines (557 loc) · 26.6 KB
/
Copy pathapp.js
File metadata and controls
593 lines (557 loc) · 26.6 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
const { useState, useEffect } = React;
// ===== Theme Hook =====
function useTheme() {
const [theme, setTheme] = useState(() => {
const saved = localStorage.getItem('portfolio-theme');
return saved || 'dark';
});
useEffect(() => {
document.documentElement.setAttribute('data-theme', theme);
localStorage.setItem('portfolio-theme', theme);
}, [theme]);
const toggleTheme = () => {
setTheme(prev => prev === 'dark' ? 'light' : 'dark');
};
return [theme, toggleTheme];
}
// ===== Data =====
const profileData = {
name: "Shekhar Mohanty Hemant",
title: "Student | Mtech AI, IIT Gandhinagar",
phone: "+91-9110054046",
email: "hemant436268s@gmail.com",
linkedin: "linkedin.com/in/hem436",
location: "Gandhinagar, Gujarat"
};
const educationData = [
{
degree: "Bachelor of Science (4 Year)",
field: "Data Science and Applications",
school: "Indian Institute of Technology Madras",
period: "Jan 2021 - Dec 2024",
grade: "CGPA: 8.96/10.0"
},
{
degree: "Trade Apprentice - NCVT Electronics",
field: "Electronics",
school: "Shavak Nanavati Technical Institute",
period: "Jan 2016 - Apr 2019",
grade: ""
}
];
const experienceData = [
{
title: "Maintenance Assistant - 2",
company: "Tata Steel",
period: "Apr 2019 - Present",
description: [
"Upgraded existing automation system and successfully commissioned ABB 800 M PLC and ACS 880 Drive.",
"Performing regular maintenance activities and resolving breakdown of electrical equipment in Recoiling and Inspection line."
]
}
];
const skillsData = {
languages: ["C/C++", "Python", "R", "Java", "Bash Script", "Ladder", "STL", "MATLAB"],
software: ["AutoCAD", "Fusion360", "Cura (3D Printing)", "DaVinci Resolve"],
cloud: ["GCP", "Azure", "Azure Fundamentals", "AI Fundamentals"],
other: ["Electronics / Electrical System Design", "ROS2", "Machine Learning", "Deep Learning"]
};
const projectsData = [
{
title: "Warehouse Inspection Robot",
date: "Dec 2024",
description: "Demonstrated autonomous navigation and object detection in a simulated warehouse environment using a robot with camera and lidar sensors. The robot navigates through waypoints, detects parcels in real-time, and logs position/orientation data.",
tech: ["ROS2", "Gazebo", "Navigation2", "YOLOv5", "TurtleBot3", "Python"],
github: "#",
demo: "#"
},
{
title: "Spectral Classification (CH2IIRS)",
date: "Aug 2024",
description: "Created a pipeline for spectral classification of Chandrayaan-2 IIRS dataset of Mare Moscoviense and Mare Gardner crater. Implemented data conversion, MNF denoising, KMeans/NFINDR algorithms, and 1D-CNN for spectral class prediction.",
tech: ["Python", "Deep Learning", "1D-CNN", "KMeans", "MNF", "Remote Sensing"],
github: "#",
demo: "#"
},
{
title: "Machine Unlearning",
date: "May 2024",
description: "Demonstrated machine unlearning for classification tasks on deep neural networks at ACM Workshop 2024. Implemented 'Fast Yet Effective Machine Unlearning' paper by Tarun et al. on a custom network.",
tech: ["PyTorch", "Deep Learning", "Neural Networks", "Python"],
github: "#",
demo: "#"
},
{
title: "Home Automation (Envision IoT)",
date: "May 2023",
description: "Built an IoT system for controlling home appliances based on human presence detection. Integrated ESP32 microcontroller with custom relay board and USB camera for smart automation.",
tech: ["ESP32", "Arduino", "MQTT", "VueJS", "IoT", "Flespi"],
github: "#",
demo: "#"
},
{
title: "QuantifiedSelf Web Application",
date: "Mar 2022",
description: "Created a comprehensive web application allowing users to create custom trackers, log data periodically, and analyze trends over time with visual insights.",
tech: ["Flask", "VueJS", "SQLite3", "Redis", "Gunicorn", "Cronjob"],
github: "#",
demo: "#"
},
{
title: "UAV Drone",
date: "Mar 2017",
description: "Assembled a quadcopter from scratch to demonstrate surveillance capabilities. Designed and integrated flight controllers, motors, and camera systems.",
tech: ["Quadcopter", "Flight Controller", "Electronics", "CAD"],
github: "#",
demo: "#"
}
];
const researchData = [
{
title: "Fast Yet Effective Machine Unlearning",
conference: "ACM Workshop 2024",
year: "2024",
abstract: "Presented implementation and demonstration of machine unlearning techniques for classification tasks on deep neural networks, based on the foundational work by Tarun et al.",
link: "#"
},
{
title: "Spectral Classification of Chandrayaan-2 IIRS Dataset",
conference: "Remote Sensing Analysis Project",
year: "2024",
abstract: "Developed a comprehensive pipeline for spectral classification of lunar surface data from Mare Moscoviense and Mare Gardner crater using advanced signal processing and deep learning techniques.",
link: "#"
}
];
const blogData = [
{
id: 0,
title: "My Resume / CV",
date: "February 8, 2026",
excerpt: "View or download my latest CV highlighting my education, experience, skills, and achievements.",
type: "pdf",
pdfUrl: "Shekhar_Mohanty_Hemant_CV.pdf"
},
{
id: 1,
title: "Getting Started with ROS2 Navigation Stack",
date: "December 15, 2024",
excerpt: "A comprehensive guide to setting up and using the ROS2 Navigation2 stack for autonomous robot navigation in simulated environments.",
content: "In this post, I'll walk you through the process of setting up ROS2 Navigation2 stack for autonomous robot navigation. We'll cover everything from installation to creating custom waypoints and handling obstacle avoidance.\n\nThe Navigation2 stack is a powerful tool that provides a complete navigation solution for mobile robots. It includes path planning, obstacle avoidance, and recovery behaviors.\n\nKey topics covered:\n- Setting up a Gazebo simulation environment\n- Configuring the Nav2 stack parameters\n- Creating custom waypoint following behavior\n- Integrating with sensor data from lidar and cameras\n\nThis is a placeholder for the full blog post content. In a production environment, this would contain detailed tutorials, code snippets, and images."
},
{
id: 2,
title: "Understanding Machine Unlearning: A Practical Approach",
date: "November 20, 2024",
excerpt: "Exploring the concept of machine unlearning and how to implement it effectively in deep neural networks for privacy-preserving AI.",
content: "Machine unlearning is an emerging field in AI that addresses the challenge of removing specific data from trained models without retraining from scratch.\n\nIn this post, we explore:\n- Why machine unlearning matters for privacy\n- The mathematical foundations behind unlearning\n- Implementation strategies using PyTorch\n- Real-world applications and challenges\n\nThis is a placeholder for the full blog post content. The actual implementation details and code examples would be included in the production version."
},
{
id: 3,
title: "Building IoT Solutions with ESP32 and MQTT",
date: "August 5, 2023",
excerpt: "Learn how to create a complete IoT home automation system using ESP32, MQTT protocol, and a Vue.js frontend for real-time control.",
content: "IoT (Internet of Things) has revolutionized how we interact with our homes and environments. In this tutorial, we'll build a complete home automation system.\n\nTopics covered:\n- Setting up ESP32 for WiFi connectivity\n- Understanding MQTT protocol for IoT\n- Building a responsive Vue.js dashboard\n- Integrating presence detection sensors\n\nThis is a placeholder for the full blog post content with code examples and circuit diagrams."
},
{
id: 4,
title: "My Journey: From Trade Apprentice to IIT Madras",
date: "January 10, 2023",
excerpt: "A personal reflection on my unconventional path from a trade apprentice in electronics to pursuing a degree in Data Science at IIT Madras.",
content: "Every journey has its unique path, and mine was far from conventional. After completing my trade apprenticeship at Shavak Nanavati Technical Institute, I never imagined I would one day be studying at IIT Madras.\n\nIn this personal post, I share:\n- My early experiences in electronics\n- The decision to pursue higher education\n- Balancing work at Tata Steel with studies\n- Lessons learned along the way\n\nThis is a placeholder for the full personal blog post content."
}
];
const achievementsData = [
"AIR 170 in GATE (Data Science and Artificial Intelligence) 2024 - Score: 739",
"1st Place in PLC Programming at CII National Workskill Competition 2019",
"Working with IFTR (through Tata Pro Engage) to create an application for collecting farmers' data from remote locations in Chennai"
];
// ===== Components =====
// Header Component
function Header({ activeTab, setActiveTab, theme, toggleTheme }) {
const tabs = [
{ id: 'about', label: 'About', icon: 'fa-user' },
{ id: 'projects', label: 'Projects / Demos', icon: 'fa-code' },
{ id: 'research', label: 'Research', icon: 'fa-flask' },
{ id: 'blog', label: 'Blog', icon: 'fa-pen' }
];
return (
<header className="header">
<div className="header-content">
<div className="logo">
<span className="logo-accent">.. ..</span>
</div>
<nav className="nav-links">
{tabs.map(tab => (
<button
key={tab.id}
className={`nav-link ${activeTab === tab.id ? 'active' : ''}`}
onClick={() => setActiveTab(tab.id)}
>
<i className={`fas ${tab.icon}`} style={{ marginRight: '0.5rem' }}></i>
{tab.label}
</button>
))}
<button className="theme-toggle" onClick={toggleTheme} title={`Switch to ${theme === 'dark' ? 'light' : 'dark'} mode`}>
<i className={`fas ${theme === 'dark' ? 'fa-sun' : 'fa-moon'}`}></i>
</button>
</nav>
</div>
</header>
);
}
// About Section Component
function AboutSection() {
return (
<section className="section">
<div className="about-hero">
<aside className="profile-sidebar">
<div className="profile-card">
<div className="profile-image">
<i className="fas fa-user"></i>
</div>
<h1 className="profile-name">{profileData.name}</h1>
<p className="profile-title">{profileData.title}</p>
<div className="contact-info">
<div className="contact-item">
<i className="fas fa-phone"></i>
<span>{profileData.phone}</span>
</div>
<div className="contact-item">
<i className="fas fa-envelope"></i>
<a href={`mailto:${profileData.email}`}>{profileData.email}</a>
</div>
<div className="contact-item">
<i className="fab fa-linkedin"></i>
<a href="https://linkedin.com" target="_blank" rel="noopener noreferrer">LinkedIn Profile</a>
</div>
<div className="contact-item">
<i className="fas fa-map-marker-alt"></i>
<span>{profileData.location}</span>
</div>
</div>
</div>
</aside>
<div className="about-content">
{/* Education */}
<div className="card">
<h2 className="card-title">
<i className="fas fa-graduation-cap"></i>
Education
</h2>
<div className="education-list">
{educationData.map((edu, index) => (
<div key={index} className="education-item">
<div className="education-degree">{edu.degree}</div>
<div className="education-school">{edu.school}</div>
<div className="education-details">
{edu.field} • {edu.period}
{edu.grade && ` • ${edu.grade}`}
</div>
</div>
))}
</div>
</div>
{/* Experience */}
<div className="card">
<h2 className="card-title">
<i className="fas fa-briefcase"></i>
Work Experience
</h2>
<div className="timeline">
{experienceData.map((exp, index) => (
<div key={index} className="timeline-item">
<div className="timeline-dot"></div>
<div className="timeline-date">{exp.period}</div>
<div className="timeline-title">{exp.title}</div>
<div className="timeline-company">{exp.company}</div>
<ul className="timeline-description">
{exp.description.map((item, i) => (
<li key={i}>{item}</li>
))}
</ul>
</div>
))}
</div>
</div>
{/* Skills */}
<div className="card">
<h2 className="card-title">
<i className="fas fa-tools"></i>
Skills
</h2>
<div className="skill-category">
<div className="skill-category-title">Programming Languages</div>
<div className="skills-container">
{skillsData.languages.map((skill, index) => (
<span key={index} className="skill-tag">{skill}</span>
))}
</div>
</div>
<div className="skill-category">
<div className="skill-category-title">Software & Tools</div>
<div className="skills-container">
{skillsData.software.map((skill, index) => (
<span key={index} className="skill-tag">{skill}</span>
))}
</div>
</div>
<div className="skill-category">
<div className="skill-category-title">Cloud & Certifications</div>
<div className="skills-container">
{skillsData.cloud.map((skill, index) => (
<span key={index} className="skill-tag">{skill}</span>
))}
</div>
</div>
<div className="skill-category">
<div className="skill-category-title">Other Skills</div>
<div className="skills-container">
{skillsData.other.map((skill, index) => (
<span key={index} className="skill-tag">{skill}</span>
))}
</div>
</div>
</div>
{/* Achievements */}
<div className="card">
<h2 className="card-title">
<i className="fas fa-trophy"></i>
Achievements & Volunteering
</h2>
<div className="achievements-list">
{achievementsData.map((achievement, index) => (
<div key={index} className="achievement-item">
<i className="fas fa-star"></i>
<span>{achievement}</span>
</div>
))}
</div>
</div>
</div>
</div>
</section>
);
}
// Projects Section Component
function ProjectsSection() {
return (
<section className="section">
<h2 className="section-title">
<i className="fas fa-code"></i>
Projects
</h2>
<div className="projects-grid">
{projectsData.map((project, index) => (
<div key={index} className="project-card">
<div className="project-header">
<i className="fas fa-folder-open project-icon"></i>
<div className="project-links">
<a href={project.github} className="project-link" title="GitHub">
<i className="fab fa-github"></i>
</a>
<a href={project.demo} className="project-link" title="Live Demo">
<i className="fas fa-external-link-alt"></i>
</a>
</div>
</div>
<h3 className="project-title">{project.title}</h3>
<div className="project-date">{project.date}</div>
<p className="project-description">{project.description}</p>
<div className="project-tech">
{project.tech.map((tech, i) => (
<span key={i} className="tech-tag">{tech}</span>
))}
</div>
</div>
))}
</div>
</section>
);
}
// Research Section Component
function ResearchSection() {
return (
<section className="section">
<h2 className="section-title">
<i className="fas fa-flask"></i>
Research Work
</h2>
<div className="research-list">
{researchData.map((research, index) => (
<div key={index} className="research-card">
<h3 className="research-title">{research.title}</h3>
<div className="research-meta">
<span>
<i className="fas fa-book"></i>
{research.conference}
</span>
<span>
<i className="fas fa-calendar"></i>
{research.year}
</span>
</div>
<p className="research-abstract">{research.abstract}</p>
<a href={research.link} className="research-link">
<i className="fas fa-file-pdf"></i>
View Publication
</a>
</div>
))}
</div>
</section>
);
}
// Blog Section Component
function BlogSection() {
const [selectedPost, setSelectedPost] = useState(null);
// Load blog posts and PDFs, using localStorage (admin) with hardcoded blogData as fallback
const [allPosts, setAllPosts] = useState(() => {
let posts = [];
const seenIds = new Set();
// 1. Load admin-saved blog posts
const savedBlogs = localStorage.getItem('portfolio_blogs');
if (savedBlogs) {
try {
JSON.parse(savedBlogs).forEach(b => {
if (!seenIds.has(b.id)) { seenIds.add(b.id); posts.push(b); }
});
} catch(e) { /* ignore */ }
}
// 2. Load admin-saved blog PDFs
const savedPdfs = localStorage.getItem('portfolio_blog_pdfs');
if (savedPdfs) {
try {
JSON.parse(savedPdfs).forEach(b => {
if (!seenIds.has(b.id)) { seenIds.add(b.id); posts.push(b); }
});
} catch(e) { /* ignore */ }
}
// 3. Fill in any hardcoded defaults not already present
blogData.forEach(b => {
if (!seenIds.has(b.id)) { seenIds.add(b.id); posts.push(b); }
});
return posts;
});
// Full-page blog post view
if (selectedPost) {
return (
<section className={`section blog-fullpage ${selectedPost.type === 'pdf' ? 'blog-fullpage-pdf' : ''}`}>
<button className="blog-back-btn" onClick={() => setSelectedPost(null)}>
<i className="fas fa-arrow-left"></i> Back to Blog
</button>
<article className="blog-full-article">
<header className="blog-full-header">
<div className="blog-full-date">
{selectedPost.type === 'pdf' && <i className="fas fa-file-pdf" style={{ marginRight: '0.5rem' }}></i>}
{selectedPost.date}
</div>
<h1 className="blog-full-title">{selectedPost.title}</h1>
</header>
{selectedPost.type === 'pdf' ? (
<div className="blog-full-body blog-pdf-body">
<iframe
src={selectedPost.pdfUrl}
className="blog-pdf-viewer"
title={selectedPost.title}
></iframe>
<a href={selectedPost.pdfUrl} target="_blank" rel="noopener noreferrer" className="pdf-download-link">
<i className="fas fa-download"></i> Open / Download PDF
</a>
</div>
) : (
<div className="blog-full-body">
{selectedPost.content.split('\n\n').map((paragraph, index) => (
<p key={index}>{paragraph}</p>
))}
</div>
)}
</article>
</section>
);
}
// Blog list view
return (
<section className="section">
<h2 className="section-title">
{/* <i className="fas fa-pen"></i> */}
{/* Personal Blog */}
</h2>
<div className="blog-list">
{allPosts.map((post) => (
<div
key={post.id}
className="blog-card"
onClick={() => setSelectedPost(post)}
>
<div className="blog-date">
{post.type === 'pdf' && <i className="fas fa-file-pdf" style={{ marginRight: '0.5rem' }}></i>}
{post.date}
</div>
<h3 className="blog-title">{post.title}</h3>
<p className="blog-excerpt">{post.excerpt}</p>
<span className="read-more">
{post.type === 'pdf' ? (
<>View PDF <i className="fas fa-file-pdf"></i></>
) : (
<>Read More <i className="fas fa-arrow-right"></i></>
)}
</span>
</div>
))}
</div>
</section>
);
}
// Footer Component
function Footer() {
return (
<footer className="footer">
<p>© {new Date().getFullYear()} Shekhar Mohanty Hemant. All rights reserved.</p>
<p style={{ marginTop: '0.5rem' }}>
Built with <i className="fas fa-heart" style={{ color: 'var(--accent-primary)' }}></i>
</p>
</footer>
);
}
// Main App Component
function App() {
const [activeTab, setActiveTab] = useState('about');
const [theme, toggleTheme] = useTheme();
// Handle URL hash for basic routing
useEffect(() => {
const hash = window.location.hash.slice(1);
if (['about', 'projects', 'research', 'blog'].includes(hash)) {
setActiveTab(hash);
}
}, []);
useEffect(() => {
window.location.hash = activeTab;
window.scrollTo({ top: 0, behavior: 'smooth' });
}, [activeTab]);
const renderSection = () => {
switch (activeTab) {
case 'about':
return <AboutSection />;
case 'projects':
return <ProjectsSection />;
case 'research':
return <ResearchSection />;
case 'blog':
return <BlogSection />;
default:
return <AboutSection />;
}
};
return (
<>
<Header activeTab={activeTab} setActiveTab={setActiveTab} theme={theme} toggleTheme={toggleTheme} />
<main className="main-container">
{renderSection()}
</main>
<Footer />
</>
);
}
// Render the App
const root = ReactDOM.createRoot(document.getElementById('root'));
root.render(<App />);