index.tsx 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. import { createRoot } from 'react-dom/client'
  2. import { getGlobalConfig } from '../utils/utils'
  3. const Home = () => {
  4. return (
  5. <div className="min-h-screen bg-gray-50 flex items-center justify-center py-12 px-4 sm:px-6 lg:px-8">
  6. <div className="max-w-md w-full space-y-8">
  7. {/* 系统介绍区域 */}
  8. <div className="text-center">
  9. <h1 className="text-4xl font-bold text-gray-900 mb-4">
  10. {getGlobalConfig('APP_NAME')}
  11. </h1>
  12. <p className="text-lg text-gray-600 mb-8">
  13. 全功能应用Starter
  14. </p>
  15. <p className="text-base text-gray-500 mb-8">
  16. 这是一个基于Hono和React的应用Starter,提供了用户认证、文件管理、图表分析、地图集成和主题切换等常用功能。
  17. </p>
  18. </div>
  19. {/* 管理入口按钮 */}
  20. <div className="space-y-4">
  21. <a
  22. href="/admin"
  23. className="w-full flex justify-center py-3 px-4 border border-transparent rounded-md shadow-sm text-lg font-medium text-white bg-blue-600 hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500"
  24. >
  25. 进入管理后台
  26. </a>
  27. {/* 移动端入口按钮 */}
  28. <a
  29. href="/mobile"
  30. className="w-full flex justify-center py-3 px-4 border border-blue-600 rounded-md shadow-sm text-lg font-medium text-blue-600 bg-white hover:bg-blue-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500"
  31. >
  32. 进入移动端
  33. </a>
  34. </div>
  35. </div>
  36. </div>
  37. )
  38. }
  39. const rootElement = document.getElementById('root')
  40. if (rootElement) {
  41. const root = createRoot(rootElement)
  42. root.render(
  43. <Home />
  44. )
  45. }