From 1055c110f400a87ee36cae8cffef1f28e215458c Mon Sep 17 00:00:00 2001 From: luxick Date: Wed, 1 Jul 2026 09:59:32 +0200 Subject: [PATCH] Rework app-shell layout --- CLAUDE.md | 2 - assets/layout.html | 31 ++-- assets/overlay.js | 107 ++++++++++++++ assets/page/header-actions.js | 16 +++ assets/page/main.html | 31 ++-- assets/page/sidebar-fab.js | 21 ++- assets/page/toc.js | 3 +- assets/style.css | 260 +++++++++++++++++++--------------- assets/tree-sidebar.js | 17 +-- 9 files changed, 318 insertions(+), 170 deletions(-) create mode 100644 assets/overlay.js create mode 100644 assets/page/header-actions.js diff --git a/CLAUDE.md b/CLAUDE.md index 30ce536..d146121 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -51,8 +51,6 @@ Non-existent paths without a trailing slash redirect to the slash form (GET only are not redirected because `path.Clean` strips the trailing slash from `PostURL` and the content would be lost). -Do not add new endpoints without a concrete stated need. - ## Code Structure When adding a new special folder type, create a new `.go` file. Do not add type-specific logic to `main.go` or `render.go`. diff --git a/assets/layout.html b/assets/layout.html index 8ddee8b..c747716 100644 --- a/assets/layout.html +++ b/assets/layout.html @@ -13,7 +13,8 @@ - {{if not .EditMode}}{{end}} + {{if not .EditMode}} + {{end}} {{block "headScripts" .}}{{end}} @@ -28,21 +29,23 @@ {{end}}
{{block "headerActions" .}}{{end}}
-
+
{{if not .EditMode}}{{end}} -
- {{block "content" .}}{{end}} -
- +
+
+ {{block "content" .}}{{end}} +
+
+ Request: {{.RenderMS}} ms + {{block "footerExtras" .}}{{end}} + +
+
+ {{if not .EditMode}}{{end}}
-
- Request: {{.RenderMS}} ms - {{block "footerExtras" .}}{{end}} - -
{{block "extras" .}}{{end}} diff --git a/assets/overlay.js b/assets/overlay.js new file mode 100644 index 0000000..b923387 --- /dev/null +++ b/assets/overlay.js @@ -0,0 +1,107 @@ +// Full-viewport Overlay component (mobile). Distinct from the .modal dialog: +// this hosts a whole rail (the folder tree or the right-rail widgets/TOC) at +// full screen with its own scroll and a top-right close control. It reuses the +// low-level focus/Escape/bfcache patterns from modal.js rather than that +// component's panel chrome. +// +// openOverlay(node, opts) MOVES `node` (an existing rail