功能迁移,页面整体样式修改
This commit is contained in:
1 parent
04664c8d42
commit
bfd75da308
41 files changed
+2232
-1920
No files matched your search
@@ -0,0 +1,96 @@
|
||||
"use client";
|
||||
|
||||
import { useMemo, useState } from "react";
|
||||
import { ArrowRight, NotebookPen, Sparkles } from "lucide-react";
|
||||
|
||||
import { useTheme } from "@/contexts/ThemeContext";
|
||||
import { cn } from "@/lib/utils";
|
||||
|
||||
export default function LightAppNewNotePage() {
|
||||
const { theme } = useTheme();
|
||||
const isDark = theme === "dark";
|
||||
const [titleInput, setTitleInput] = useState("");
|
||||
|
||||
const hasTitle = useMemo(() => titleInput.trim().length > 0, [titleInput]);
|
||||
|
||||
return (
|
||||
<div
|
||||
className={cn(
|
||||
"flex h-full w-full items-center justify-center px-8",
|
||||
isDark ? "bg-slate-900/20" : "bg-[#fdfcfc]",
|
||||
)}
|
||||
>
|
||||
<div className="w-full max-w-[720px] -translate-y-12 space-y-8">
|
||||
{/* 固定标题:新建笔记 */}
|
||||
<div className="flex items-center gap-3">
|
||||
<NotebookPen
|
||||
className={cn("h-5 w-5 shrink-0", isDark ? "text-slate-400" : "text-black/70")}
|
||||
/>
|
||||
<h1
|
||||
className={cn(
|
||||
"text-base font-medium tracking-tight",
|
||||
isDark ? "text-slate-200" : "text-black/85",
|
||||
)}
|
||||
>
|
||||
新建笔记
|
||||
</h1>
|
||||
</div>
|
||||
|
||||
{/* 标题输入框 */}
|
||||
<div className="flex items-center gap-3">
|
||||
<input
|
||||
value={titleInput}
|
||||
onChange={(e) => setTitleInput(e.target.value)}
|
||||
placeholder="新建笔记"
|
||||
className={cn(
|
||||
"min-w-0 flex-1 bg-transparent text-[42px] leading-tight font-normal tracking-tight outline-none",
|
||||
hasTitle
|
||||
? isDark
|
||||
? "text-white"
|
||||
: "text-black/85"
|
||||
: isDark
|
||||
? "text-slate-500 placeholder:text-slate-600"
|
||||
: "text-black/25 placeholder:text-black/25",
|
||||
)}
|
||||
/>
|
||||
{hasTitle && (
|
||||
<button
|
||||
type="button"
|
||||
className={cn(
|
||||
"inline-flex h-9 w-9 shrink-0 items-center justify-center rounded-full transition-colors",
|
||||
isDark
|
||||
? "bg-blue-500 text-white hover:bg-blue-400"
|
||||
: "bg-sky-200 text-slate-700 hover:bg-sky-300",
|
||||
)}
|
||||
aria-label="进入笔记"
|
||||
>
|
||||
<ArrowRight className="h-4 w-4" />
|
||||
</button>
|
||||
)}
|
||||
</div>
|
||||
|
||||
{/* 说明文字 */}
|
||||
<div
|
||||
className={cn(
|
||||
"flex h-11 items-center gap-2.5 rounded-xl px-4",
|
||||
isDark
|
||||
? "border border-slate-700 bg-slate-800/70"
|
||||
: "border border-black/5 bg-[#ececef]",
|
||||
)}
|
||||
>
|
||||
<Sparkles
|
||||
className={cn("h-3.5 w-3.5 shrink-0", isDark ? "text-slate-400" : "text-black/55")}
|
||||
/>
|
||||
<p
|
||||
className={cn(
|
||||
"text-sm",
|
||||
isDark ? "text-slate-400" : "text-black/55",
|
||||
)}
|
||||
>
|
||||
新建笔记开始使用
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
Reference in new issue
Block a user