diff --git a/app/src/components/layout/Footer.tsx b/app/src/components/layout/Footer.tsx index e4348d5..5fae9d6 100644 --- a/app/src/components/layout/Footer.tsx +++ b/app/src/components/layout/Footer.tsx @@ -1,5 +1,5 @@ import { useEffect, useState } from 'react'; -import { Mail, Phone, MapPin, ChevronDown } from 'lucide-react'; +import { Mail, MapPin, ChevronDown } from 'lucide-react'; import { Link, useNavigate } from 'react-router-dom'; type Profile = { department?: string; hostel?: string; building?: string } | null; @@ -137,20 +137,11 @@ export function Footer() {
  • - - +91-1972-254011 - -
  • -
  • - - registrar@nith.ac.in + admin.cccms@nith.ac.in
  • diff --git a/app/src/components/layout/Navbar.tsx b/app/src/components/layout/Navbar.tsx index 1ce1070..a5e1208 100644 --- a/app/src/components/layout/Navbar.tsx +++ b/app/src/components/layout/Navbar.tsx @@ -1,5 +1,5 @@ import { useEffect, useState } from 'react'; -import { ChevronDown, Menu, X, User } from 'lucide-react'; +import { ChevronDown, Menu, X, User, LogOut } from 'lucide-react'; import { Link } from 'react-router-dom'; export function Navbar() { @@ -25,6 +25,11 @@ export function Navbar() { setLoginDropdownOpen(false); }; + const handleLogout = async () => { + try { await fetch('/api/auth/logout', { method: 'POST' }); } catch { /* ignore */ } + window.location.href = '/'; + }; + return ( diff --git a/app/src/pages/Landing.tsx b/app/src/pages/Landing.tsx index e4449ed..091e28a 100644 --- a/app/src/pages/Landing.tsx +++ b/app/src/pages/Landing.tsx @@ -14,8 +14,10 @@ function getPostRoute(profile: NonNullable): string { export function Landing() { const [profile, setProfile] = useState(null); const [isAuth, setIsAuth] = useState(null); - const [showLoginMenu, setShowLoginMenu] = useState(false); + const [showLoginMenu, setShowLoginMenu] = useState(false); + const [showSignupMenu, setShowSignupMenu] = useState(false); const menuRef = useRef(null); + const signupMenuRef = useRef(null); const navigate = useNavigate(); useEffect(() => { @@ -33,6 +35,9 @@ export function Landing() { if (menuRef.current && !menuRef.current.contains(e.target as Node)) { setShowLoginMenu(false); } + if (signupMenuRef.current && !signupMenuRef.current.contains(e.target as Node)) { + setShowSignupMenu(false); + } } document.addEventListener('mousedown', handleClick); return () => document.removeEventListener('mousedown', handleClick); @@ -51,7 +56,7 @@ export function Landing() { {/* Hero */} -
    +
    @@ -88,120 +93,35 @@ export function Landing() {
    -
    - -
    - - {/* Main Content */} -
    -
    - - {/* Portal Access — first in DOM so it's top on mobile; pushed to col 3 on desktop */} -
    -
    - Portal Access -
    -
    - {isAuth === true && ( - +
    - - {/* Notices — col 1 on desktop */} -
    -
    - Estate Office Notices - -
    -
    - {[ - { tag: 'Urgent', tagBg: '#FCEBEA', title: 'Scheduled power outage in Main Admin Block due to HT panel maintenance.', date: '20 May 2026' }, - { tag: 'New', tagBg: '#E6F7ED', title: 'Water supply disruption in Kailash Boys Hostel for pipe repair work.', date: '18 May 2026' }, - { tag: 'Info', tagBg: '#E8F4F9', title: 'Annual AC servicing schedule released for Departmental Buildings.', date: '15 May 2026' }, - { tag: 'Notice', tagBg: '#F5F5F5', title: 'Road resurfacing work to begin near Admin block from June 1st.', date: '12 May 2026' }, - ].map(({ tag, tagBg, title, date }) => ( -
    - - {tag} - -

    {title}

    - {date} -
    - ))} -
    -
    - - {/* Filing Guidelines — col 2 on desktop */} -
    -
    - Filing Guidelines -
    -
    - {[ - { step: '01', text: 'Select the correct category — Civil or Electrical — to ensure proper routing.' }, - { step: '02', text: 'Provide the exact building and room number in the complaint description.' }, - { step: '03', text: 'Only Wardens may file complaints for hostel common areas.' }, - { step: '04', text: 'Do not file duplicate complaints for the same issue.' }, - ].map(({ step, text }) => ( -
    - {step} -

    {text}

    + + Signup as Faculty / Staff + + + Signup as Warden + + + Signup as Centre Head +
    - ))} - - Read Complete Manual - -
    +
    + )}
    -
    -
    +
    );