diff --git a/create-readme.sh b/create-readme.sh deleted file mode 100755 index 71d36a1..0000000 --- a/create-readme.sh +++ /dev/null @@ -1,110 +0,0 @@ -#!/bin/bash - -cat > README.md << 'EOL' -# DeafGain LLC Website 🌐 - -[![PNPM](https://img.shields.io/badge/package%20manager-pnpm-f69220.svg)](https://pnpm.io/) -[![TypeScript](https://img.shields.io/badge/TypeScript-4.9.5-blue.svg)](https://www.typescriptlang.org/) -[![React](https://img.shields.io/badge/React-18.2.0-61dafb.svg)](https://reactjs.org/) - -## Overview - -A dynamic web platform dedicated to empowering the Deaf community through innovative communication solutions, training, and accessibility services. This website serves as the digital presence for DeafGain LLC, showcasing our comprehensive services including ADA-compliant transcripts, universal website design, board communication protocols, and leadership training. - -## πŸš€ Quick Start - -\`\`\`bash -pnpm install -pnpm dev -\`\`\` - -Visit \`localhost:3000\` in your browser. - -## πŸ›  Technical Stack - -| Technology | Version | Purpose | -|------------|---------|---------| -| React | 18.2.0 | Core Framework | -| TypeScript | 4.9.5 | Type Safety | -| Tailwind CSS | 3.x | Styling | -| Framer Motion | 10.x | Animations | -| React Simple Maps | 3.0.0 | Geographic Visualization | -| Vite | 4.x | Build System | -| Docker | - | Containerization | -| Nginx | - | Web Server | - -## πŸ“ Project Structure - -\`\`\` -src/ -β”œβ”€β”€ components/ # Reusable UI components -β”‚ β”œβ”€β”€ layout/ # Layout components -β”‚ β”œβ”€β”€ ui/ # UI elements -β”‚ └── maps/ # Map visualization components -β”œβ”€β”€ pages/ # Main application pages -β”œβ”€β”€ hooks/ # Custom React hooks -β”œβ”€β”€ utils/ # Utility functions -β”œβ”€β”€ types/ # TypeScript definitions -β”œβ”€β”€ assets/ # Static assets -└── styles/ # Global styles -\`\`\` - -## 🎯 Core Features - -- ⚑️ Intuitive user interface with responsive design -- πŸ—ΊοΈ Interactive USA region map displaying network and relationships -- πŸŽ₯ Video resources with accessible playback controls and captions -- πŸ“± Mobile-first responsive design -- πŸ”’ Secure contact system -- 🌐 Key sections: Home, Services, About, Resources, and Contact - -## πŸ”§ Development - -### Environment Setup -- Development: Vite dev server with hot reload -- Production: Nginx configuration with optimized cache settings -- Docker containers for consistent deployment - -### Scripts -\`\`\`bash -pnpm dev # Start development server -pnpm build # Build for production -pnpm preview # Preview production build -pnpm lint # Run ESLint -pnpm test # Run tests -\`\`\` - -## 🚒 Production Deployment - -\`\`\`bash -docker-compose up --build -\`\`\` - -Application will be served on port 80. - -## οΏ½οΏ½ Contributing - -We welcome contributions that align with our mission of improving accessibility and empowerment for the Deaf community. Follow our established patterns for: - -- Component architecture -- Styling conventions (Tailwind CSS) -- Accessibility standards (WCAG 2.1) -- TypeScript typing -- Git commit messages - -## πŸ“„ License - -Proprietary - DeafGain LLC - -## πŸ“ž Contact - -For questions or support, reach out through our [contact form](https://deafgain.com/contact). - ---- - -> This website represents DeafGain LLC's commitment to creating accessible, user-friendly digital experiences while maintaining high technical standards and professional quality. -EOL - -chmod +x create-readme.sh -echo "README.md has been created successfully!" - diff --git a/docker-compose.yml-backup b/docker-compose.yml-backup deleted file mode 100644 index 01e347d..0000000 --- a/docker-compose.yml-backup +++ /dev/null @@ -1,46 +0,0 @@ -services: - web: - build: - context: . - dockerfile: Dockerfile - pull_policy: build - ports: - - "804:804" - depends_on: - - api - volumes: - - ./logs:/var/log/nginx - - type: bind - source: /docker/websites/deafgain/video_content - target: /usr/share/nginx/html/videos - environment: - - NODE_ENV=production - - PORT=804 - restart: unless-stopped - networks: - - caddy_network - - api: - build: - context: . - dockerfile: Dockerfile.api - volumes: - - ./logs:/app/logs - environment: - - NODE_ENV=production - - PORT=3000 - - SMTP_HOST=${SMTP_HOST} - - SMTP_PORT=${SMTP_PORT} - - SMTP_SECURE=${SMTP_SECURE} - - RECIPIENT_EMAIL=${RECIPIENT_EMAIL} - - GOOGLE_EMAIL=${GOOGLE_EMAIL} - - GOOGLE_APP_PASSWORD=${GOOGLE_APP_PASSWORD} - - UPSTASH_REDIS_REST_URL=${UPSTASH_REDIS_REST_URL} - - UPSTASH_REDIS_REST_TOKEN=${UPSTASH_REDIS_REST_TOKEN} - restart: unless-stopped - networks: - - caddy_network - -networks: - caddy_network: - external: true diff --git a/src/components/Layout/Navbar.tsx b/src/components/Layout/Navbar.tsx index 2a16231..f76d494 100644 --- a/src/components/Layout/Navbar.tsx +++ b/src/components/Layout/Navbar.tsx @@ -1,11 +1,13 @@ -import { useState } from 'react' -import { Link } from 'react-router-dom' -import { motion } from 'framer-motion' +import { useState, useEffect, useRef } from 'react' +import { Link, useLocation } from 'react-router-dom' +import { motion, AnimatePresence } from 'framer-motion' import { HiMenu, HiX } from 'react-icons/hi' const Navbar = () => { const [isOpen, setIsOpen] = useState(false) - + const menuRef = useRef(null) + const location = useLocation() + const navItems = [ { name: 'Home', path: '/' }, { name: 'Services', path: '/services' }, @@ -14,11 +16,31 @@ const Navbar = () => { { name: 'Contact', path: '/contact' } ] + useEffect(() => { + const handleClickOutside = (event: MouseEvent) => { + if (menuRef.current && !menuRef.current.contains(event.target as Node)) { + setIsOpen(false) + } + } + + document.addEventListener('mousedown', handleClickOutside) + return () => document.removeEventListener('mousedown', handleClickOutside) + }, []) + + // Close mobile menu when route changes + useEffect(() => { + setIsOpen(false) + }, [location]) + return ( -