Skip to content

Commit 3ba9d84

Browse files
logo on menu, share page added
1 parent 82d0159 commit 3ba9d84

3 files changed

Lines changed: 40 additions & 4 deletions

File tree

src/components/ui/MobileMenu.tsx

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
import { motion, AnimatePresence } from 'framer-motion';
22
import { FiX, FiMail } from 'react-icons/fi';
33
import SocialLinks from './SocialLinks';
4+
import MyMind from '../../../public/android-chrome-512x512.png.png';
5+
import { Link } from 'react-router-dom';
6+
// info icon import
7+
import { FiInfo } from 'react-icons/fi';
48

59
// Local Type Definition
610
interface LinksData { github?: string; linkedin?: string; instagram?: string; portal?: string; }
@@ -18,7 +22,6 @@ export default function MobileMenu({ isOpen, onClose, scrollToSection, links }:
1822
{ id: 'projects', label: 'Projects' },
1923
{ id: 'skills', label: 'Skills' },
2024
{ id: 'journey', label: 'Journey' },
21-
// { id: 'contact', label: 'Contact' },
2225
];
2326

2427
const menuVariants = {
@@ -54,7 +57,20 @@ export default function MobileMenu({ isOpen, onClose, scrollToSection, links }:
5457
onClick={(e) => e.stopPropagation()}
5558
>
5659
<div className="flex justify-between items-center p-6 border-b border-slate-200 flex-shrink-0">
57-
<h2 className="font-bold text-lg text-slate-800">Menu</h2>
60+
<div className="flex items-center gap-1.5">
61+
<img src={MyMind} alt="MyMind Logo" className="h-9 w-9" />
62+
<div>
63+
<h2 className="font-bold text-lg text-slate-800">MyMind</h2>
64+
<div className="flex items-center gap-1.5">
65+
<p className="text-sm text-slate-500 flex">
66+
powered by Nyra.ai
67+
</p>
68+
<Link to="/nyra">
69+
<FiInfo className="text-slate-700 hover:text-slate-900 h-3.5 w-3.5" title="Learn more about Nyra.ai"/>
70+
</Link>
71+
</div>
72+
</div>
73+
</div>
5874
<button onClick={onClose} className="p-1 text-slate-500 hover:text-slate-900">
5975
<FiX size={24} />
6076
</button>

src/layouts/SubPageLayout.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import { Outlet, useNavigate } from 'react-router-dom';
22
import { FiArrowLeft } from 'react-icons/fi';
33
import Footer from './Footer';
4+
import NyraChatbot from '../components/NyraChatbot';
45

56
export default function SubPageLayout() {
67
const navigate = useNavigate();
@@ -22,6 +23,7 @@ export default function SubPageLayout() {
2223
{/* The child page (e.g., ProjectsPage) will be rendered here */}
2324
<Outlet />
2425
</main>
26+
<NyraChatbot />
2527
<Footer />
2628
</div>
2729
);

src/pages/ProjectDetailPage.tsx

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ import { useState } from 'react';
1212
import { generateAIDescription_Public } from '../services/aiService';
1313
import toast from 'react-hot-toast';
1414
import Nyra from '../assets/NyraAI.png';
15+
import { FiShare2 } from 'react-icons/fi';
1516

1617
interface Member { id: string; name: string; profileImage?: string | null; githubLink?: string; linkedinLink?: string; }
1718
interface ProjectMember { id: string; role: string; member: Member; }
@@ -22,6 +23,18 @@ interface AiSummaryProps {
2223
existingAiDescription: string;
2324
}
2425

26+
const onShare = () => {
27+
const shareData = {
28+
title: document.title,
29+
text: 'Check out this project on MyMind!',
30+
url: window.location.href
31+
};
32+
33+
navigator.share(shareData).catch((error) => {
34+
console.error('Error sharing:', error);
35+
});
36+
};
37+
2538
const SummarySkeleton = () => (
2639
<div className="space-y-3">
2740
<div className="h-4 bg-slate-200/80 rounded w-3/4 animate-pulse"></div>
@@ -148,9 +161,14 @@ export default function ProjectDetailPage() {
148161
<main className="sm:px-4 lg:px-6 py-6">
149162
<div className="container mx-auto px-6">
150163
<motion.div initial={{opacity: 0, y: 20}} animate={{opacity: 1, y: 0}} transition={{duration: 0.5}}>
151-
<div className="text-center">
164+
<div className="flex flex-col items-center text-center">
152165
<span className="text-sm font-bold text-blue-600 uppercase tracking-widest">{project.category.name}</span>
153-
<h1 className="text-4xl md:text-5xl font-extrabold text-slate-900 mt-2">{project.name}</h1>
166+
<div className="w-fit relative">
167+
<h1 className="text-4xl md:text-5xl font-extrabold text-slate-900 mt-2">{project.name}</h1>
168+
<button onClick={onShare} className="cursor-pointer absolute top-1 -right-4 text-slate-500 hover:text-slate-900" title="Share Project">
169+
<FiShare2 />
170+
</button>
171+
</div>
154172
<p className="text-slate-500 mt-3 flex items-center justify-center gap-2">
155173
<FiCalendar/>
156174
<span>{formatDate(project.startDate)} - {project.endDate ? formatDate(project.endDate) : 'Present'}</span>

0 commit comments

Comments
 (0)