Spaces:
Sleeping
Sleeping
Commit ·
5048dfd
1
Parent(s): d4dac9a
style: overhaul UI to a modern sidebar layout with strategic green/cream mix
Browse files- frontend/public/assets/logo.jpg +3 -0
- frontend/src/App.tsx +109 -87
frontend/public/assets/logo.jpg
ADDED
|
Git LFS Details
|
frontend/src/App.tsx
CHANGED
|
@@ -53,112 +53,134 @@ const App: React.FC = () => {
|
|
| 53 |
};
|
| 54 |
|
| 55 |
return (
|
| 56 |
-
<div className="min-h-screen bg-[#
|
| 57 |
-
{/* Background
|
| 58 |
-
<div className="
|
| 59 |
-
<div className="
|
| 60 |
|
| 61 |
-
<div className="w-full max-w-
|
| 62 |
-
|
| 63 |
-
|
| 64 |
-
|
| 65 |
-
|
| 66 |
-
|
|
|
|
|
|
|
| 67 |
</div>
|
| 68 |
-
|
| 69 |
-
|
| 70 |
-
|
| 71 |
-
|
| 72 |
-
|
| 73 |
-
|
| 74 |
-
<
|
|
|
|
|
|
|
| 75 |
</div>
|
| 76 |
</div>
|
| 77 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 78 |
|
| 79 |
-
{/*
|
| 80 |
-
<
|
| 81 |
-
{
|
| 82 |
-
|
| 83 |
-
|
| 84 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 85 |
</div>
|
| 86 |
-
|
| 87 |
-
<p className="text-white/70 leading-relaxed italic">
|
| 88 |
-
"Thy word is a lamp unto my feet, and a light unto my path." — Psalm 119:105
|
| 89 |
-
</p>
|
| 90 |
-
<p className="text-white/50 text-sm">
|
| 91 |
-
How can I offer you Biblical guidance or Christian encouragement today?
|
| 92 |
-
</p>
|
| 93 |
-
</div>
|
| 94 |
-
)}
|
| 95 |
|
| 96 |
-
|
| 97 |
-
|
| 98 |
-
|
| 99 |
-
|
| 100 |
-
|
| 101 |
-
|
| 102 |
-
|
| 103 |
-
|
| 104 |
-
|
| 105 |
-
|
| 106 |
-
|
| 107 |
-
<div className=
|
| 108 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 109 |
</div>
|
| 110 |
</div>
|
| 111 |
</div>
|
| 112 |
-
|
| 113 |
-
))}
|
| 114 |
|
| 115 |
-
|
| 116 |
-
|
| 117 |
-
|
| 118 |
-
|
| 119 |
-
|
| 120 |
-
|
| 121 |
-
|
| 122 |
-
<div className="flex gap-1.5 px-2">
|
| 123 |
-
<div className="w-2 h-2 bg-[#F9F7C9]/60 rounded-full animate-bounce delay-0"></div>
|
| 124 |
-
<div className="w-2 h-2 bg-[#F9F7C9]/60 rounded-full animate-bounce delay-150"></div>
|
| 125 |
-
<div className="w-2 h-2 bg-[#F9F7C9]/60 rounded-full animate-bounce delay-300"></div>
|
| 126 |
</div>
|
| 127 |
</div>
|
| 128 |
</div>
|
| 129 |
-
|
| 130 |
-
|
| 131 |
-
<
|
| 132 |
-
</div>
|
| 133 |
|
| 134 |
-
|
| 135 |
-
|
| 136 |
-
|
| 137 |
-
|
| 138 |
-
|
| 139 |
-
|
| 140 |
-
|
| 141 |
-
|
| 142 |
-
|
| 143 |
-
|
| 144 |
-
|
| 145 |
-
|
| 146 |
-
|
| 147 |
-
|
| 148 |
-
|
| 149 |
-
|
| 150 |
-
|
| 151 |
-
|
| 152 |
-
|
| 153 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 154 |
</div>
|
| 155 |
-
|
| 156 |
-
Scriptural Wisdom & Pastoral Support
|
| 157 |
-
</p>
|
| 158 |
-
</div>
|
| 159 |
</div>
|
| 160 |
</div>
|
| 161 |
);
|
|
|
|
| 162 |
};
|
| 163 |
|
| 164 |
export default App;
|
|
|
|
| 53 |
};
|
| 54 |
|
| 55 |
return (
|
| 56 |
+
<div className="min-h-screen bg-[#002B22] flex flex-col items-center justify-center p-0 sm:p-6 font-outfit text-white overflow-hidden relative">
|
| 57 |
+
{/* Dynamic Background Elements */}
|
| 58 |
+
<div className="absolute top-[-20%] left-[-10%] w-[60%] h-[60%] bg-[#007055]/20 rounded-full blur-[150px] animate-pulse pointer-events-none"></div>
|
| 59 |
+
<div className="absolute bottom-[-20%] right-[-10%] w-[60%] h-[60%] bg-[#FDFBD4]/5 rounded-full blur-[150px] pointer-events-none"></div>
|
| 60 |
|
| 61 |
+
<div className="w-full max-w-5xl h-screen sm:h-[92vh] flex flex-col sm:flex-row relative z-10 bg-black/20 backdrop-blur-2xl sm:rounded-[2.5rem] overflow-hidden border border-white/5 shadow-[0_32px_64px_-12px_rgba(0,0,0,0.5)]">
|
| 62 |
+
|
| 63 |
+
{/* Modern Sidebar-style Header (Desktop) / Top Header (Mobile) */}
|
| 64 |
+
<aside className="w-full sm:w-80 bg-[#00362B]/80 p-8 flex flex-col items-center sm:items-start space-y-8 border-b sm:border-b-0 sm:border-r border-white/5 shrink-0">
|
| 65 |
+
<div className="relative group">
|
| 66 |
+
<div className="absolute -inset-1 bg-gradient-to-tr from-[#FDFBD4] to-[#007055] rounded-3xl blur opacity-25 group-hover:opacity-50 transition duration-1000 group-hover:duration-200"></div>
|
| 67 |
+
<div className="relative w-24 h-24 sm:w-32 sm:h-32 rounded-[2rem] overflow-hidden border border-white/10 shadow-2xl transform transition-transform group-hover:scale-105 duration-500">
|
| 68 |
+
<img src="/assets/logo.jpg" alt="CLCC Logo" className="w-full h-full object-cover" />
|
| 69 |
</div>
|
| 70 |
+
</div>
|
| 71 |
+
<div className="text-center sm:text-left space-y-2">
|
| 72 |
+
<h1 className="text-4xl font-black tracking-tighter bg-clip-text text-transparent bg-gradient-to-br from-white via-[#FDFBD4] to-[#007055]">
|
| 73 |
+
Theo AI
|
| 74 |
+
</h1>
|
| 75 |
+
<div className="inline-flex items-center px-3 py-1 bg-[#FDFBD4]/10 rounded-full border border-[#FDFBD4]/20">
|
| 76 |
+
<span className="text-[10px] font-bold text-[#FDFBD4] uppercase tracking-widest">
|
| 77 |
+
TechDisciples CLCC
|
| 78 |
+
</span>
|
| 79 |
</div>
|
| 80 |
</div>
|
| 81 |
+
<div className="hidden sm:block flex-1 w-full pt-8">
|
| 82 |
+
<p className="text-[#FDFBD4]/40 text-xs leading-relaxed font-light italic">
|
| 83 |
+
"Thy word is a lamp unto my feet, and a light unto my path."
|
| 84 |
+
<span className="block mt-2 font-bold not-italic opacity-100">— Psalm 119:105</span>
|
| 85 |
+
</p>
|
| 86 |
+
</div>
|
| 87 |
+
</aside>
|
| 88 |
|
| 89 |
+
{/* Main Interaction Area */}
|
| 90 |
+
<main className="flex-1 flex flex-col min-w-0 bg-transparent relative">
|
| 91 |
+
{/* Chat Messages */}
|
| 92 |
+
<div className="flex-1 overflow-y-auto p-4 sm:p-10 space-y-8 scroll-smooth scrollbar-hide">
|
| 93 |
+
{messages.length === 0 && (
|
| 94 |
+
<div className="h-full flex flex-col items-center justify-center space-y-6 text-center animate-in fade-in zoom-in duration-700">
|
| 95 |
+
<div className="w-16 h-16 bg-[#FDFBD4]/5 rounded-2xl flex items-center justify-center border border-[#FDFBD4]/10 shadow-inner">
|
| 96 |
+
<Bot size={32} className="text-[#FDFBD4]" />
|
| 97 |
+
</div>
|
| 98 |
+
<div className="space-y-2 max-w-sm">
|
| 99 |
+
<h2 className="text-2xl font-bold text-white">Shalom, Beloved</h2>
|
| 100 |
+
<p className="text-white/40 text-sm leading-relaxed">
|
| 101 |
+
I am centered in Christ to provide you with scriptural guidance and faithful encouragement.
|
| 102 |
+
</p>
|
| 103 |
+
</div>
|
| 104 |
</div>
|
| 105 |
+
)}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 106 |
|
| 107 |
+
{messages.map((msg, index) => (
|
| 108 |
+
<div key={index}
|
| 109 |
+
className={`flex ${msg.role === 'user' ? 'justify-end' : 'justify-start'} animate-in fade-in slide-in-from-bottom-6 duration-500 fill-mode-both`}
|
| 110 |
+
style={{ animationDelay: `${index * 50}ms` }}
|
| 111 |
+
>
|
| 112 |
+
<div className={`group flex flex-col max-w-[90%] sm:max-w-[80%] ${msg.role === 'user' ? 'items-end' : 'items-start'}`}>
|
| 113 |
+
<div className={`flex items-center gap-2 mb-2 px-2 ${msg.role === 'user' ? 'flex-row-reverse' : 'flex-row'}`}>
|
| 114 |
+
<div className={`text-[10px] font-bold uppercase tracking-widest ${msg.role === 'user' ? 'text-[#007055]' : 'text-[#FDFBD4]/60'}`}>
|
| 115 |
+
{msg.role === 'user' ? 'You' : 'Theo'}
|
| 116 |
+
</div>
|
| 117 |
+
</div>
|
| 118 |
+
<div className={`relative p-5 sm:p-6 rounded-[2rem] text-sm leading-relaxed shadow-xl transition-all duration-300 ${msg.role === 'user'
|
| 119 |
+
? 'bg-gradient-to-br from-[#007055] to-[#004D3C] text-white rounded-tr-none border border-white/5'
|
| 120 |
+
: 'bg-white/5 backdrop-blur-md text-white/90 rounded-tl-none border border-white/5 hover:bg-white/10'
|
| 121 |
+
}`}>
|
| 122 |
+
<div className={`markdown-content prose prose-invert prose-sm max-w-none
|
| 123 |
+
prose-p:leading-relaxed prose-headings:text-[#FDFBD4] prose-strong:text-[#FDFBD4]
|
| 124 |
+
${msg.role === 'assistant' ? 'selection:bg-[#FDFBD4]/30' : 'selection:bg-white/20'}
|
| 125 |
+
`}>
|
| 126 |
+
<ReactMarkdown>{msg.content}</ReactMarkdown>
|
| 127 |
+
</div>
|
| 128 |
</div>
|
| 129 |
</div>
|
| 130 |
</div>
|
| 131 |
+
))}
|
|
|
|
| 132 |
|
| 133 |
+
{isLoading && (
|
| 134 |
+
<div className="flex justify-start animate-in fade-in duration-300">
|
| 135 |
+
<div className="bg-white/5 p-4 rounded-3xl border border-white/5 flex items-center gap-3">
|
| 136 |
+
<div className="flex gap-1.5">
|
| 137 |
+
<div className="w-1.5 h-1.5 bg-[#FDFBD4] rounded-full animate-bounce"></div>
|
| 138 |
+
<div className="w-1.5 h-1.5 bg-[#FDFBD4]/60 rounded-full animate-bounce [animation-delay:0.2s]"></div>
|
| 139 |
+
<div className="w-1.5 h-1.5 bg-[#FDFBD4]/30 rounded-full animate-bounce [animation-delay:0.4s]"></div>
|
|
|
|
|
|
|
|
|
|
|
|
|
| 140 |
</div>
|
| 141 |
</div>
|
| 142 |
</div>
|
| 143 |
+
)}
|
| 144 |
+
<div ref={chatEndRef} />
|
| 145 |
+
</div>
|
|
|
|
| 146 |
|
| 147 |
+
{/* Sophisticated Input Box */}
|
| 148 |
+
<div className="p-6 sm:p-10">
|
| 149 |
+
<div className="relative group max-w-3xl mx-auto">
|
| 150 |
+
<div className="absolute -inset-0.5 bg-gradient-to-r from-[#007055] via-[#FDFBD4]/20 to-[#004D3C] rounded-3xl blur opacity-20 group-focus-within:opacity-40 transition duration-500"></div>
|
| 151 |
+
<div className="relative flex items-center bg-[#00362B]/60 backdrop-blur-xl border border-white/10 rounded-3xl p-2 transition-all duration-300 group-focus-within:border-[#FDFBD4]/30 group-focus-within:bg-[#00362B]/80 shadow-2xl">
|
| 152 |
+
<input
|
| 153 |
+
type="text"
|
| 154 |
+
value={input}
|
| 155 |
+
onChange={(e) => setInput(e.target.value)}
|
| 156 |
+
onKeyPress={(e) => e.key === 'Enter' && handleSend()}
|
| 157 |
+
placeholder="Type your spiritual inquiry here..."
|
| 158 |
+
className="flex-1 bg-transparent py-4 px-6 focus:outline-none text-white placeholder:text-white/20"
|
| 159 |
+
disabled={isLoading}
|
| 160 |
+
/>
|
| 161 |
+
<button
|
| 162 |
+
onClick={handleSend}
|
| 163 |
+
disabled={isLoading || !input.trim()}
|
| 164 |
+
className={`p-4 rounded-2xl transition-all duration-500 ${input.trim()
|
| 165 |
+
? 'bg-[#FDFBD4] text-[#002B22] shadow-[0_0_20px_rgba(253,251,212,0.3)] hover:scale-105 active:scale-95'
|
| 166 |
+
: 'bg-white/5 text-white/20 shadow-none'
|
| 167 |
+
}`}
|
| 168 |
+
>
|
| 169 |
+
<Send size={20} className={isLoading ? 'animate-pulse' : ''} />
|
| 170 |
+
</button>
|
| 171 |
+
</div>
|
| 172 |
+
<div className="flex justify-center mt-4">
|
| 173 |
+
<p className="text-[9px] uppercase tracking-[0.4em] text-white/20 font-black">
|
| 174 |
+
Faith-based Intelligence • CLCC
|
| 175 |
+
</p>
|
| 176 |
+
</div>
|
| 177 |
+
</div>
|
| 178 |
</div>
|
| 179 |
+
</main>
|
|
|
|
|
|
|
|
|
|
| 180 |
</div>
|
| 181 |
</div>
|
| 182 |
);
|
| 183 |
+
);
|
| 184 |
};
|
| 185 |
|
| 186 |
export default App;
|