Spaces:
Sleeping
Sleeping
Commit ·
d4dac9a
1
Parent(s): 5ad993e
style: redesign UI with green/cream theme and fix logo path
Browse files
frontend/{CLCC Logo No Background.png → public/assets/logo.png}
RENAMED
|
File without changes
|
frontend/src/App.tsx
CHANGED
|
@@ -1,5 +1,5 @@
|
|
| 1 |
import React, { useState, useEffect, useRef } from 'react';
|
| 2 |
-
import { Send, User, Bot, Loader2
|
| 3 |
import ReactMarkdown from 'react-markdown';
|
| 4 |
import axios from 'axios';
|
| 5 |
|
|
@@ -53,45 +53,41 @@ const App: React.FC = () => {
|
|
| 53 |
};
|
| 54 |
|
| 55 |
return (
|
| 56 |
-
<div className="min-h-screen bg-gradient-to-br from-[#
|
| 57 |
{/* Background Decorative Elements */}
|
| 58 |
-
<div className="fixed top-[-10%] left-[-10%] w-[40%] h-[40%] bg-
|
| 59 |
-
<div className="fixed bottom-[-10%] right-[-10%] w-[40%] h-[40%] bg-
|
| 60 |
|
| 61 |
-
<div className="w-full max-w-4xl h-[90vh] glass-container flex flex-col relative z-10">
|
| 62 |
{/* Header */}
|
| 63 |
-
<header className="p-6 border-b border-white/10 flex items-center justify-between">
|
| 64 |
<div className="flex items-center gap-4">
|
| 65 |
-
<div className="w-12 h-12 rounded-full overflow-hidden border-2 border-
|
| 66 |
-
<img src="/
|
| 67 |
</div>
|
| 68 |
<div>
|
| 69 |
-
<h1 className="text-2xl font-bold bg-clip-text text-transparent bg-gradient-to-r from-white to-
|
| 70 |
Theo AI
|
| 71 |
</h1>
|
| 72 |
-
<p className="text-xs text-
|
| 73 |
by TechDisciples CLCC
|
| 74 |
</p>
|
| 75 |
</div>
|
| 76 |
</div>
|
| 77 |
-
<div className="flex gap-2 text-white/40">
|
| 78 |
-
<Search size={18} className="cursor-help hover:text-white transition-colors" title="Web Search Fallback Enabled" />
|
| 79 |
-
<Info size={18} className="cursor-help hover:text-white transition-colors" title="Biblical Guidance Assistant" />
|
| 80 |
-
</div>
|
| 81 |
</header>
|
| 82 |
|
| 83 |
{/* Chat Area */}
|
| 84 |
<div className="flex-1 overflow-y-auto p-6 space-y-6 scrollbar-hide">
|
| 85 |
{messages.length === 0 && (
|
| 86 |
<div className="flex flex-col items-center justify-center h-full text-center space-y-4 max-w-md mx-auto">
|
| 87 |
-
<div className="w-20 h-20 bg-
|
| 88 |
-
<Bot size={40} className="text-
|
| 89 |
</div>
|
| 90 |
<h2 className="text-xl font-semibold text-white">Shalom! I am Theo</h2>
|
| 91 |
-
<p className="text-white/
|
| 92 |
"Thy word is a lamp unto my feet, and a light unto my path." — Psalm 119:105
|
| 93 |
</p>
|
| 94 |
-
<p className="text-white/
|
| 95 |
How can I offer you Biblical guidance or Christian encouragement today?
|
| 96 |
</p>
|
| 97 |
</div>
|
|
@@ -100,15 +96,15 @@ const App: React.FC = () => {
|
|
| 100 |
{messages.map((msg, index) => (
|
| 101 |
<div key={index} className={`flex ${msg.role === 'user' ? 'justify-end' : 'justify-start'} animate-in fade-in slide-in-from-bottom-2 duration-300`}>
|
| 102 |
<div className={`max-w-[85%] flex gap-3 ${msg.role === 'user' ? 'flex-row-reverse' : 'flex-row'}`}>
|
| 103 |
-
<div className={`w-8 h-8 rounded-full flex-shrink-0 flex items-center justify-center ${msg.role === 'user' ? 'bg-
|
| 104 |
} border border-white/10`}>
|
| 105 |
{msg.role === 'user' ? <User size={16} /> : <Bot size={16} />}
|
| 106 |
</div>
|
| 107 |
<div className={`p-4 rounded-2xl ${msg.role === 'user'
|
| 108 |
-
? 'bg-
|
| 109 |
-
: 'bg-white/5 text-white/90 rounded-tl-none border border-white/10 backdrop-blur-md'
|
| 110 |
}`}>
|
| 111 |
-
<div className="markdown-content prose prose-invert prose-sm max-w-none">
|
| 112 |
<ReactMarkdown>{msg.content}</ReactMarkdown>
|
| 113 |
</div>
|
| 114 |
</div>
|
|
@@ -119,14 +115,14 @@ const App: React.FC = () => {
|
|
| 119 |
{isLoading && (
|
| 120 |
<div className="flex justify-start animate-in fade-in duration-300">
|
| 121 |
<div className="flex gap-3">
|
| 122 |
-
<div className="w-8 h-8 rounded-full bg-
|
| 123 |
<Loader2 size={16} className="animate-spin" />
|
| 124 |
</div>
|
| 125 |
<div className="bg-white/5 p-4 rounded-2xl rounded-tl-none border border-white/10 backdrop-blur-md">
|
| 126 |
<div className="flex gap-1.5 px-2">
|
| 127 |
-
<div className="w-2 h-2 bg-
|
| 128 |
-
<div className="w-2 h-2 bg-
|
| 129 |
-
<div className="w-2 h-2 bg-
|
| 130 |
</div>
|
| 131 |
</div>
|
| 132 |
</div>
|
|
@@ -136,7 +132,7 @@ const App: React.FC = () => {
|
|
| 136 |
</div>
|
| 137 |
|
| 138 |
{/* Input Area */}
|
| 139 |
-
<div className="p-6 border-t border-white/10">
|
| 140 |
<div className="relative group">
|
| 141 |
<input
|
| 142 |
type="text"
|
|
@@ -144,19 +140,19 @@ const App: React.FC = () => {
|
|
| 144 |
onChange={(e) => setInput(e.target.value)}
|
| 145 |
onKeyPress={(e) => e.key === 'Enter' && handleSend()}
|
| 146 |
placeholder="Seek guidance or ask a question..."
|
| 147 |
-
className="w-full bg-white/5 border border-white/10 rounded-xl py-4 pl-4 pr-14 focus:outline-none focus:border-
|
| 148 |
disabled={isLoading}
|
| 149 |
/>
|
| 150 |
<button
|
| 151 |
onClick={handleSend}
|
| 152 |
disabled={isLoading || !input.trim()}
|
| 153 |
-
className={`absolute right-2 top-2 bottom-2 w-10 rounded-lg flex items-center justify-center transition-all ${input.trim() ? 'bg-
|
| 154 |
}`}
|
| 155 |
>
|
| 156 |
<Send size={18} />
|
| 157 |
</button>
|
| 158 |
</div>
|
| 159 |
-
<p className="text-[10px] text-center mt-3 text-
|
| 160 |
Scriptural Wisdom & Pastoral Support
|
| 161 |
</p>
|
| 162 |
</div>
|
|
|
|
| 1 |
import React, { useState, useEffect, useRef } from 'react';
|
| 2 |
+
import { Send, User, Bot, Loader2 } from 'lucide-react';
|
| 3 |
import ReactMarkdown from 'react-markdown';
|
| 4 |
import axios from 'axios';
|
| 5 |
|
|
|
|
| 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>
|
|
|
|
| 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>
|
|
|
|
| 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>
|
|
|
|
| 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"
|
|
|
|
| 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>
|