From aa05d1aadc3b38f0d64ffb5973b2cfc3075a60bd Mon Sep 17 00:00:00 2001 From: Sma1lboy <541898146chen@gmail.com> Date: Sat, 15 Mar 2025 20:22:12 -0500 Subject: [PATCH 1/9] refactor(frontend): enhance homepage layout and animations for improved user experience --- frontend/src/app/(main)/page.tsx | 230 +++++++++----- frontend/src/components/root/prompt-form.tsx | 314 +++++++++---------- 2 files changed, 295 insertions(+), 249 deletions(-) diff --git a/frontend/src/app/(main)/page.tsx b/frontend/src/app/(main)/page.tsx index 0be78895..fe05b95c 100644 --- a/frontend/src/app/(main)/page.tsx +++ b/frontend/src/app/(main)/page.tsx @@ -39,85 +39,159 @@ export default function HomePage() { }; return ( -
- -
- CodeFox Logo -
- -
-
-

- Sentence to a project in seconds. -

-

- Codefox built AI agents crew for you to create your next project -

+
+
+
+
+
+ +
+ +
+ CodeFox Logo
-
- -
- setShowAuthChoice(true)} - isLoading={isLoading} - /> -
- -
- -
- - - {/* Choice Modal */} - setShowAuthChoice(false)} - onSignUpClick={() => { - setShowAuthChoice(false); - setTimeout(() => { - setShowSignUp(true); - }, 100); - }} - onSignInClick={() => { - setShowAuthChoice(false); - setTimeout(() => { - setShowSignIn(true); - }, 100); - }} - /> - - {/* SignInModal & SignUpModal */} - setShowSignIn(false)} /> - setShowSignUp(false)} /> - - + +
+ + + Sentence to a project in seconds. + + + + +
+
+
+ + + Codefox built AI agents crew for you to create your next project + +
+ + + + + + + +
+ +
+ setShowAuthChoice(true)} + isLoading={isLoading} + /> +
+
+ + + + +
+ + setShowAuthChoice(false)} + onSignUpClick={() => { + setShowAuthChoice(false); + setTimeout(() => { + setShowSignUp(true); + }, 100); + }} + onSignInClick={() => { + setShowAuthChoice(false); + setTimeout(() => { + setShowSignIn(true); + }, 100); + }} + /> + + setShowSignIn(false)} /> + setShowSignUp(false)} /> +
); } diff --git a/frontend/src/components/root/prompt-form.tsx b/frontend/src/components/root/prompt-form.tsx index c7920c7f..5796c637 100644 --- a/frontend/src/components/root/prompt-form.tsx +++ b/frontend/src/components/root/prompt-form.tsx @@ -30,7 +30,6 @@ import { Button } from '@/components/ui/button'; import { cn } from '@/lib/utils'; import { useModels } from '@/hooks/useModels'; import { gql, useMutation } from '@apollo/client'; -import { useTheme } from 'next-themes'; import { logger } from '@/app/log/logger'; export interface PromptFormRef { @@ -71,9 +70,6 @@ export const PromptForm = forwardRef( // State for regeneration loading const [isRegenerating, setIsRegenerating] = useState(false); - const { theme } = useTheme(); - const isDarkMode = theme === 'dark'; - const { selectedModel, setSelectedModel, @@ -184,188 +180,164 @@ export const PromptForm = forwardRef( }; return ( -
+
{/* Main content area with textarea */} - -
-