design: cyan -> rgb(12,96,96) in light theme, #00F0FF stays in dark theme
- globals.css: add --cyan-ai CSS variable (rgb(12,96,96) light / #00F0FF dark) + opacity variants --cyan-ai-10/20/30/40/50/80 - Bulk replace all #00F0FF hardcoded Tailwind arbitrary values with var(--cyan-ai) / var(--cyan-ai-10) / etc across 55+ TSX/TS files - Shadow glow colours also updated (suppressed by box-shadow:none in light mode) - TypeScript: 0 errors
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
"use client"
|
||||
"use client"
|
||||
|
||||
import { useState } from "react"
|
||||
import { Card, CardContent, CardHeader, CardTitle, CardFooter } from "@/components/ui/card"
|
||||
@@ -86,7 +86,7 @@ export default function CommunityPage() {
|
||||
if (loading) {
|
||||
return (
|
||||
<div className="h-[70vh] flex flex-col items-center justify-center p-8">
|
||||
<div className="h-8 w-8 border-4 border-[#00F0FF] border-t-transparent rounded-full animate-spin mb-4"></div>
|
||||
<div className="h-8 w-8 border-4 border-[var(--cyan-ai)] border-t-transparent rounded-full animate-spin mb-4"></div>
|
||||
<p className="text-muted-foreground font-medium animate-pulse">Loading Doubt Forum...</p>
|
||||
</div>
|
||||
)
|
||||
@@ -117,8 +117,8 @@ export default function CommunityPage() {
|
||||
<div className="flex flex-col md:flex-row justify-between items-start md:items-end gap-4">
|
||||
<div>
|
||||
<h1 className="text-3xl md:text-4xl font-black tracking-tight flex items-center gap-3 mb-1">
|
||||
<span className="p-2.5 rounded-xl bg-yellow-50 dark:bg-[#00F0FF]/10 border border-yellow-300/60 dark:border-[#00F0FF]/20">
|
||||
<MessageSquare className="text-yellow-600 dark:text-[#00F0FF]" size={28} />
|
||||
<span className="p-2.5 rounded-xl bg-yellow-50 dark:bg-[var(--cyan-ai-10)] border border-yellow-300/60 dark:border-[var(--cyan-ai-20)]">
|
||||
<MessageSquare className="text-yellow-600 dark:text-[var(--cyan-ai)]" size={28} />
|
||||
</span>
|
||||
Doubt Forum
|
||||
</h1>
|
||||
@@ -128,7 +128,7 @@ export default function CommunityPage() {
|
||||
</div>
|
||||
<button
|
||||
onClick={() => setIsAskModalOpen(true)}
|
||||
className="px-5 py-2.5 bg-[#00F0FF] text-black font-bold rounded-xl shadow-[0_0_15px_-3px_rgba(0,240,255,0.4)] hover:bg-[#00d0dd] transition-colors"
|
||||
className="px-5 py-2.5 bg-[var(--cyan-ai)] text-black font-bold rounded-xl shadow-[0_0_15px_-3px_rgba(12,96,96,0.4)] hover:bg-[#00d0dd] transition-colors"
|
||||
>
|
||||
Ask a Doubt
|
||||
</button>
|
||||
@@ -142,7 +142,7 @@ export default function CommunityPage() {
|
||||
<input
|
||||
type="text"
|
||||
placeholder="Search doubts by keyword..."
|
||||
className="w-full pl-10 pr-4 py-2.5 bg-card border border-border rounded-xl text-sm focus:outline-none focus:ring-2 focus:ring-[#00F0FF]/50"
|
||||
className="w-full pl-10 pr-4 py-2.5 bg-card border border-border rounded-xl text-sm focus:outline-none focus:ring-2 focus:ring-[var(--cyan-ai-10)]"
|
||||
value={searchQuery}
|
||||
onChange={(e) => setSearchQuery(e.target.value)}
|
||||
/>
|
||||
@@ -158,11 +158,11 @@ export default function CommunityPage() {
|
||||
|
||||
<div className="space-y-4">
|
||||
{filteredDoubts.map((doubt) => (
|
||||
<Card key={doubt.id} className="border-border shadow-sm hover:border-[#00F0FF]/50 transition-colors cursor-pointer">
|
||||
<Card key={doubt.id} className="border-border shadow-sm hover:border-[var(--cyan-ai-10)] transition-colors cursor-pointer">
|
||||
<CardContent className="p-0 flex">
|
||||
{/* Upvote Sidebar */}
|
||||
<div className="w-16 bg-secondary/20 border-r border-border flex flex-col items-center py-4 gap-1">
|
||||
<button className="p-1.5 text-muted-foreground hover:text-[#00F0FF] hover:bg-[#00F0FF]/10 rounded-lg transition-colors">
|
||||
<button className="p-1.5 text-muted-foreground hover:text-[var(--cyan-ai)] hover:bg-[var(--cyan-ai-10)] rounded-lg transition-colors">
|
||||
<ChevronUp size={24} />
|
||||
</button>
|
||||
<span className="font-bold text-foreground">{doubt.upvotes}</span>
|
||||
@@ -214,7 +214,7 @@ export default function CommunityPage() {
|
||||
{expandedDoubtId === doubt.id && (
|
||||
<div className="mt-6 pt-4 border-t border-border space-y-4 animate-in fade-in duration-300">
|
||||
<div className="flex gap-3">
|
||||
<div className="h-8 w-8 shrink-0 rounded-full bg-[#00F0FF]/10 text-[#00F0FF] flex items-center justify-center text-xs font-bold border border-[#00F0FF]/30">
|
||||
<div className="h-8 w-8 shrink-0 rounded-full bg-[var(--cyan-ai-10)] text-[var(--cyan-ai)] flex items-center justify-center text-xs font-bold border border-[var(--cyan-ai-30)]">
|
||||
AI
|
||||
</div>
|
||||
<div className="bg-secondary/40 rounded-2xl rounded-tl-none p-4 text-sm flex-1">
|
||||
@@ -232,9 +232,9 @@ export default function CommunityPage() {
|
||||
<input
|
||||
type="text"
|
||||
placeholder="Add a reply..."
|
||||
className="flex-1 bg-background border border-border rounded-xl px-4 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-[#00F0FF]/50"
|
||||
className="flex-1 bg-background border border-border rounded-xl px-4 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-[var(--cyan-ai-10)]"
|
||||
/>
|
||||
<button className="p-2 bg-[#00F0FF] text-black rounded-xl hover:bg-[#00d0dd] transition-colors">
|
||||
<button className="p-2 bg-[var(--cyan-ai)] text-black rounded-xl hover:bg-[#00d0dd] transition-colors">
|
||||
<Send size={16} />
|
||||
</button>
|
||||
</div>
|
||||
@@ -246,7 +246,7 @@ export default function CommunityPage() {
|
||||
))}
|
||||
{filteredDoubts.length === 0 && (
|
||||
<div className="text-center py-12 text-muted-foreground bg-secondary/10 border border-dashed border-border rounded-2xl p-6">
|
||||
<MessageSquare size={48} className="mx-auto mb-3 opacity-30 text-[#00F0FF]" />
|
||||
<MessageSquare size={48} className="mx-auto mb-3 opacity-30 text-[var(--cyan-ai)]" />
|
||||
<p className="font-bold text-foreground mb-1">
|
||||
{activeFilter === 'my-doubts' ? "No Doubts Asked Yet" : "No doubts found matching your criteria."}
|
||||
</p>
|
||||
@@ -264,7 +264,7 @@ export default function CommunityPage() {
|
||||
<div className="bg-background border border-border w-full max-w-2xl rounded-2xl shadow-2xl overflow-hidden animate-in zoom-in-95 duration-200">
|
||||
<div className="flex justify-between items-center p-6 border-b border-border bg-secondary/30">
|
||||
<h2 className="text-2xl font-bold flex items-center gap-2">
|
||||
<MessageSquare className="text-[#00F0FF]" /> Ask a Doubt
|
||||
<MessageSquare className="text-[var(--cyan-ai)]" /> Ask a Doubt
|
||||
</h2>
|
||||
<button
|
||||
onClick={() => setIsAskModalOpen(false)}
|
||||
@@ -278,7 +278,7 @@ export default function CommunityPage() {
|
||||
<div className="grid grid-cols-2 gap-4">
|
||||
<div className="space-y-1.5">
|
||||
<label className="text-sm font-medium text-muted-foreground">Subject</label>
|
||||
<select className="w-full bg-background border border-border rounded-xl px-4 py-2.5 text-sm focus:outline-none focus:ring-2 focus:ring-[#00F0FF]/50">
|
||||
<select className="w-full bg-background border border-border rounded-xl px-4 py-2.5 text-sm focus:outline-none focus:ring-2 focus:ring-[var(--cyan-ai-10)]">
|
||||
<option>Physics</option>
|
||||
<option>Chemistry</option>
|
||||
<option>Mathematics</option>
|
||||
@@ -290,7 +290,7 @@ export default function CommunityPage() {
|
||||
<input
|
||||
type="text"
|
||||
placeholder="e.g. Rotational Mechanics"
|
||||
className="w-full bg-background border border-border rounded-xl px-4 py-2.5 text-sm focus:outline-none focus:ring-2 focus:ring-[#00F0FF]/50"
|
||||
className="w-full bg-background border border-border rounded-xl px-4 py-2.5 text-sm focus:outline-none focus:ring-2 focus:ring-[var(--cyan-ai-10)]"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
@@ -300,7 +300,7 @@ export default function CommunityPage() {
|
||||
<input
|
||||
type="text"
|
||||
placeholder="What exactly are you stuck on?"
|
||||
className="w-full bg-background border border-border rounded-xl px-4 py-2.5 text-sm focus:outline-none focus:ring-2 focus:ring-[#00F0FF]/50"
|
||||
className="w-full bg-background border border-border rounded-xl px-4 py-2.5 text-sm focus:outline-none focus:ring-2 focus:ring-[var(--cyan-ai-10)]"
|
||||
/>
|
||||
</div>
|
||||
|
||||
@@ -309,17 +309,17 @@ export default function CommunityPage() {
|
||||
<textarea
|
||||
rows={4}
|
||||
placeholder="Explain your approach, what you've tried, and where you're getting stuck..."
|
||||
className="w-full bg-background border border-border rounded-xl px-4 py-3 text-sm focus:outline-none focus:ring-2 focus:ring-[#00F0FF]/50 resize-none"
|
||||
className="w-full bg-background border border-border rounded-xl px-4 py-3 text-sm focus:outline-none focus:ring-2 focus:ring-[var(--cyan-ai-10)] resize-none"
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div className="pt-2 border-t border-border flex justify-between items-center">
|
||||
<button className="flex items-center gap-2 text-muted-foreground hover:text-[#00F0FF] transition-colors text-sm font-medium px-3 py-2 rounded-lg hover:bg-secondary">
|
||||
<button className="flex items-center gap-2 text-muted-foreground hover:text-[var(--cyan-ai)] transition-colors text-sm font-medium px-3 py-2 rounded-lg hover:bg-secondary">
|
||||
<ImageIcon size={18} /> Attach Image
|
||||
</button>
|
||||
<button
|
||||
onClick={() => setIsAskModalOpen(false)}
|
||||
className="flex items-center gap-2 px-6 py-2.5 bg-[#00F0FF] text-black font-bold rounded-xl shadow-[0_0_15px_-3px_rgba(0,240,255,0.4)] hover:bg-[#00d0dd] transition-colors"
|
||||
className="flex items-center gap-2 px-6 py-2.5 bg-[var(--cyan-ai)] text-black font-bold rounded-xl shadow-[0_0_15px_-3px_rgba(12,96,96,0.4)] hover:bg-[#00d0dd] transition-colors"
|
||||
>
|
||||
Post Doubt <Send size={16} />
|
||||
</button>
|
||||
|
||||
Reference in New Issue
Block a user