feat: improve styles

This commit is contained in:
2026-04-03 15:04:10 +02:00
parent f082a30b7f
commit 0d469f70bf
4 changed files with 85 additions and 85 deletions

View File

@@ -23,8 +23,8 @@ export default function PreviewPane() {
return ( return (
<div className="flex flex-col h-full"> <div className="flex flex-col h-full">
<div className="flex items-center px-3 py-1.5 border-b-2 border-border shrink-0 gap-2"> <div className="flex items-center px-4 py-2 border-b-2 border-border shrink-0 gap-2">
<span className="text-xs text-muted-foreground flex-1"> <span className="font-medium text-foreground flex-1">
Preview Preview
{isDynamic && ( {isDynamic && (
<span className="ml-1.5 text-primary/60 text-[10px]" title="Dynamic page"></span> <span className="ml-1.5 text-primary/60 text-[10px]" title="Dynamic page"></span>

View File

@@ -24,7 +24,7 @@ export default function ToolBar({
const navigate = useNavigate(); const navigate = useNavigate();
return ( return (
<div className="flex items-center gap-2 px-3 py-1.5 border-b-2 border-border shrink-0"> <div className="flex items-center gap-2 px-4 py-2 border-b-2 border-border shrink-0">
<button <button
onClick={() => navigate("/")} onClick={() => navigate("/")}
className="text-muted-foreground hover:text-foreground transition-colors flex items-center gap-1 text-xs uppercase tracking-wider" className="text-muted-foreground hover:text-foreground transition-colors flex items-center gap-1 text-xs uppercase tracking-wider"

View File

@@ -115,94 +115,94 @@ export default function DashboardView() {
</Button> </Button>
<Button onClick={() => navigate("/editor/new")}> <Button onClick={() => navigate("/editor/new")}>
<Plus className="w-4 h-4 mr-2" /> <Plus className="w-4 h-4 mr-2" />
New Page New Page
</Button> </Button>
</div>
</div> </div>
</div>
{/* Table inside bordered container */} {/* Table inside bordered container */}
<Table> <Table>
<TableHeader> <TableHeader>
<TableRow> <TableRow>
<TableHead>Name</TableHead> <TableHead>Name</TableHead>
<TableHead>Title</TableHead> <TableHead>Title</TableHead>
<TableHead>Status</TableHead> <TableHead>Status</TableHead>
<TableHead>Size</TableHead> <TableHead>Size</TableHead>
<TableHead className="w-8" /> <TableHead className="w-8" />
</TableRow>
</TableHeader>
<TableBody>
{pages.map((p) => (
<TableRow
key={p.name}
className="cursor-pointer"
onClick={() => navigate(`/editor/${p.name}`)}
>
<TableCell className="font-mono">
{p.name}
{p.name === "index" && (
<span className="ml-2 text-xs text-primary">homepage</span>
)}
</TableCell>
<TableCell className="text-muted-foreground">
{p.title ?? "—"}
</TableCell>
<TableCell>
<StatusBadge published={p.published} hasSource={p.has_source} />
</TableCell>
<TableCell className="text-muted-foreground">
{p.size != null ? `${p.size} B` : "—"}
</TableCell>
<TableCell className="text-right w-8">
<Popover>
<PopoverTrigger
render={
<button
onClick={(e) => e.stopPropagation()}
className="p-1 text-muted-foreground hover:text-foreground transition-colors cursor-pointer"
>
<MoreVertical className="w-4 h-4" />
</button>
}
/>
<PopoverContent side="bottom" align="end" sideOffset={4}
className="w-36 p-1"
>
<button
onClick={(e) => { e.stopPropagation(); navigate(`/editor/${p.name}`); }}
className="w-full text-left px-3 py-1.5 text-xs hover:bg-accent transition-colors cursor-pointer"
>Edit</button>
{p.published ? (
<button
onClick={(e) => { e.stopPropagation(); handleUnpublish(p.name); }}
className="w-full text-left px-3 py-1.5 text-xs hover:bg-accent transition-colors cursor-pointer"
>Unpublish</button>
) : (
<button
onClick={(e) => { e.stopPropagation(); handlePublish(p.name); }}
className="w-full text-left px-3 py-1.5 text-xs hover:bg-accent transition-colors cursor-pointer"
>Publish</button>
)}
<button
onClick={(e) => { e.stopPropagation(); setPageToDelete(p.name); }}
className="w-full text-left px-3 py-1.5 text-xs text-destructive hover:bg-accent transition-colors cursor-pointer"
>Delete</button>
</PopoverContent>
</Popover>
</TableCell>
</TableRow> </TableRow>
))} </TableHeader>
{pages.length === 0 && ( <TableBody>
<TableRow> {pages.map((p) => (
<TableCell <TableRow
colSpan={5} key={p.name}
className="text-center text-muted-foreground py-8" className="cursor-pointer"
onClick={() => navigate(`/editor/${p.name}`)}
> >
No pages yet. Create one to get started. <TableCell className="font-mono">
</TableCell> {p.name}
</TableRow> {p.name === "index" && (
)} <span className="ml-2 text-xs text-primary">homepage</span>
</TableBody> )}
</TableCell>
<TableCell className="text-muted-foreground">
{p.title ?? "—"}
</TableCell>
<TableCell>
<StatusBadge published={p.published} hasSource={p.has_source} />
</TableCell>
<TableCell className="text-muted-foreground">
{p.size != null ? `${p.size} B` : "—"}
</TableCell>
<TableCell className="text-right w-8">
<Popover>
<PopoverTrigger
render={
<button
onClick={(e) => e.stopPropagation()}
className="p-1 text-muted-foreground hover:text-foreground transition-colors cursor-pointer"
>
<MoreVertical className="w-4 h-4" />
</button>
}
/>
<PopoverContent side="bottom" align="end" sideOffset={4}
className="w-36 p-1"
>
<button
onClick={(e) => { e.stopPropagation(); navigate(`/editor/${p.name}`); }}
className="w-full text-left px-3 py-1.5 text-xs hover:bg-accent transition-colors cursor-pointer"
>Edit</button>
{p.published ? (
<button
onClick={(e) => { e.stopPropagation(); handleUnpublish(p.name); }}
className="w-full text-left px-3 py-1.5 text-xs hover:bg-accent transition-colors cursor-pointer"
>Unpublish</button>
) : (
<button
onClick={(e) => { e.stopPropagation(); handlePublish(p.name); }}
className="w-full text-left px-3 py-1.5 text-xs hover:bg-accent transition-colors cursor-pointer"
>Publish</button>
)}
<button
onClick={(e) => { e.stopPropagation(); setPageToDelete(p.name); }}
className="w-full text-left px-3 py-1.5 text-xs text-destructive hover:bg-accent transition-colors cursor-pointer"
>Delete</button>
</PopoverContent>
</Popover>
</TableCell>
</TableRow>
))}
{pages.length === 0 && (
<TableRow>
<TableCell
colSpan={5}
className="text-center text-muted-foreground py-8"
>
No pages yet. Create one to get started.
</TableCell>
</TableRow>
)}
</TableBody>
</Table> </Table>
</div>{/* end bordered container */} </div>{/* end bordered container */}

View File

@@ -206,8 +206,8 @@ function SourcePane({
return ( return (
<div className="flex flex-col h-full"> <div className="flex flex-col h-full">
<div className="flex items-center px-3 py-1.5 border-b-2 border-border shrink-0 gap-2"> <div className="flex items-center px-4 py-2 border-b-2 border-border shrink-0 gap-2">
<span className="text-xs text-muted-foreground flex-1">Source</span> <span className="font-medium text-foreground flex-1">Source</span>
<Popover open={examplesOpen} onOpenChange={setExamplesOpen}> <Popover open={examplesOpen} onOpenChange={setExamplesOpen}>
<PopoverTrigger <PopoverTrigger