style: enhance glassmorphism for projects and chat widget with improved transparency and readability
This commit is contained in:
@@ -244,13 +244,13 @@ export default function ChatWidget() {
|
||||
animate={{ opacity: 1, y: 0, scale: 1, filter: "blur(0px)" }}
|
||||
exit={{ opacity: 0, y: 20, scale: 0.95, filter: "blur(10px)" }}
|
||||
transition={{ type: "spring", damping: 30, stiffness: 400 }}
|
||||
className="fixed bottom-20 left-4 right-4 md:bottom-24 md:left-6 md:right-auto z-30 md:w-[380px] h-[60vh] md:h-[550px] max-h-[600px] bg-[#fdfcf8]/60 backdrop-blur-2xl saturate-150 rounded-2xl shadow-[0_12px_40px_rgba(41,37,36,0.15)] flex flex-col overflow-hidden border border-white/40 ring-1 ring-white/50"
|
||||
className="fixed bottom-20 left-4 right-4 md:bottom-24 md:left-6 md:right-auto z-30 md:w-[380px] h-[60vh] md:h-[550px] max-h-[600px] bg-[#fdfcf8]/30 backdrop-blur-2xl saturate-150 rounded-2xl shadow-[0_12px_40px_rgba(41,37,36,0.15)] flex flex-col overflow-hidden border border-white/40 ring-1 ring-white/50"
|
||||
>
|
||||
{/* Header */}
|
||||
<div className="bg-white/40 backdrop-blur-lg text-stone-800 p-4 flex items-center justify-between border-b border-white/30">
|
||||
<div className="bg-white/20 backdrop-blur-md text-stone-800 p-4 flex items-center justify-between border-b border-white/20">
|
||||
<div className="flex items-center gap-3">
|
||||
<div className="relative">
|
||||
<div className="w-10 h-10 rounded-full bg-gradient-to-br from-stone-100 to-white flex items-center justify-center ring-1 ring-white shadow-sm">
|
||||
<div className="w-10 h-10 rounded-full bg-gradient-to-br from-stone-100/80 to-white/80 flex items-center justify-center ring-1 ring-white shadow-sm backdrop-blur-sm">
|
||||
<Sparkles size={18} className="text-stone-600" />
|
||||
</div>
|
||||
<span className="absolute bottom-0 right-0 w-2.5 h-2.5 bg-emerald-400 rounded-full border-2 border-white shadow-sm" />
|
||||
@@ -295,12 +295,12 @@ export default function ChatWidget() {
|
||||
<div
|
||||
className={`max-w-[85%] rounded-2xl px-4 py-3 backdrop-blur-md shadow-sm ${
|
||||
message.sender === "user"
|
||||
? "bg-stone-800/90 text-stone-50"
|
||||
: "bg-white/60 text-stone-800 border border-white/50"
|
||||
? "bg-stone-800/90 text-stone-50 ring-1 ring-white/10"
|
||||
: "bg-white/70 text-stone-800 border border-white/50 ring-1 ring-white/40"
|
||||
}`}
|
||||
>
|
||||
<p className={`text-sm whitespace-pre-wrap break-words leading-relaxed ${
|
||||
message.sender === "user" ? "text-stone-50 font-light" : "text-stone-800 font-normal"
|
||||
message.sender === "user" ? "text-stone-50 font-light" : "text-stone-800 font-medium"
|
||||
}`}>
|
||||
{message.text}
|
||||
</p>
|
||||
@@ -308,7 +308,7 @@ export default function ChatWidget() {
|
||||
className={`text-[10px] mt-1.5 ${
|
||||
message.sender === "user"
|
||||
? "text-stone-400"
|
||||
: "text-stone-400"
|
||||
: "text-stone-500"
|
||||
}`}
|
||||
>
|
||||
{message.timestamp.toLocaleTimeString([], {
|
||||
@@ -327,10 +327,10 @@ export default function ChatWidget() {
|
||||
animate={{ opacity: 1, y: 0 }}
|
||||
className="flex justify-start"
|
||||
>
|
||||
<div className="bg-white/50 backdrop-blur-sm border border-white/40 rounded-2xl px-4 py-3 shadow-sm">
|
||||
<div className="bg-white/60 backdrop-blur-md border border-white/40 rounded-2xl px-4 py-3 shadow-sm ring-1 ring-white/40">
|
||||
<div className="flex gap-1.5">
|
||||
<motion.div
|
||||
className="w-1.5 h-1.5 bg-stone-400 rounded-full"
|
||||
className="w-1.5 h-1.5 bg-stone-500 rounded-full"
|
||||
animate={{ y: [0, -6, 0] }}
|
||||
transition={{
|
||||
duration: 0.6,
|
||||
@@ -339,7 +339,7 @@ export default function ChatWidget() {
|
||||
}}
|
||||
/>
|
||||
<motion.div
|
||||
className="w-1.5 h-1.5 bg-stone-400 rounded-full"
|
||||
className="w-1.5 h-1.5 bg-stone-500 rounded-full"
|
||||
animate={{ y: [0, -6, 0] }}
|
||||
transition={{
|
||||
duration: 0.6,
|
||||
@@ -348,7 +348,7 @@ export default function ChatWidget() {
|
||||
}}
|
||||
/>
|
||||
<motion.div
|
||||
className="w-1.5 h-1.5 bg-stone-400 rounded-full"
|
||||
className="w-1.5 h-1.5 bg-stone-500 rounded-full"
|
||||
animate={{ y: [0, -6, 0] }}
|
||||
transition={{
|
||||
duration: 0.6,
|
||||
@@ -365,7 +365,7 @@ export default function ChatWidget() {
|
||||
</div>
|
||||
|
||||
{/* Input */}
|
||||
<div className="p-4 bg-white/30 backdrop-blur-xl border-t border-white/30">
|
||||
<div className="p-4 bg-white/20 backdrop-blur-xl border-t border-white/20">
|
||||
<div className="flex gap-2">
|
||||
<input
|
||||
ref={inputRef}
|
||||
@@ -375,7 +375,7 @@ export default function ChatWidget() {
|
||||
onKeyPress={handleKeyPress}
|
||||
placeholder="Ask anything..."
|
||||
disabled={isLoading}
|
||||
className="flex-1 px-4 py-3 text-sm bg-white/60 backdrop-blur-sm text-stone-800 rounded-xl border border-white/50 focus:outline-none focus:ring-2 focus:ring-stone-200/50 focus:border-stone-400/50 focus:bg-white/80 disabled:opacity-50 disabled:cursor-not-allowed placeholder:text-stone-400 transition-all shadow-inner"
|
||||
className="flex-1 px-4 py-3 text-sm bg-white/50 backdrop-blur-sm text-stone-800 rounded-xl border border-white/40 focus:outline-none focus:ring-2 focus:ring-stone-200/50 focus:border-stone-400/50 focus:bg-white/70 disabled:opacity-50 disabled:cursor-not-allowed placeholder:text-stone-500 transition-all shadow-inner"
|
||||
/>
|
||||
<button
|
||||
onClick={handleSend}
|
||||
@@ -405,7 +405,7 @@ export default function ChatWidget() {
|
||||
inputRef.current?.focus();
|
||||
}}
|
||||
disabled={isLoading}
|
||||
className="px-3 py-1.5 text-xs font-medium bg-white/40 backdrop-blur-md text-stone-600 rounded-lg hover:bg-white/70 hover:text-stone-900 border border-white/40 transition-all whitespace-nowrap disabled:opacity-50 flex-shrink-0 shadow-sm"
|
||||
className="px-3 py-1.5 text-xs font-medium bg-white/40 backdrop-blur-md text-stone-700 rounded-lg hover:bg-white/60 hover:text-stone-900 border border-white/40 transition-all whitespace-nowrap disabled:opacity-50 flex-shrink-0 shadow-sm"
|
||||
>
|
||||
{suggestion}
|
||||
</button>
|
||||
|
||||
Reference in New Issue
Block a user