feat(design): restyle shell with flat Modernist sidebar, mobile nav and bell

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
This commit is contained in:
2026-09-30 19:06:17 +08:00
co-authored by Claude Haiku 4.5
parent e7416bf236
commit 0b5020b3d0
4 changed files with 107 additions and 97 deletions
+7 -6
View File
@@ -2,6 +2,7 @@
import { useCallback, useEffect, useRef, useState } from 'react'
import Link from 'next/link'
import { Bell } from 'lucide-react'
type Notification = {
id: string
@@ -62,11 +63,11 @@ export function NotificationBell() {
<button
onClick={() => setOpen(o => !o)}
aria-label={`Notifications${unread > 0 ? ` (${unread} unread)` : ''}`}
className="relative bg-surface rounded-full shadow-sm border border-divider w-10 h-10 flex items-center justify-center hover:shadow-md transition-shadow"
className="relative bg-surface border border-divider w-10 h-10 flex items-center justify-center text-ink cursor-pointer transition-colors hover:bg-ink/7 active:bg-ink/15"
>
<span className="text-lg" aria-hidden>🔔</span>
<Bell size={18} strokeWidth={2} aria-hidden />
{unread > 0 && (
<span className="absolute -top-1 -right-1 bg-red-600 text-white text-[10px] font-bold rounded-full min-w-[18px] h-[18px] px-1 flex items-center justify-center">
<span className="absolute -top-1 -right-1 bg-accent text-ground text-[10px] font-extrabold min-w-[18px] h-[18px] px-1 flex items-center justify-center">
{unread > 99 ? '99+' : unread}
</span>
)}
@@ -74,10 +75,10 @@ export function NotificationBell() {
{open && (
<div className="absolute right-0 mt-2 w-80 max-h-96 overflow-y-auto bg-surface shadow-lg border border-divider">
<div className="flex items-center justify-between px-4 py-2 border-b border-divider">
<span className="text-sm font-semibold text-gray-700">Notifications</span>
<div className="flex items-center justify-between px-4 py-2 border-b-2 border-divider">
<span className="text-sm font-extrabold text-ink">Notifications</span>
{unread > 0 && (
<button onClick={markAllRead} className="text-xs text-blue-600 hover:underline">
<button onClick={markAllRead} className="text-xs text-accent-700 hover:underline">
Mark all read
</button>
)}