page_fancy.tsx 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113
  1. // src/app/page.tsx
  2. 'use client'
  3. import { useRouter } from 'next/navigation'
  4. import { ArrowRight, Github, Twitter, Moon, Sun } from 'lucide-react'
  5. import Image from 'next/image'
  6. import byom from '@/app/assets/byom.png'
  7. import { useTheme } from '@/contexts/themecontext'
  8. export default function HomePage() {
  9. const router = useRouter()
  10. const { theme, toggleTheme } = useTheme();
  11. return (
  12. <div className={`min-h-screen ${theme === 'dark' ? 'bg-gray-900' : 'bg-gray-50'} flex flex-col relative`}>
  13. {/* Theme Toggle Button */}
  14. <button
  15. onClick={toggleTheme}
  16. className={`absolute top-4 right-4 p-2 rounded-lg ${
  17. theme === 'dark'
  18. ? 'bg-gray-800 hover:bg-gray-700'
  19. : 'bg-white hover:bg-gray-100'
  20. } transition-colors shadow-lg`}
  21. aria-label="Toggle theme"
  22. >
  23. {theme === 'dark' ? (
  24. <Sun className="w-5 h-5 text-yellow-500" />
  25. ) : (
  26. <Moon className="w-5 h-5 text-gray-600" />
  27. )}
  28. </button>
  29. {/* Navigation */}
  30. <nav className="p-4">
  31. <div className="max-w-7xl mx-auto flex justify-between items-center">
  32. <div className="w-32">
  33. <Image
  34. src={byom}
  35. alt="BYOM"
  36. width={100}
  37. className={`${theme === 'dark' ? '' : 'invert'} transition-all duration-300`}
  38. />
  39. </div>
  40. <div className="flex gap-4">
  41. <button
  42. onClick={() => router.push('/login')}
  43. className={`px-4 py-2 rounded-lg ${
  44. theme === 'dark'
  45. ? 'text-gray-300 hover:text-white'
  46. : 'text-gray-700 hover:text-gray-900'
  47. } transition-colors`}
  48. >
  49. Se connecter
  50. </button>
  51. <button
  52. onClick={() => router.push('/register')}
  53. className="px-4 py-2 rounded-lg bg-blue-500 text-white hover:bg-blue-600 transition-colors"
  54. >
  55. S&apos;inscrire
  56. </button>
  57. </div>
  58. </div>
  59. </nav>
  60. {/* Hero Section */}
  61. <main className="flex-1 flex flex-col items-center justify-center px-4 text-center">
  62. <h1 className={`text-5xl font-bold mb-6 ${theme === 'dark' ? 'text-white' : 'text-gray-900'}`}>
  63. Gérez vos réseaux sociaux <br />
  64. <span className="text-blue-500">en toute simplicité</span>
  65. </h1>
  66. <p className={`text-xl mb-8 max-w-2xl ${theme === 'dark' ? 'text-gray-400' : 'text-gray-600'}`}>
  67. Planifiez, analysez et optimisez votre présence sur les réseaux sociaux avec notre plateforme tout-en-un.
  68. </p>
  69. <div className="flex gap-4">
  70. <button
  71. onClick={() => router.push('/register')}
  72. className="px-6 py-3 rounded-lg bg-blue-500 text-white hover:bg-blue-600 transition-colors flex items-center gap-2"
  73. >
  74. Commencer gratuitement
  75. <ArrowRight className="w-4 h-4" />
  76. </button>
  77. <button
  78. onClick={() => router.push('/demo')}
  79. className={`px-6 py-3 rounded-lg ${
  80. theme === 'dark'
  81. ? 'bg-gray-800 text-gray-300 hover:bg-gray-700'
  82. : 'bg-white text-gray-700 hover:bg-gray-100'
  83. } transition-colors`}
  84. >
  85. Voir la démo
  86. </button>
  87. </div>
  88. </main>
  89. {/* Footer */}
  90. <footer className={`p-8 ${theme === 'dark' ? 'border-t border-gray-800' : 'border-t border-gray-200'}`}>
  91. <div className="max-w-7xl mx-auto flex justify-between items-center">
  92. <p className={`text-sm ${theme === 'dark' ? 'text-gray-400' : 'text-gray-600'}`}>
  93. © 2024 BYOM. Tous droits réservés.
  94. </p>
  95. <div className="flex gap-4">
  96. <a href="#" className={`${theme === 'dark' ? 'text-gray-400 hover:text-white' : 'text-gray-600 hover:text-gray-900'} transition-colors`}>
  97. <Github className="w-5 h-5" />
  98. </a>
  99. <a href="#" className={`${theme === 'dark' ? 'text-gray-400 hover:text-white' : 'text-gray-600 hover:text-gray-900'} transition-colors`}>
  100. <Twitter className="w-5 h-5" />
  101. </a>
  102. </div>
  103. </div>
  104. </footer>
  105. </div>
  106. )
  107. }