AV: precise recolor to spec — warm dark backgrounds (#1c1815/#231d18/#26201a/#15110e) + gold #F0A623 / orange #D85A30 accents + warm text (#FBEFE0/#C9BBA8/#8a7e6e). 138 component files + 36 token swaps.
This commit is contained in:
@@ -284,7 +284,7 @@ export default function AccountPage() {
|
||||
|
||||
if (loading) {
|
||||
return (
|
||||
<div className="min-h-screen bg-[#111111]">
|
||||
<div className="min-h-screen bg-[#1c1815]">
|
||||
<Header />
|
||||
<div className="max-w-container mx-auto px-4 py-12">
|
||||
<div className="max-w-3xl mx-auto space-y-4">
|
||||
@@ -298,21 +298,21 @@ export default function AccountPage() {
|
||||
}
|
||||
|
||||
return (
|
||||
<div className="min-h-screen bg-[#111111]">
|
||||
<div className="min-h-screen bg-[#1c1815]">
|
||||
<Header />
|
||||
|
||||
{/* Toast */}
|
||||
{toast && (
|
||||
<div
|
||||
className={`fixed bottom-6 left-1/2 -translate-x-1/2 z-50 border font-body text-sm px-5 py-3 rounded-sm shadow-lg flex items-center gap-2 animate-fade-in ${
|
||||
toast.type === "success" ?"bg-[#1a1208] border-[#ffb800] text-[#e0e0e0]" :"bg-[#1a0a0a] border-[#d60701] text-[#e0e0e0]"
|
||||
toast.type === "success" ?"bg-[#231d18] border-[#F0A623] text-[#e0e0e0]" :"bg-[#1a0a0a] border-[#D85A30] text-[#e0e0e0]"
|
||||
}`}>
|
||||
{toast.type === "success" ? (
|
||||
<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="#ffb800" strokeWidth="2.5" aria-hidden="true">
|
||||
<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="#F0A623" strokeWidth="2.5" aria-hidden="true">
|
||||
<polyline points="20 6 9 17 4 12" />
|
||||
</svg>
|
||||
) : (
|
||||
<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="#d60701" strokeWidth="2.5" aria-hidden="true">
|
||||
<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="#D85A30" strokeWidth="2.5" aria-hidden="true">
|
||||
<circle cx="12" cy="12" r="10" /><line x1="15" y1="9" x2="9" y2="15" /><line x1="9" y1="9" x2="15" y2="15" />
|
||||
</svg>
|
||||
)}
|
||||
@@ -321,10 +321,10 @@ export default function AccountPage() {
|
||||
)}
|
||||
|
||||
{/* Breadcrumb */}
|
||||
<div className="bg-[#0d0d0d] border-b border-[#1e1e1e]">
|
||||
<div className="bg-[#1c1815] border-b border-[#1e1e1e]">
|
||||
<div className="max-w-container mx-auto px-4 py-2.5">
|
||||
<nav aria-label="Breadcrumb" className="flex items-center gap-2 text-xs font-body text-[#555]">
|
||||
<Link href="/home-page" className="hover:text-[#ffb800] transition-colors">Home</Link>
|
||||
<Link href="/home-page" className="hover:text-[#F0A623] transition-colors">Home</Link>
|
||||
<span aria-hidden="true">/</span>
|
||||
<span className="text-[#888]">Account</span>
|
||||
</nav>
|
||||
@@ -336,25 +336,25 @@ export default function AccountPage() {
|
||||
{/* Page Header */}
|
||||
<div className="flex items-center justify-between mb-6">
|
||||
<div>
|
||||
<h1 className="font-heading text-2xl font-bold text-[#e8e8e8]">Account Settings</h1>
|
||||
<h1 className="font-heading text-2xl font-bold text-[#FBEFE0]">Account Settings</h1>
|
||||
<p className="font-body text-sm text-[#666] mt-1">{user?.email}</p>
|
||||
</div>
|
||||
<button
|
||||
onClick={handleSignOut}
|
||||
className="font-body text-xs font-bold uppercase tracking-wide text-[#888] hover:text-[#d60701] border border-[#2a2a2a] hover:border-[#d60701] px-4 py-2 rounded-sm transition-colors">
|
||||
className="font-body text-xs font-bold uppercase tracking-wide text-[#888] hover:text-[#D85A30] border border-[#3a322b] hover:border-[#D85A30] px-4 py-2 rounded-sm transition-colors">
|
||||
Sign Out
|
||||
</button>
|
||||
</div>
|
||||
|
||||
{/* Tabs */}
|
||||
<div className="flex border-b border-[#2a2a2a] mb-6 overflow-x-auto scrollbar-none">
|
||||
<div className="flex border-b border-[#3a322b] mb-6 overflow-x-auto scrollbar-none">
|
||||
{tabs.map((tab) => (
|
||||
<button
|
||||
key={tab.id}
|
||||
onClick={() => setActiveTab(tab.id)}
|
||||
className={`font-body text-sm font-bold uppercase tracking-wider px-4 py-3 border-b-2 transition-colors whitespace-nowrap ${
|
||||
activeTab === tab.id
|
||||
? "border-[#ffb800] text-[#ffb800]"
|
||||
? "border-[#F0A623] text-[#F0A623]"
|
||||
: "border-transparent text-[#666] hover:text-[#aaa]"
|
||||
}`}>
|
||||
{tab.label}
|
||||
@@ -365,8 +365,8 @@ export default function AccountPage() {
|
||||
{/* Profile Tab */}
|
||||
{activeTab === "profile" && (
|
||||
<form onSubmit={handleSaveProfile} className="space-y-5">
|
||||
<div className="bg-[#1a1a1a] border border-[#2a2a2a] rounded-sm p-6">
|
||||
<h2 className="font-heading text-base font-bold text-[#e0e0e0] mb-5 pb-3 border-b border-[#2a2a2a]">
|
||||
<div className="bg-[#231d18] border border-[#3a322b] rounded-sm p-6">
|
||||
<h2 className="font-heading text-base font-bold text-[#e0e0e0] mb-5 pb-3 border-b border-[#3a322b]">
|
||||
Public Profile
|
||||
</h2>
|
||||
<div className="space-y-4">
|
||||
@@ -379,7 +379,7 @@ export default function AccountPage() {
|
||||
value={fullName}
|
||||
onChange={(e) => setFullName(e.target.value)}
|
||||
placeholder="Your full name"
|
||||
className="w-full bg-[#111111] border border-[#2a2a2a] text-[#e0e0e0] font-body text-sm px-3 py-2.5 rounded-sm focus:outline-none focus:border-[#ffb800] focus:ring-1 focus:ring-[#ffb800] transition-colors placeholder-[#444]"
|
||||
className="w-full bg-[#1c1815] border border-[#3a322b] text-[#e0e0e0] font-body text-sm px-3 py-2.5 rounded-sm focus:outline-none focus:border-[#F0A623] focus:ring-1 focus:ring-[#F0A623] transition-colors placeholder-[#444]"
|
||||
/>
|
||||
</div>
|
||||
<div>
|
||||
@@ -391,7 +391,7 @@ export default function AccountPage() {
|
||||
onChange={(e) => setBio(e.target.value)}
|
||||
placeholder="Tell us a bit about yourself..."
|
||||
rows={3}
|
||||
className="w-full bg-[#111111] border border-[#2a2a2a] text-[#e0e0e0] font-body text-sm px-3 py-2.5 rounded-sm focus:outline-none focus:border-[#ffb800] focus:ring-1 focus:ring-[#ffb800] transition-colors placeholder-[#444] resize-none"
|
||||
className="w-full bg-[#1c1815] border border-[#3a322b] text-[#e0e0e0] font-body text-sm px-3 py-2.5 rounded-sm focus:outline-none focus:border-[#F0A623] focus:ring-1 focus:ring-[#F0A623] transition-colors placeholder-[#444] resize-none"
|
||||
/>
|
||||
</div>
|
||||
<div className="grid grid-cols-1 sm:grid-cols-2 gap-4">
|
||||
@@ -404,7 +404,7 @@ export default function AccountPage() {
|
||||
value={website}
|
||||
onChange={(e) => setWebsite(e.target.value)}
|
||||
placeholder="https://yoursite.com"
|
||||
className="w-full bg-[#111111] border border-[#2a2a2a] text-[#e0e0e0] font-body text-sm px-3 py-2.5 rounded-sm focus:outline-none focus:border-[#ffb800] focus:ring-1 focus:ring-[#ffb800] transition-colors placeholder-[#444]"
|
||||
className="w-full bg-[#1c1815] border border-[#3a322b] text-[#e0e0e0] font-body text-sm px-3 py-2.5 rounded-sm focus:outline-none focus:border-[#F0A623] focus:ring-1 focus:ring-[#F0A623] transition-colors placeholder-[#444]"
|
||||
/>
|
||||
</div>
|
||||
<div>
|
||||
@@ -416,15 +416,15 @@ export default function AccountPage() {
|
||||
value={location}
|
||||
onChange={(e) => setLocation(e.target.value)}
|
||||
placeholder="City, Country"
|
||||
className="w-full bg-[#111111] border border-[#2a2a2a] text-[#e0e0e0] font-body text-sm px-3 py-2.5 rounded-sm focus:outline-none focus:border-[#ffb800] focus:ring-1 focus:ring-[#ffb800] transition-colors placeholder-[#444]"
|
||||
className="w-full bg-[#1c1815] border border-[#3a322b] text-[#e0e0e0] font-body text-sm px-3 py-2.5 rounded-sm focus:outline-none focus:border-[#F0A623] focus:ring-1 focus:ring-[#F0A623] transition-colors placeholder-[#444]"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className="bg-[#1a1a1a] border border-[#2a2a2a] rounded-sm p-6">
|
||||
<h2 className="font-heading text-base font-bold text-[#e0e0e0] mb-3 pb-3 border-b border-[#2a2a2a]">
|
||||
<div className="bg-[#231d18] border border-[#3a322b] rounded-sm p-6">
|
||||
<h2 className="font-heading text-base font-bold text-[#e0e0e0] mb-3 pb-3 border-b border-[#3a322b]">
|
||||
Account Info
|
||||
</h2>
|
||||
<div>
|
||||
@@ -435,7 +435,7 @@ export default function AccountPage() {
|
||||
type="email"
|
||||
value={user?.email || ""}
|
||||
disabled
|
||||
className="w-full bg-[#0d0d0d] border border-[#222] text-[#555] font-body text-sm px-3 py-2.5 rounded-sm cursor-not-allowed"
|
||||
className="w-full bg-[#1c1815] border border-[#222] text-[#555] font-body text-sm px-3 py-2.5 rounded-sm cursor-not-allowed"
|
||||
/>
|
||||
<p className="font-body text-xs text-[#555] mt-1.5">Email cannot be changed here.</p>
|
||||
</div>
|
||||
@@ -445,7 +445,7 @@ export default function AccountPage() {
|
||||
<button
|
||||
type="submit"
|
||||
disabled={saving}
|
||||
className="bg-[#ffb800] hover:bg-[#d99700] text-white font-body text-xs font-bold uppercase tracking-wide px-6 py-2.5 rounded-sm transition-colors disabled:opacity-60 focus:outline-none focus-visible:ring-2 focus-visible:ring-[#ffb800]">
|
||||
className="bg-[#F0A623] hover:bg-[#BA7517] text-white font-body text-xs font-bold uppercase tracking-wide px-6 py-2.5 rounded-sm transition-colors disabled:opacity-60 focus:outline-none focus-visible:ring-2 focus-visible:ring-[#F0A623]">
|
||||
{saving ? "Saving..." : "Save Profile"}
|
||||
</button>
|
||||
</div>
|
||||
@@ -456,8 +456,8 @@ export default function AccountPage() {
|
||||
{activeTab === "security" && (
|
||||
<div className="space-y-5">
|
||||
<form onSubmit={handleChangePassword}>
|
||||
<div className="bg-[#1a1a1a] border border-[#2a2a2a] rounded-sm p-6">
|
||||
<h2 className="font-heading text-base font-bold text-[#e0e0e0] mb-5 pb-3 border-b border-[#2a2a2a]">
|
||||
<div className="bg-[#231d18] border border-[#3a322b] rounded-sm p-6">
|
||||
<h2 className="font-heading text-base font-bold text-[#e0e0e0] mb-5 pb-3 border-b border-[#3a322b]">
|
||||
Change Password
|
||||
</h2>
|
||||
<div className="space-y-4">
|
||||
@@ -471,7 +471,7 @@ export default function AccountPage() {
|
||||
onChange={(e) => setNewPassword(e.target.value)}
|
||||
placeholder="Enter new password"
|
||||
minLength={6}
|
||||
className="w-full bg-[#111111] border border-[#2a2a2a] text-[#e0e0e0] font-body text-sm px-3 py-2.5 rounded-sm focus:outline-none focus:border-[#ffb800] focus:ring-1 focus:ring-[#ffb800] transition-colors placeholder-[#444]"
|
||||
className="w-full bg-[#1c1815] border border-[#3a322b] text-[#e0e0e0] font-body text-sm px-3 py-2.5 rounded-sm focus:outline-none focus:border-[#F0A623] focus:ring-1 focus:ring-[#F0A623] transition-colors placeholder-[#444]"
|
||||
/>
|
||||
</div>
|
||||
<div>
|
||||
@@ -484,7 +484,7 @@ export default function AccountPage() {
|
||||
onChange={(e) => setConfirmPassword(e.target.value)}
|
||||
placeholder="Confirm new password"
|
||||
minLength={6}
|
||||
className="w-full bg-[#111111] border border-[#2a2a2a] text-[#e0e0e0] font-body text-sm px-3 py-2.5 rounded-sm focus:outline-none focus:border-[#ffb800] focus:ring-1 focus:ring-[#ffb800] transition-colors placeholder-[#444]"
|
||||
className="w-full bg-[#1c1815] border border-[#3a322b] text-[#e0e0e0] font-body text-sm px-3 py-2.5 rounded-sm focus:outline-none focus:border-[#F0A623] focus:ring-1 focus:ring-[#F0A623] transition-colors placeholder-[#444]"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
@@ -492,7 +492,7 @@ export default function AccountPage() {
|
||||
<button
|
||||
type="submit"
|
||||
disabled={changingPassword || !newPassword || !confirmPassword}
|
||||
className="bg-[#ffb800] hover:bg-[#d99700] text-white font-body text-xs font-bold uppercase tracking-wide px-6 py-2.5 rounded-sm transition-colors disabled:opacity-60 focus:outline-none focus-visible:ring-2 focus-visible:ring-[#ffb800]">
|
||||
className="bg-[#F0A623] hover:bg-[#BA7517] text-white font-body text-xs font-bold uppercase tracking-wide px-6 py-2.5 rounded-sm transition-colors disabled:opacity-60 focus:outline-none focus-visible:ring-2 focus-visible:ring-[#F0A623]">
|
||||
{changingPassword ? "Updating..." : "Update Password"}
|
||||
</button>
|
||||
</div>
|
||||
@@ -506,7 +506,7 @@ export default function AccountPage() {
|
||||
</p>
|
||||
<button
|
||||
onClick={handleSignOut}
|
||||
className="font-body text-xs font-bold uppercase tracking-wide text-[#d60701] border border-[#d60701]/40 hover:border-[#d60701] hover:bg-[#d60701]/10 px-5 py-2 rounded-sm transition-colors">
|
||||
className="font-body text-xs font-bold uppercase tracking-wide text-[#D85A30] border border-[#D85A30]/40 hover:border-[#D85A30] hover:bg-[#D85A30]/10 px-5 py-2 rounded-sm transition-colors">
|
||||
Sign Out of All Sessions
|
||||
</button>
|
||||
</div>
|
||||
@@ -520,12 +520,12 @@ export default function AccountPage() {
|
||||
<h2 className="font-heading text-base font-bold text-[#e0e0e0]">
|
||||
Saved Articles
|
||||
{bookmarks.length > 0 && (
|
||||
<span className="ml-2 font-body text-xs text-[#666] bg-[#1a1a1a] border border-[#2a2a2a] px-2 py-0.5 rounded-sm">
|
||||
<span className="ml-2 font-body text-xs text-[#666] bg-[#231d18] border border-[#3a322b] px-2 py-0.5 rounded-sm">
|
||||
{bookmarks.length}
|
||||
</span>
|
||||
)}
|
||||
</h2>
|
||||
<Link href="/reading-list" className="font-body text-xs font-bold uppercase tracking-wide text-[#ffb800] hover:text-[#d99700] transition-colors">
|
||||
<Link href="/reading-list" className="font-body text-xs font-bold uppercase tracking-wide text-[#F0A623] hover:text-[#BA7517] transition-colors">
|
||||
Full List →
|
||||
</Link>
|
||||
</div>
|
||||
@@ -533,37 +533,37 @@ export default function AccountPage() {
|
||||
{bookmarksLoading ? (
|
||||
<div className="space-y-3">
|
||||
{[1, 2, 3].map((i) => (
|
||||
<div key={i} className="bg-[#1a1a1a] border border-[#2a2a2a] rounded-sm p-4 animate-pulse">
|
||||
<div key={i} className="bg-[#231d18] border border-[#3a322b] rounded-sm p-4 animate-pulse">
|
||||
<div className="flex gap-3">
|
||||
<div className="w-20 h-14 bg-[#252525] rounded-sm flex-shrink-0" />
|
||||
<div className="w-20 h-14 bg-[#3a322b] rounded-sm flex-shrink-0" />
|
||||
<div className="flex-1 space-y-2">
|
||||
<div className="h-3 bg-[#252525] rounded w-1/4" />
|
||||
<div className="h-4 bg-[#252525] rounded w-3/4" />
|
||||
<div className="h-3 bg-[#3a322b] rounded w-1/4" />
|
||||
<div className="h-4 bg-[#3a322b] rounded w-3/4" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
) : bookmarks.length === 0 ? (
|
||||
<div className="text-center py-12 bg-[#1a1a1a] border border-[#2a2a2a] rounded-sm">
|
||||
<div className="text-center py-12 bg-[#231d18] border border-[#3a322b] rounded-sm">
|
||||
<svg width="32" height="32" viewBox="0 0 24 24" fill="none" stroke="#444" strokeWidth="1.5" className="mx-auto mb-3" aria-hidden="true">
|
||||
<path d="M19 21l-7-5-7 5V5a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2z" />
|
||||
</svg>
|
||||
<p className="font-body text-sm text-[#666]">No saved articles yet.</p>
|
||||
<Link href="/news" className="inline-block mt-3 font-body text-xs font-bold uppercase tracking-wide text-[#ffb800] hover:text-[#d99700] transition-colors">
|
||||
<Link href="/news" className="inline-block mt-3 font-body text-xs font-bold uppercase tracking-wide text-[#F0A623] hover:text-[#BA7517] transition-colors">
|
||||
Browse News →
|
||||
</Link>
|
||||
</div>
|
||||
) : (
|
||||
<div className="space-y-3">
|
||||
{bookmarks.map((item) => (
|
||||
<div key={item.id} className="bg-[#1a1a1a] border border-[#2a2a2a] rounded-sm hover:border-[#3a3a3a] transition-colors group">
|
||||
<div key={item.id} className="bg-[#231d18] border border-[#3a322b] rounded-sm hover:border-[#3a3a3a] transition-colors group">
|
||||
<div className="flex gap-3 p-4">
|
||||
<Link href={`/articles/${item.article_slug}`} className="flex-shrink-0 w-20 h-14 overflow-hidden rounded-sm">
|
||||
{item.article_image ? (
|
||||
<AppImage src={item.article_image} alt={item.article_image_alt || item.article_title} width={80} height={56} className="w-full h-full object-cover" />
|
||||
) : (
|
||||
<div className="w-full h-full bg-[#252525] flex items-center justify-center">
|
||||
<div className="w-full h-full bg-[#3a322b] flex items-center justify-center">
|
||||
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="#444" strokeWidth="1.5" aria-hidden="true">
|
||||
<rect x="3" y="3" width="18" height="18" rx="2" /><circle cx="8.5" cy="8.5" r="1.5" /><polyline points="21 15 16 10 5 21" />
|
||||
</svg>
|
||||
@@ -572,10 +572,10 @@ export default function AccountPage() {
|
||||
</Link>
|
||||
<div className="flex-1 min-w-0">
|
||||
{item.article_category && (
|
||||
<span className="font-body text-[9px] font-bold uppercase tracking-widest text-[#ffb800]">{item.article_category}</span>
|
||||
<span className="font-body text-[9px] font-bold uppercase tracking-widest text-[#F0A623]">{item.article_category}</span>
|
||||
)}
|
||||
<Link href={`/articles/${item.article_slug}`}>
|
||||
<h3 className="font-heading text-sm font-bold text-[#e0e0e0] group-hover:text-[#ffb800] transition-colors line-clamp-2 leading-snug mt-0.5">
|
||||
<h3 className="font-heading text-sm font-bold text-[#e0e0e0] group-hover:text-[#F0A623] transition-colors line-clamp-2 leading-snug mt-0.5">
|
||||
{item.article_title}
|
||||
</h3>
|
||||
</Link>
|
||||
@@ -605,7 +605,7 @@ export default function AccountPage() {
|
||||
<h2 className="font-heading text-base font-bold text-[#e0e0e0]">
|
||||
Reading History
|
||||
{history.length > 0 && (
|
||||
<span className="ml-2 font-body text-xs text-[#666] bg-[#1a1a1a] border border-[#2a2a2a] px-2 py-0.5 rounded-sm">
|
||||
<span className="ml-2 font-body text-xs text-[#666] bg-[#231d18] border border-[#3a322b] px-2 py-0.5 rounded-sm">
|
||||
{history.length}
|
||||
</span>
|
||||
)}
|
||||
@@ -622,37 +622,37 @@ export default function AccountPage() {
|
||||
{historyLoading ? (
|
||||
<div className="space-y-3">
|
||||
{[1, 2, 3].map((i) => (
|
||||
<div key={i} className="bg-[#1a1a1a] border border-[#2a2a2a] rounded-sm p-4 animate-pulse">
|
||||
<div key={i} className="bg-[#231d18] border border-[#3a322b] rounded-sm p-4 animate-pulse">
|
||||
<div className="flex gap-3">
|
||||
<div className="w-20 h-14 bg-[#252525] rounded-sm flex-shrink-0" />
|
||||
<div className="w-20 h-14 bg-[#3a322b] rounded-sm flex-shrink-0" />
|
||||
<div className="flex-1 space-y-2">
|
||||
<div className="h-3 bg-[#252525] rounded w-1/4" />
|
||||
<div className="h-4 bg-[#252525] rounded w-3/4" />
|
||||
<div className="h-3 bg-[#3a322b] rounded w-1/4" />
|
||||
<div className="h-4 bg-[#3a322b] rounded w-3/4" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
) : history.length === 0 ? (
|
||||
<div className="text-center py-12 bg-[#1a1a1a] border border-[#2a2a2a] rounded-sm">
|
||||
<div className="text-center py-12 bg-[#231d18] border border-[#3a322b] rounded-sm">
|
||||
<svg width="32" height="32" viewBox="0 0 24 24" fill="none" stroke="#444" strokeWidth="1.5" className="mx-auto mb-3" aria-hidden="true">
|
||||
<circle cx="12" cy="12" r="10" /><polyline points="12 6 12 12 16 14" />
|
||||
</svg>
|
||||
<p className="font-body text-sm text-[#666]">No reading history yet.</p>
|
||||
<Link href="/news" className="inline-block mt-3 font-body text-xs font-bold uppercase tracking-wide text-[#ffb800] hover:text-[#d99700] transition-colors">
|
||||
<Link href="/news" className="inline-block mt-3 font-body text-xs font-bold uppercase tracking-wide text-[#F0A623] hover:text-[#BA7517] transition-colors">
|
||||
Browse News →
|
||||
</Link>
|
||||
</div>
|
||||
) : (
|
||||
<div className="space-y-3">
|
||||
{history.map((item) => (
|
||||
<div key={item.id} className="bg-[#1a1a1a] border border-[#2a2a2a] rounded-sm hover:border-[#3a3a3a] transition-colors group">
|
||||
<div key={item.id} className="bg-[#231d18] border border-[#3a322b] rounded-sm hover:border-[#3a3a3a] transition-colors group">
|
||||
<div className="flex gap-3 p-4">
|
||||
<Link href={`/articles/${item.article_slug}`} className="flex-shrink-0 w-20 h-14 overflow-hidden rounded-sm">
|
||||
{item.article_image ? (
|
||||
<AppImage src={item.article_image} alt={item.article_image_alt || item.article_title} width={80} height={56} className="w-full h-full object-cover" />
|
||||
) : (
|
||||
<div className="w-full h-full bg-[#252525] flex items-center justify-center">
|
||||
<div className="w-full h-full bg-[#3a322b] flex items-center justify-center">
|
||||
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="#444" strokeWidth="1.5" aria-hidden="true">
|
||||
<rect x="3" y="3" width="18" height="18" rx="2" /><circle cx="8.5" cy="8.5" r="1.5" /><polyline points="21 15 16 10 5 21" />
|
||||
</svg>
|
||||
@@ -661,10 +661,10 @@ export default function AccountPage() {
|
||||
</Link>
|
||||
<div className="flex-1 min-w-0">
|
||||
{item.article_category && (
|
||||
<span className="font-body text-[9px] font-bold uppercase tracking-widest text-[#ffb800]">{item.article_category}</span>
|
||||
<span className="font-body text-[9px] font-bold uppercase tracking-widest text-[#F0A623]">{item.article_category}</span>
|
||||
)}
|
||||
<Link href={`/articles/${item.article_slug}`}>
|
||||
<h3 className="font-heading text-sm font-bold text-[#e0e0e0] group-hover:text-[#ffb800] transition-colors line-clamp-2 leading-snug mt-0.5">
|
||||
<h3 className="font-heading text-sm font-bold text-[#e0e0e0] group-hover:text-[#F0A623] transition-colors line-clamp-2 leading-snug mt-0.5">
|
||||
{item.article_title}
|
||||
</h3>
|
||||
</Link>
|
||||
@@ -693,17 +693,17 @@ export default function AccountPage() {
|
||||
{topicsLoading ? (
|
||||
<div className="grid grid-cols-2 sm:grid-cols-3 gap-3">
|
||||
{[1, 2, 3, 4, 5, 6].map((i) => (
|
||||
<div key={i} className="bg-[#1a1a1a] border border-[#2a2a2a] rounded-sm p-4 animate-pulse h-16" />
|
||||
<div key={i} className="bg-[#231d18] border border-[#3a322b] rounded-sm p-4 animate-pulse h-16" />
|
||||
))}
|
||||
</div>
|
||||
) : topics.length === 0 ? (
|
||||
<div className="text-center py-12 bg-[#1a1a1a] border border-[#2a2a2a] rounded-sm">
|
||||
<div className="text-center py-12 bg-[#231d18] border border-[#3a322b] rounded-sm">
|
||||
<svg width="32" height="32" viewBox="0 0 24 24" fill="none" stroke="#444" strokeWidth="1.5" className="mx-auto mb-3" aria-hidden="true">
|
||||
<path d="M20.59 13.41l-7.17 7.17a2 2 0 0 1-2.83 0L2 12V2h10l8.59 8.59a2 2 0 0 1 0 2.82z" /><line x1="7" y1="7" x2="7.01" y2="7" />
|
||||
</svg>
|
||||
<p className="font-body text-sm text-[#666]">No topic preferences tracked yet.</p>
|
||||
<p className="font-body text-xs text-[#555] mt-1">Read articles to build your interest profile.</p>
|
||||
<Link href="/news" className="inline-block mt-3 font-body text-xs font-bold uppercase tracking-wide text-[#ffb800] hover:text-[#d99700] transition-colors">
|
||||
<Link href="/news" className="inline-block mt-3 font-body text-xs font-bold uppercase tracking-wide text-[#F0A623] hover:text-[#BA7517] transition-colors">
|
||||
Browse News →
|
||||
</Link>
|
||||
</div>
|
||||
@@ -714,18 +714,18 @@ export default function AccountPage() {
|
||||
const maxCount = topics[0]?.view_count || 1;
|
||||
const pct = Math.round((t.view_count / maxCount) * 100);
|
||||
return (
|
||||
<div key={t.id} className="bg-[#1a1a1a] border border-[#2a2a2a] rounded-sm p-4 hover:border-[#3a3a3a] transition-colors">
|
||||
<div key={t.id} className="bg-[#231d18] border border-[#3a322b] rounded-sm p-4 hover:border-[#3a3a3a] transition-colors">
|
||||
<div className="flex items-start justify-between mb-2">
|
||||
<span className="font-body text-xs font-bold uppercase tracking-wider text-[#e0e0e0] capitalize leading-tight">
|
||||
{t.topic}
|
||||
</span>
|
||||
<span className="font-body text-[10px] text-[#ffb800] font-bold ml-2 flex-shrink-0">
|
||||
<span className="font-body text-[10px] text-[#F0A623] font-bold ml-2 flex-shrink-0">
|
||||
{t.view_count}×
|
||||
</span>
|
||||
</div>
|
||||
<div className="w-full bg-[#252525] rounded-full h-1">
|
||||
<div className="w-full bg-[#3a322b] rounded-full h-1">
|
||||
<div
|
||||
className="bg-[#ffb800] h-1 rounded-full transition-all"
|
||||
className="bg-[#F0A623] h-1 rounded-full transition-all"
|
||||
style={{ width: `${pct}%` }}
|
||||
/>
|
||||
</div>
|
||||
@@ -744,13 +744,13 @@ export default function AccountPage() {
|
||||
{/* Preferences Tab */}
|
||||
{activeTab === "preferences" && (
|
||||
<div className="space-y-5">
|
||||
<div className="bg-[#1a1a1a] border border-[#2a2a2a] rounded-sm p-6">
|
||||
<h2 className="font-heading text-base font-bold text-[#e0e0e0] mb-5 pb-3 border-b border-[#2a2a2a]">
|
||||
<div className="bg-[#231d18] border border-[#3a322b] rounded-sm p-6">
|
||||
<h2 className="font-heading text-base font-bold text-[#e0e0e0] mb-5 pb-3 border-b border-[#3a322b]">
|
||||
Forum Reputation
|
||||
</h2>
|
||||
<div className="flex items-center gap-4">
|
||||
<div className="flex flex-col items-center justify-center bg-[#111] border border-[#2a2a2a] rounded-sm px-6 py-4 min-w-[100px]">
|
||||
<span className="font-heading text-3xl font-bold text-[#ffb800]">
|
||||
<div className="flex flex-col items-center justify-center bg-[#111] border border-[#3a322b] rounded-sm px-6 py-4 min-w-[100px]">
|
||||
<span className="font-heading text-3xl font-bold text-[#F0A623]">
|
||||
{profile?.reputation ?? 0}
|
||||
</span>
|
||||
<span className="font-body text-xs text-[#666] mt-1 uppercase tracking-wider">Points</span>
|
||||
@@ -759,15 +759,15 @@ export default function AccountPage() {
|
||||
<p className="font-body text-sm text-[#aaa] leading-relaxed">
|
||||
Earn reputation by posting helpful threads and replies in the community forum.
|
||||
</p>
|
||||
<Link href="/forum" className="inline-block mt-3 font-body text-xs font-bold uppercase tracking-wide text-[#ffb800] hover:text-[#d99700] transition-colors">
|
||||
<Link href="/forum" className="inline-block mt-3 font-body text-xs font-bold uppercase tracking-wide text-[#F0A623] hover:text-[#BA7517] transition-colors">
|
||||
Go to Forum →
|
||||
</Link>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className="bg-[#1a1a1a] border border-[#2a2a2a] rounded-sm p-6">
|
||||
<h2 className="font-heading text-base font-bold text-[#e0e0e0] mb-5 pb-3 border-b border-[#2a2a2a]">
|
||||
<div className="bg-[#231d18] border border-[#3a322b] rounded-sm p-6">
|
||||
<h2 className="font-heading text-base font-bold text-[#e0e0e0] mb-5 pb-3 border-b border-[#3a322b]">
|
||||
Reading Preferences
|
||||
</h2>
|
||||
<div className="space-y-4">
|
||||
@@ -778,7 +778,7 @@ export default function AccountPage() {
|
||||
</div>
|
||||
<Link
|
||||
href="/home-page"
|
||||
className="font-body text-xs font-bold uppercase tracking-wide text-[#ffb800] hover:text-[#d99700] transition-colors">
|
||||
className="font-body text-xs font-bold uppercase tracking-wide text-[#F0A623] hover:text-[#BA7517] transition-colors">
|
||||
Manage →
|
||||
</Link>
|
||||
</div>
|
||||
@@ -789,7 +789,7 @@ export default function AccountPage() {
|
||||
</div>
|
||||
<Link
|
||||
href="/reading-list"
|
||||
className="font-body text-xs font-bold uppercase tracking-wide text-[#ffb800] hover:text-[#d99700] transition-colors">
|
||||
className="font-body text-xs font-bold uppercase tracking-wide text-[#F0A623] hover:text-[#BA7517] transition-colors">
|
||||
View List →
|
||||
</Link>
|
||||
</div>
|
||||
@@ -808,8 +808,8 @@ export default function AccountPage() {
|
||||
onClick={() => handleToggleDigest(!weeklyDigest)}
|
||||
aria-pressed={weeklyDigest}
|
||||
aria-label="Toggle weekly digest email"
|
||||
className={`relative inline-flex h-6 w-11 flex-shrink-0 cursor-pointer rounded-full border-2 transition-colors duration-200 ease-in-out focus:outline-none focus-visible:ring-2 focus-visible:ring-[#ffb800] disabled:opacity-50 ${
|
||||
weeklyDigest ? "bg-[#ffb800] border-[#ffb800]" : "bg-[#2a2a2a] border-[#333]"
|
||||
className={`relative inline-flex h-6 w-11 flex-shrink-0 cursor-pointer rounded-full border-2 transition-colors duration-200 ease-in-out focus:outline-none focus-visible:ring-2 focus-visible:ring-[#F0A623] disabled:opacity-50 ${
|
||||
weeklyDigest ? "bg-[#F0A623] border-[#F0A623]" : "bg-[#3a322b] border-[#333]"
|
||||
}`}>
|
||||
<span
|
||||
className={`pointer-events-none inline-block h-4 w-4 transform rounded-full bg-white shadow transition duration-200 ease-in-out mt-0.5 ${
|
||||
|
||||
Reference in New Issue
Block a user