增加文章列表

This commit is contained in:
tianyaxiang 2025-01-29 20:25:34 +08:00
parent 0735074a20
commit 660a48118f
2 changed files with 8 additions and 8 deletions

View File

@ -10,8 +10,8 @@ import { ThemeToggle } from '@/components/theme/ThemeToggle'
export default function WechatPage() { export default function WechatPage() {
return ( return (
<main className="min-h-screen bg-background"> <main className="h-full bg-background flex flex-col">
<header className="sticky top-0 z-50 w-full border-b bg-background/95 backdrop-blur supports-[backdrop-filter]:bg-background/60"> <header className="flex-none sticky top-0 z-50 w-full border-b bg-background/95 backdrop-blur supports-[backdrop-filter]:bg-background/60">
<div className="container flex h-14 max-w-screen-2xl items-center px-4"> <div className="container flex h-14 max-w-screen-2xl items-center px-4">
<div className="flex items-center flex-1 gap-2"> <div className="flex items-center flex-1 gap-2">
<div className="md:hidden"> <div className="md:hidden">
@ -65,7 +65,7 @@ export default function WechatPage() {
</nav> </nav>
</div> </div>
</header> </header>
<div className="relative h-[calc(100vh-3.5rem)]"> <div className="flex-1 relative">
<WechatEditor /> <WechatEditor />
</div> </div>
</main> </main>

View File

@ -605,7 +605,7 @@ export default function WechatEditor() {
return ( return (
<div className="h-full flex flex-col"> <div className="h-full flex flex-col">
<div className="border-b bg-background/95 backdrop-blur supports-[backdrop-filter]:bg-background/60 sticky top-0 z-20"> <div className="flex-none border-b bg-background/95 backdrop-blur supports-[backdrop-filter]:bg-background/60 sticky top-0 z-20">
<div className="container mx-auto"> <div className="container mx-auto">
<div className="p-4"> <div className="p-4">
<div className="flex flex-col sm:flex-row items-start sm:items-center justify-between gap-4"> <div className="flex flex-col sm:flex-row items-start sm:items-center justify-between gap-4">
@ -683,14 +683,14 @@ export default function WechatEditor() {
</div> </div>
</div> </div>
<div className="flex-1 flex flex-col sm:flex-row overflow-hidden sm:pb-0 pb-16"> <div className="flex-1 flex flex-col sm:flex-row overflow-hidden">
<div <div
ref={editorRef} ref={editorRef}
className={cn( className={cn(
"editor-container bg-background transition-all duration-300 ease-in-out", "editor-container bg-background transition-all duration-300 ease-in-out",
showPreview showPreview
? "h-[calc(50vh-4rem)] sm:h-[calc(100vh-7.5rem)] sm:w-1/2 border-b sm:border-r" ? "h-[50%] sm:h-full sm:w-1/2 border-b sm:border-r"
: "h-[calc(100vh-10rem)] sm:h-[calc(100vh-7.5rem)] w-full", : "h-full w-full",
selectedTemplate && templates.find(t => t.id === selectedTemplate)?.styles selectedTemplate && templates.find(t => t.id === selectedTemplate)?.styles
)} )}
style={{ style={{
@ -715,7 +715,7 @@ export default function WechatEditor() {
ref={previewRef} ref={previewRef}
className={cn( className={cn(
"preview-container bg-background transition-all duration-300 ease-in-out flex flex-col", "preview-container bg-background transition-all duration-300 ease-in-out flex flex-col",
"h-[calc(50vh-4rem)] sm:h-[calc(100vh-7.5rem)] sm:w-1/2", "h-[50%] sm:h-full sm:w-1/2",
"markdown-body", "markdown-body",
selectedTemplate && templates.find(t => t.id === selectedTemplate)?.styles selectedTemplate && templates.find(t => t.id === selectedTemplate)?.styles
)} )}