alaselababatunde commited on
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 ADDED

Git LFS Details

  • SHA256: 3383887f254073e4eb4df7e7a98dcc6fbe9c27245ba7d7d5a3f9aedd9cea0f01
  • Pointer size: 131 Bytes
  • Size of remote file: 219 kB
frontend/src/App.tsx CHANGED
@@ -53,112 +53,134 @@ const App: React.FC = () => {
53
  };
54
 
55
  return (
56
- <div className="min-h-screen bg-[#004D3C] bg-gradient-to-br from-[#004D3C] via-[#007055] to-[#004D3C] flex flex-col items-center justify-center p-4">
57
- {/* Background Decorative Elements */}
58
- <div className="fixed top-[-10%] left-[-10%] w-[40%] h-[40%] bg-[#F9F7C9]/10 rounded-full blur-[120px] pointer-events-none"></div>
59
- <div className="fixed bottom-[-10%] right-[-10%] w-[40%] h-[40%] bg-[#D4AF37]/10 rounded-full blur-[120px] pointer-events-none"></div>
60
 
61
- <div className="w-full max-w-4xl h-[90vh] glass-container flex flex-col relative z-10 border border-white/10 shadow-2xl overflow-hidden rounded-3xl backdrop-blur-xl bg-white/5">
62
- {/* Header */}
63
- <header className="p-6 border-b border-white/10 flex items-center justify-between bg-[#004D3C]/40">
64
- <div className="flex items-center gap-4">
65
- <div className="w-12 h-12 rounded-full overflow-hidden border-2 border-[#D4AF37]/50 p-1 bg-white/10">
66
- <img src="/assets/logo.png" alt="CLCC Logo" className="w-full h-full object-contain" />
 
 
67
  </div>
68
- <div>
69
- <h1 className="text-2xl font-bold bg-clip-text text-transparent bg-gradient-to-r from-white via-[#F9F7C9] to-[#D4AF37]">
70
- Theo AI
71
- </h1>
72
- <p className="text-xs text-[#F9F7C9]/60 tracking-wider uppercase font-medium">
73
- by TechDisciples CLCC
74
- </p>
 
 
75
  </div>
76
  </div>
77
- </header>
 
 
 
 
 
 
78
 
79
- {/* Chat Area */}
80
- <div className="flex-1 overflow-y-auto p-6 space-y-6 scrollbar-hide">
81
- {messages.length === 0 && (
82
- <div className="flex flex-col items-center justify-center h-full text-center space-y-4 max-w-md mx-auto">
83
- <div className="w-20 h-20 bg-[#F9F7C9]/10 rounded-full flex items-center justify-center mb-2 animate-pulse border border-[#F9F7C9]/20">
84
- <Bot size={40} className="text-[#F9F7C9]" />
 
 
 
 
 
 
 
 
 
85
  </div>
86
- <h2 className="text-xl font-semibold text-white">Shalom! I am Theo</h2>
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
- {messages.map((msg, index) => (
97
- <div key={index} className={`flex ${msg.role === 'user' ? 'justify-end' : 'justify-start'} animate-in fade-in slide-in-from-bottom-2 duration-300`}>
98
- <div className={`max-w-[85%] flex gap-3 ${msg.role === 'user' ? 'flex-row-reverse' : 'flex-row'}`}>
99
- <div className={`w-8 h-8 rounded-full flex-shrink-0 flex items-center justify-center ${msg.role === 'user' ? 'bg-[#D4AF37]/20 text-[#D4AF37]' : 'bg-[#F9F7C9]/20 text-[#F9F7C9]'
100
- } border border-white/10`}>
101
- {msg.role === 'user' ? <User size={16} /> : <Bot size={16} />}
102
- </div>
103
- <div className={`p-4 rounded-2xl ${msg.role === 'user'
104
- ? 'bg-[#007055]/40 text-white rounded-tr-none border border-[#007055]/30 shadow-lg'
105
- : 'bg-white/5 text-white/90 rounded-tl-none border border-white/10 backdrop-blur-md shadow-inner'
106
- }`}>
107
- <div className="markdown-content prose prose-invert prose-sm max-w-none prose-p:leading-relaxed">
108
- <ReactMarkdown>{msg.content}</ReactMarkdown>
 
 
 
 
 
 
 
 
109
  </div>
110
  </div>
111
  </div>
112
- </div>
113
- ))}
114
 
115
- {isLoading && (
116
- <div className="flex justify-start animate-in fade-in duration-300">
117
- <div className="flex gap-3">
118
- <div className="w-8 h-8 rounded-full bg-[#F9F7C9]/20 text-[#F9F7C9] border border-white/10 flex items-center justify-center">
119
- <Loader2 size={16} className="animate-spin" />
120
- </div>
121
- <div className="bg-white/5 p-4 rounded-2xl rounded-tl-none border border-white/10 backdrop-blur-md">
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
- </div>
130
- )}
131
- <div ref={chatEndRef} />
132
- </div>
133
 
134
- {/* Input Area */}
135
- <div className="p-6 border-t border-white/10 bg-[#004D3C]/20">
136
- <div className="relative group">
137
- <input
138
- type="text"
139
- value={input}
140
- onChange={(e) => setInput(e.target.value)}
141
- onKeyPress={(e) => e.key === 'Enter' && handleSend()}
142
- placeholder="Seek guidance or ask a question..."
143
- className="w-full bg-white/5 border border-white/10 rounded-xl py-4 pl-4 pr-14 focus:outline-none focus:border-[#F9F7C9]/50 focus:ring-1 focus:ring-[#F9F7C9]/30 transition-all text-white placeholder:text-white/20"
144
- disabled={isLoading}
145
- />
146
- <button
147
- onClick={handleSend}
148
- disabled={isLoading || !input.trim()}
149
- className={`absolute right-2 top-2 bottom-2 w-10 rounded-lg flex items-center justify-center transition-all ${input.trim() ? 'bg-[#007055] text-white hover:bg-[#008A69] shadow-lg hover:shadow-[#007055]/40' : 'bg-white/5 text-white/20'
150
- }`}
151
- >
152
- <Send size={18} />
153
- </button>
 
 
 
 
 
 
 
 
 
 
 
154
  </div>
155
- <p className="text-[10px] text-center mt-3 text-[#F9F7C9]/30 uppercase tracking-[0.2em] font-medium">
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;