- {/* Editor pane */}
- {editorVisible && (
- <>
-
-
-
-
- >
- )}
+ }
+ />
- {/* Canvas pane */}
-
- {/* Editor toggle button */}
-
+
+ {/* Editor pane */}
+ {editorVisible && (
+ <>
+
+
+
+
+ >
+ )}
- {/* User menu — sits below the canvas top header (which contains the
- legend) and below the SharePanel button so neither overlaps. */}
-
-
-
+ {/* Canvas pane */}
+
+ {/* Editor toggle button */}
+
-
+
+
)
diff --git a/apps/web/src/pages/GalleryPage.tsx b/apps/web/src/pages/GalleryPage.tsx
index 7fb1cc4..9d82cf9 100644
--- a/apps/web/src/pages/GalleryPage.tsx
+++ b/apps/web/src/pages/GalleryPage.tsx
@@ -1,14 +1,9 @@
import React from 'react'
-import { useNavigate } from 'react-router-dom'
+import { AppNav } from '../components/AppNav'
import { Gallery } from '../components/Gallery'
-import { UserMenu } from '../components/UserMenu'
const colors = {
background: '#080f1e',
- border: 'rgba(0, 229, 255, 0.12)',
- textPrimary: '#e0f7fa',
- textSecondary: '#78909c',
- textMuted: '#455a64',
}
const fonts = {
@@ -16,8 +11,6 @@ const fonts = {
}
export const GalleryPage: React.FC = () => {
- const navigate = useNavigate()
-
return (
{
fontFamily: fonts.mono,
}}
>
-
-
-
-
- GALLERY
-
-
- // what the community is running
-
-
-
-
+
= ({ to, children }) => {
- const navigate = useNavigate()
- return (
-
- )
-}
-
-const ExternalNavLink: React.FC<{ href: string; children: React.ReactNode }> = ({
- href,
- children,
-}) => (
-
{
- e.currentTarget.style.color = colors.primary
- }}
- onMouseLeave={(e) => {
- e.currentTarget.style.color = colors.textSecondary
- }}
- style={{
- color: colors.textSecondary,
- fontFamily: fonts.mono,
- fontSize: 11,
- letterSpacing: '0.04em',
- textDecoration: 'none',
- padding: '4px 0',
- }}
- >
- {children}
-
-)
-
const Badge: React.FC<{ children: React.ReactNode }> = ({ children }) => (
{
const navigate = useNavigate()
const [primaryCtaHovered, setPrimaryCtaHovered] = useState(false)
const [ghostCtaHovered, setGhostCtaHovered] = useState(false)
- const [newDiagramHovered, setNewDiagramHovered] = useState(false)
return (
{
fontFamily: fonts.mono,
}}
>
- {/* Nav strip */}
-
-
- >_
- stackdoc
-
-
-
- LIVE
-
-
-
-
-
-
-
-
-
-
+
{/* Hero */}
{
fontFamily: fonts.mono,
}}
>
- {/* Header */}
-
-
-
-
- MY CONFIGS
-
-
-
-
+
- {/* Body */}
void }> = ({ onClick }) => {
+ const [hovered, setHovered] = useState(false)
+ return (
+
+ )
+}
+
export const SharedView: React.FC = () => {
const { slug } = useParams<{ slug: string }>()
const navigate = useNavigate()
@@ -81,7 +110,7 @@ export const SharedView: React.FC = () => {
}, [slug, navigate])
const handleOpenInEditor = useCallback(() => {
- navigate('/', { state: { yaml: config?.yaml } })
+ navigate('/editor', { state: { yaml: config?.yaml } })
}, [config, navigate])
const handleEditOwnConfig = useCallback(() => {
@@ -104,22 +133,35 @@ export const SharedView: React.FC = () => {
}
}, [slug, config, navigate])
+ // Nav primary action: owners see EDIT (jumps to /edit/
); visitors get
+ // the AppNav's default NEW DIAGRAM button via the unset prop.
+ const navPrimaryAction = isOwner ? : undefined
+
// Loading state
if (loading) {
return (
- Loading topology...
+
+
+ Loading topology...
+
)
}
@@ -129,35 +171,29 @@ export const SharedView: React.FC = () => {
return (
-
404
-
{error || 'Config not found'}
-
)
}
@@ -167,35 +203,44 @@ export const SharedView: React.FC = () => {
return (
-
⚠
-
This config has invalid YAML
-
+
- {isOwner ? 'Edit to Fix' : 'Open in Editor to Fix'}
-
+
⚠
+
This config has invalid YAML
+
+
)
}
@@ -211,6 +256,8 @@ export const SharedView: React.FC = () => {
flexDirection: 'column',
}}
>
+
+
{/* Topology canvas — takes remaining vertical space. The canvas's own
bottom-anchored controls (zoom, fit, reset) now clear the shared
bottom bar because they're positioned within this flex item, not
@@ -223,19 +270,6 @@ export const SharedView: React.FC = () => {
}}
>
-
- {/* User menu — sits below the canvas top header so the legend keeps
- its full width. */}
-
-
-
{/* Bottom bar — shared config info */}
diff --git a/apps/web/src/pages/TemplatesPage.tsx b/apps/web/src/pages/TemplatesPage.tsx
index a8ede7c..811fe78 100644
--- a/apps/web/src/pages/TemplatesPage.tsx
+++ b/apps/web/src/pages/TemplatesPage.tsx
@@ -1,13 +1,9 @@
import React from 'react'
-import { useNavigate } from 'react-router-dom'
+import { AppNav } from '../components/AppNav'
import { Templates } from '../components/Templates'
-import { UserMenu } from '../components/UserMenu'
const colors = {
background: '#080f1e',
- border: 'rgba(0, 229, 255, 0.12)',
- textPrimary: '#e0f7fa',
- textSecondary: '#78909c',
}
const fonts = {
@@ -15,8 +11,6 @@ const fonts = {
}
export const TemplatesPage: React.FC = () => {
- const navigate = useNavigate()
-
return (
{
fontFamily: fonts.mono,
}}
>
-
-
-
-
- TEMPLATES
-
-
-
-
+