fix: adjust canvas layout after nav removal
Move canvas floating panels up and align logo/icon styling with the left rail navigation.
This commit is contained in:
parent
04706deb17
commit
fd5f93ba58
@ -459,7 +459,7 @@ export default function CanvasEditorPage({ params }: PageProps) {
|
||||
</div>
|
||||
|
||||
{/* 2. Floating Header (Top Left) */}
|
||||
<div className="absolute top-16 left-4 z-20 flex items-center gap-2 bg-background/80 backdrop-blur-md border rounded-xl p-1.5 shadow-sm">
|
||||
<div className="absolute top-4 left-4 z-20 flex items-center gap-2 bg-background/80 backdrop-blur-md border rounded-xl p-1.5 shadow-sm">
|
||||
<Tooltip>
|
||||
<TooltipTrigger asChild>
|
||||
<Button variant="ghost" size="icon" onClick={() => router.push('/')} className="rounded-lg h-8 w-8">
|
||||
@ -510,7 +510,7 @@ export default function CanvasEditorPage({ params }: PageProps) {
|
||||
|
||||
{/* 3. Floating Actions (Top Right) */}
|
||||
{!isPanelOpen && (
|
||||
<div className="absolute top-16 right-4 z-20 flex items-center gap-2">
|
||||
<div className="absolute top-4 right-4 z-20 flex items-center gap-2">
|
||||
<div className="bg-background/80 backdrop-blur-md border rounded-xl p-1.5 shadow-sm flex items-center gap-1">
|
||||
{/* Panel Toggle */}
|
||||
<Tooltip>
|
||||
@ -532,7 +532,7 @@ export default function CanvasEditorPage({ params }: PageProps) {
|
||||
|
||||
{/* 4. Floating Sidebar (Right) */}
|
||||
<div className={cn(
|
||||
"absolute top-16 right-4 bottom-4 z-10 w-[400px] transition-all duration-300 ease-in-out",
|
||||
"absolute top-4 right-4 bottom-4 z-10 w-[400px] transition-all duration-300 ease-in-out",
|
||||
isPanelOpen ? "translate-x-0 opacity-100" : "translate-x-[120%] opacity-0 pointer-events-none"
|
||||
)}>
|
||||
<div className="h-full w-full rounded-2xl border bg-background/95 backdrop-blur-md shadow-2xl overflow-hidden flex flex-col">
|
||||
|
||||
@ -121,8 +121,10 @@ export function TopNavbar({
|
||||
}
|
||||
};
|
||||
|
||||
// 决定显示哪个 LOGO
|
||||
const displayLogo = (siteLogoDark && siteLogoDark.trim() !== "") ? siteLogoDark : siteLogo;
|
||||
// 决定显示哪个 LOGO(浅色用普通,深色用暗色)
|
||||
const displayLogo = resolvedTheme === "dark"
|
||||
? (siteLogoDark && siteLogoDark.trim() !== "" ? siteLogoDark : siteLogo)
|
||||
: (siteLogo && siteLogo.trim() !== "" ? siteLogo : siteLogoDark);
|
||||
|
||||
const getShortLabel = (label: string) => {
|
||||
const trimmed = label.trim();
|
||||
@ -309,7 +311,7 @@ export function TopNavbar({
|
||||
window.location.href = "/featured";
|
||||
}}
|
||||
>
|
||||
<Sparkles className="h-5 w-5 text-yellow-400" />
|
||||
<Sparkles className="h-5 w-5" />
|
||||
<span className={navLabelClass}>{getShortLabel("AI精选")}</span>
|
||||
</a>
|
||||
|
||||
@ -324,7 +326,7 @@ export function TopNavbar({
|
||||
type="button"
|
||||
title="功能教程"
|
||||
>
|
||||
<PlayCircle className="h-5 w-5 text-green-400" />
|
||||
<PlayCircle className="h-5 w-5" />
|
||||
<span className={navLabelClass}>{getShortLabel("功能教程")}</span>
|
||||
</Button>
|
||||
</DropdownMenuTrigger>
|
||||
@ -383,7 +385,7 @@ export function TopNavbar({
|
||||
type="button"
|
||||
title="精选榜单"
|
||||
>
|
||||
<Trophy className="h-5 w-5 text-orange-400" />
|
||||
<Trophy className="h-5 w-5" />
|
||||
<span className={navLabelClass}>{getShortLabel("精选榜")}</span>
|
||||
</Button>
|
||||
</DropdownMenuTrigger>
|
||||
@ -453,7 +455,7 @@ export function TopNavbar({
|
||||
type="button"
|
||||
title="无限画布"
|
||||
>
|
||||
<LayoutGrid className="h-5 w-5 text-purple-400" />
|
||||
<LayoutGrid className="h-5 w-5" />
|
||||
<span className={navLabelClass}>{getShortLabel("无限画布")}</span>
|
||||
</button>
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user