Skip to content

Commit b1193cb

Browse files
committed
style: full app mobile optimization pass, including responsive navigations and layouts
1 parent 9ba5804 commit b1193cb

File tree

6 files changed

+94
-28
lines changed

6 files changed

+94
-28
lines changed

Frontend/src/pages/AdminLobby.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ function AdminLobby() {
9595
<div className="absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 w-[600px] h-[600px] bg-emerald-600/10 rounded-full blur-[120px] pointer-events-none" />
9696
<div className="absolute top-0 left-0 w-full h-full bg-[url('https://grainy-gradients.vercel.app/noise.svg')] opacity-[0.03] pointer-events-none"></div>
9797

98-
<div className="w-full max-w-lg bg-white/[0.03] border border-white/[0.08] rounded-3xl p-8 md:p-12 shadow-2xl backdrop-blur-xl relative z-10 text-center">
98+
<div className="w-full max-w-lg bg-white/[0.03] border border-white/[0.08] rounded-3xl p-6 sm:p-10 md:p-12 shadow-2xl backdrop-blur-xl relative z-10 text-center">
9999

100100
{isTransitioning ? (
101101
<div className="py-8 animate-in fade-in slide-in-from-bottom-4 duration-500">

Frontend/src/pages/LandingPage.jsx

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -325,16 +325,16 @@ export default function LandingPage() {
325325
</nav>
326326

327327
{/* ==================== HERO ==================== */}
328-
<section className="relative pt-20 pb-32 overflow-hidden">
329-
<div className="absolute top-0 left-1/2 -translate-x-1/2 w-full h-[600px] bg-gradient-to-b from-green-50/80 to-transparent pointer-events-none -z-10" />
328+
<section className="relative pt-12 md:pt-20 pb-20 md:pb-32 overflow-hidden">
329+
<div className="absolute top-0 left-1/2 -translate-x-1/2 w-full h-[300px] md:h-[600px] bg-gradient-to-b from-green-50/80 to-transparent pointer-events-none -z-10" />
330330

331331
<div className="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 text-center relative z-10">
332332
<div className="inline-flex items-center gap-2 px-3 py-1.5 rounded-full bg-emerald-50 border border-emerald-100 text-emerald-700 text-xs font-bold uppercase tracking-wider mb-8">
333333
<Activity className="w-3 h-3" />
334334
<span>AI-Powered Helpdesk Automation · Made in India 🇮🇳</span>
335335
</div>
336336

337-
<h1 className="text-5xl md:text-7xl font-extrabold text-gray-900 tracking-tight mb-6 leading-[1.1]">
337+
<h1 className="text-4xl sm:text-5xl md:text-7xl font-extrabold text-gray-900 tracking-tight mb-6 leading-[1.1]">
338338
Your IT Helpdesk,<br />
339339
<span className="text-emerald-700">Fully Automated.</span>
340340
</h1>
@@ -613,19 +613,19 @@ export default function LandingPage() {
613613
</section>
614614

615615
{/* ==================== HOW IT WORKS ==================== */}
616-
<section className="bg-emerald-950 py-32 text-white relative overflow-hidden" id="how-it-works">
616+
<section className="bg-emerald-950 py-16 md:py-32 text-white relative overflow-hidden" id="how-it-works">
617617
{/* Background Decorations */}
618618
<div className="absolute top-0 right-0 w-96 h-96 bg-emerald-500/5 blur-[120px] rounded-full -translate-y-1/2 translate-x-1/2 pointer-events-none" />
619619
<div className="absolute bottom-0 left-0 w-96 h-96 bg-emerald-500/5 blur-[120px] rounded-full translate-y-1/2 -translate-x-1/2 pointer-events-none" />
620620

621621
<div className="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 relative z-10">
622-
<div className="flex flex-col lg:flex-row gap-16 lg:items-center">
622+
<div className="flex flex-col lg:flex-row gap-8 lg:gap-16 lg:items-center">
623623
{/* Left: Content */}
624624
<div className="w-full lg:w-1/2">
625-
<div className="inline-flex items-center gap-2 px-3 py-1 bg-emerald-500/10 text-emerald-400 rounded-full text-xs font-bold uppercase tracking-widest border border-emerald-500/20 mb-6">
625+
<div className="inline-flex items-center gap-2 px-3 py-1 bg-emerald-500/10 text-emerald-400 rounded-full text-[10px] md:text-xs font-bold uppercase tracking-widest border border-emerald-500/20 mb-4 md:mb-6">
626626
The Journey
627627
</div>
628-
<h2 className="text-4xl md:text-6xl font-black text-white tracking-tight leading-[0.9] mb-12 italic uppercase">
628+
<h2 className="text-3xl sm:text-4xl md:text-6xl font-black text-white tracking-tight leading-[0.9] mb-8 md:mb-12 italic uppercase">
629629
From Chaos <br />
630630
to <span className="text-emerald-500">Clarity.</span>
631631
</h2>
@@ -641,8 +641,8 @@ export default function LandingPage() {
641641
: 'bg-transparent border-transparent hover:bg-white/5 opacity-40 hover:opacity-100'
642642
}`}
643643
>
644-
<div className="flex items-start gap-6">
645-
<div className={`shrink-0 w-12 h-12 rounded-2xl flex items-center justify-center font-black text-xl italic transition-all duration-500 ${activeStep === idx ? 'bg-emerald-500 text-white shadow-lg shadow-emerald-500/20 rotate-12 scale-110' : 'bg-white/10 text-white/40'}`}>
644+
<div className="flex items-start gap-4 md:gap-6">
645+
<div className={`shrink-0 w-10 md:w-12 h-10 md:h-12 rounded-xl md:rounded-2xl flex items-center justify-center font-black text-lg md:text-xl italic transition-all duration-500 ${activeStep === idx ? 'bg-emerald-500 text-white shadow-lg shadow-emerald-500/20 rotate-12 scale-110' : 'bg-white/10 text-white/40'}`}>
646646
{step.num}
647647
</div>
648648
<div>
@@ -666,8 +666,8 @@ export default function LandingPage() {
666666
</div>
667667

668668
{/* Right: Visual Display */}
669-
<div className="w-full lg:w-1/2 h-[500px] relative">
670-
<div className="absolute inset-0 bg-gradient-to-br from-emerald-500/10 to-transparent rounded-[40px] border border-white/5 backdrop-blur-3xl overflow-hidden p-12 flex items-center justify-center">
669+
<div className="w-full lg:w-1/2 h-[350px] md:h-[500px] relative">
670+
<div className="absolute inset-0 bg-gradient-to-br from-emerald-500/10 to-transparent rounded-[32px] md:rounded-[40px] border border-white/5 backdrop-blur-3xl overflow-hidden p-6 md:p-12 flex items-center justify-center">
671671
<AnimatePresence mode="wait">
672672
<motion.div
673673
key={activeStep}

Frontend/src/pages/Signup.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,7 @@ function Signup() {
222222
</Link>
223223
</div>
224224

225-
<div className="bg-white shadow-2xl shadow-emerald-900/50 rounded-3xl p-8 border border-gray-100">
225+
<div className="bg-white shadow-2xl shadow-emerald-900/50 rounded-3xl p-6 sm:p-8 border border-gray-100">
226226
<div className="text-center mb-8">
227227
<h2 className="text-2xl font-bold text-gray-900">Create Account</h2>
228228
<p className="text-gray-500 mt-1">Start automating your IT support today</p>

Frontend/src/pages/TicketDetailView.jsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ function TicketDetailView() {
8888
};
8989

9090
return (
91-
<main className="flex-1 w-full max-w-[1100px] mx-auto px-6 py-10 flex flex-col gap-8">
91+
<main className="flex-1 w-full max-w-[1100px] mx-auto px-4 md:px-6 py-6 md:py-10 flex flex-col gap-6 md:gap-8">
9292
<div className="w-full">
9393
<button
9494
onClick={() => navigate('/my-tickets')}
@@ -145,7 +145,7 @@ function TicketDetailView() {
145145
<CardContent className="p-8 space-y-6">
146146
<div>
147147
<label className="text-[10px] font-black text-gray-400 uppercase tracking-widest block mb-1">Ticket ID</label>
148-
<p className="text-2xl font-mono font-black text-emerald-900 tracking-wider">#{ticket.ticket_id}</p>
148+
<p className="text-xl md:text-2xl font-mono font-black text-emerald-900 tracking-wider">#{ticket.ticket_id}</p>
149149
</div>
150150
<div>
151151
<label className="text-[10px] font-black text-gray-400 uppercase tracking-widest block mb-1">Summary</label>

Frontend/src/pages/UserLobby.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ function UserLobby() {
8383
{/* Ambient glow - Emerald theme */}
8484
<div className="absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 w-[600px] h-[600px] bg-emerald-600/5 rounded-full blur-[120px] pointer-events-none" />
8585

86-
<div className="w-full max-w-lg bg-white border border-gray-100 rounded-3xl p-8 md:p-12 shadow-2xl relative z-10 text-center">
86+
<div className="w-full max-w-lg bg-white border border-gray-100 rounded-3xl p-6 sm:p-10 md:p-12 shadow-2xl relative z-10 text-center">
8787
{isTransitioning ? (
8888
<div className="py-8 animate-in fade-in slide-in-from-bottom-4 duration-500">
8989
<div className="w-20 h-20 rounded-full bg-emerald-50 border-2 border-emerald-500 flex items-center justify-center mx-auto mb-6 shadow-sm">

Frontend/src/user/components/TopNav.jsx

Lines changed: 78 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import React from 'react';
2-
import { Bell, Box, CheckCircle2, MessageSquare } from 'lucide-react';
1+
import React, { useState } from 'react';
2+
import { Bell, Box, CheckCircle2, MessageSquare, Menu, X, LogOut, User as UserIcon } from 'lucide-react';
33
import { Link, useNavigate } from 'react-router-dom';
44
import { Avatar, AvatarFallback, AvatarImage } from "../../components/ui/avatar";
55
import { Button } from "../../components/ui/button";
@@ -12,16 +12,23 @@ import useAuthStore from "../../store/authStore";
1212
const TopNav = () => {
1313
const navigate = useNavigate();
1414
const { notifications = [], markNotificationsRead } = useTicketStore();
15-
const { profile } = useAuthStore();
15+
const { profile, logout } = useAuthStore();
16+
const [isMenuOpen, setIsMenuOpen] = useState(false);
17+
1618
const initials = profile?.full_name ? profile.full_name[0].toUpperCase() : (profile?.email ? profile.email[0].toUpperCase() : 'U');
1719

20+
const handleLogout = async () => {
21+
await logout();
22+
navigate('/login');
23+
};
24+
1825
const unreadCount = notifications.filter(n => !n.read).length;
1926

2027
return (
2128
<header className="w-full bg-white border-b border-gray-200 sticky top-0 z-50">
22-
<div className="max-w-[1100px] mx-auto px-6 h-16 flex items-center justify-between">
29+
<div className="max-w-[1100px] mx-auto px-4 md:px-6 h-16 flex items-center justify-between">
2330
{/* Left: Logo */}
24-
<div className="flex items-center gap-3">
31+
<div className="flex items-center gap-3 cursor-pointer" onClick={() => navigate('/dashboard')}>
2532
<div className="flex items-center justify-center overflow-hidden">
2633
<img src="/favicon.png" alt="HELPDESK.AI Logo" className="w-7 h-7 object-contain" />
2734
</div>
@@ -36,17 +43,76 @@ const TopNav = () => {
3643
</nav>
3744

3845
{/* Right: Profile */}
39-
<div className="flex items-center gap-4">
46+
<div className="flex items-center gap-3">
4047
<NotificationPopover />
41-
<Avatar
42-
onClick={() => navigate('/profile')}
43-
className="size-9 border border-gray-200 cursor-pointer hover:ring-2 hover:ring-emerald-500 hover:ring-offset-2 transition-all"
48+
<div className="hidden md:block">
49+
<Avatar
50+
onClick={() => navigate('/profile')}
51+
className="size-9 border border-gray-200 cursor-pointer hover:ring-2 hover:ring-emerald-500 hover:ring-offset-2 transition-all"
52+
>
53+
<AvatarImage src={profile?.profile_picture} />
54+
<AvatarFallback className="bg-gray-100 font-bold text-gray-600 text-xs">{initials}</AvatarFallback>
55+
</Avatar>
56+
</div>
57+
<button
58+
onClick={() => setIsMenuOpen(!isMenuOpen)}
59+
className="md:hidden p-2 text-gray-600 focus:outline-none"
4460
>
45-
<AvatarImage src={profile?.profile_picture} />
46-
<AvatarFallback className="bg-gray-100 font-bold text-gray-600 text-xs">{initials}</AvatarFallback>
47-
</Avatar>
61+
{isMenuOpen ? <X size={24} /> : <Menu size={24} />}
62+
</button>
4863
</div>
4964
</div>
65+
66+
{/* Mobile Menu Overlay */}
67+
{isMenuOpen && (
68+
<div className="md:hidden bg-white border-t border-gray-100 absolute w-full shadow-2xl z-50 animate-in fade-in slide-in-from-top-2 duration-200">
69+
<div className="px-6 py-8 space-y-6">
70+
<div className="flex items-center gap-4 border-b border-gray-50 pb-6">
71+
<Avatar className="size-12 border border-gray-100">
72+
<AvatarImage src={profile?.profile_picture} />
73+
<AvatarFallback className="bg-emerald-50 text-emerald-700 font-black">{initials}</AvatarFallback>
74+
</Avatar>
75+
<div>
76+
<p className="font-bold text-gray-900">{profile?.full_name}</p>
77+
<p className="text-xs text-gray-400 font-medium">{profile?.email}</p>
78+
</div>
79+
</div>
80+
81+
<div className="space-y-4">
82+
<Link
83+
to="/dashboard"
84+
onClick={() => setIsMenuOpen(false)}
85+
className="flex items-center gap-3 text-lg font-bold text-gray-700 hover:text-emerald-700 transition-colors"
86+
>
87+
<Box size={20} className="text-gray-400" /> Dashboard
88+
</Link>
89+
<Link
90+
to="/my-tickets"
91+
onClick={() => setIsMenuOpen(false)}
92+
className="flex items-center gap-3 text-lg font-bold text-gray-700 hover:text-emerald-700 transition-colors"
93+
>
94+
<MessageSquare size={20} className="text-gray-400" /> My Tickets
95+
</Link>
96+
<Link
97+
to="/profile"
98+
onClick={() => setIsMenuOpen(false)}
99+
className="flex items-center gap-3 text-lg font-bold text-gray-700 hover:text-emerald-700 transition-colors"
100+
>
101+
<UserIcon size={20} className="text-gray-400" /> My Profile
102+
</Link>
103+
</div>
104+
105+
<div className="pt-6 border-t border-gray-50">
106+
<button
107+
onClick={handleLogout}
108+
className="w-full py-4 bg-gray-50 rounded-2xl flex items-center justify-center gap-2 text-red-600 font-bold active:scale-95 transition-all"
109+
>
110+
<LogOut size={18} /> Sign Out
111+
</button>
112+
</div>
113+
</div>
114+
</div>
115+
)}
50116
</header>
51117
);
52118
};

0 commit comments

Comments
 (0)