diff --git a/shared/base.css b/shared/base.css index 358db01..838d0f5 100644 --- a/shared/base.css +++ b/shared/base.css @@ -35,6 +35,20 @@ /* Shape */ --radius: 4px; + /* Spacing scale — referenced by the tables tool (tables/css/table.css). + Were undefined (var() with no fallback → collapsed to 0), which left + table cells unpadded and the table flush to the viewport edges. */ + --spacing-sm: 0.4rem; + --spacing-md: 0.8rem; + --spacing-lg: 1.5rem; + + /* Token aliases the tables tool references under --color-*/--radius-* + names; map them to the canonical tokens (themed values flow through). */ + --color-text-muted: var(--text-muted); + --color-border: var(--border); + --color-bg-elevated: var(--bg-secondary); + --radius-sm: var(--radius); + /* Typography. --font-display covers headings (Source Serif 4 — a refined transitional serif that reads as "engineering / document / serious" without being academic). --font is body UI text (IBM Plex Sans — diff --git a/tables/css/table.css b/tables/css/table.css index 00b0bca..4a3fbc8 100644 --- a/tables/css/table.css +++ b/tables/css/table.css @@ -1,7 +1,9 @@ /* tables/ — directory-of-YAML table view. Reuses tokens from shared/base.css. */ .table-main { - padding: var(--spacing-md); + /* Vertical breathing room + clear left/right gutters so the table isn't + flush to the viewport edges. */ + padding: var(--spacing-md) var(--spacing-lg); max-width: 100%; } diff --git a/zddc/internal/handler/profilepage.go b/zddc/internal/handler/profilepage.go index 33cfcf4..25ff529 100644 --- a/zddc/internal/handler/profilepage.go +++ b/zddc/internal/handler/profilepage.go @@ -3,6 +3,7 @@ package handler import ( "html/template" "net/http" + "strings" "codeberg.org/VARASYS/ZDDC/zddc/internal/config" "codeberg.org/VARASYS/ZDDC/zddc/internal/zddc" @@ -79,17 +80,28 @@ func serveProfilePage(cfg config.Config, w http.ResponseWriter, r *http.Request) // project" to POST /.profile/projects (only when the caller can create one). func buildProfileTableContext(cfg config.Config, r *http.Request) map[string]interface{} { view := enumerateAccess(r.Context(), DeciderFromContext(r), cfg, PrincipalFromContext(r), "") + // Clicking a project/subtree row opens its .zddc INFO FORM (title, roles, + // admins, …) in the browse editor — not the project's files. The browse + // ?file=.zddc deep link selects + previews that dir's .zddc, which renders + // as the schema-driven form (real or a virtual placeholder). dir_tool at + // these paths is browse, so the trailing-slash URL loads the shell. + zddcFormURL := func(dirURL string) string { + if !strings.HasSuffix(dirURL, "/") { + dirURL += "/" + } + return dirURL + "?file=.zddc" + } rows := []map[string]interface{}{} for _, proj := range view.Projects { rows = append(rows, map[string]interface{}{ - "url": proj.URL, + "url": zddcFormURL(proj.URL), "editable": false, "data": map[string]interface{}{"name": proj.Name, "title": proj.Title, "kind": "project"}, }) } for _, sub := range view.AdminSubtrees { rows = append(rows, map[string]interface{}{ - "url": sub.Path, + "url": zddcFormURL(sub.Path), "editable": false, "data": map[string]interface{}{"name": sub.Path, "title": sub.Title, "kind": "admin"}, }) diff --git a/zddc/internal/handler/tables.html b/zddc/internal/handler/tables.html index 0158f7b..4b00051 100644 --- a/zddc/internal/handler/tables.html +++ b/zddc/internal/handler/tables.html @@ -74,6 +74,20 @@ /* Shape */ --radius: 4px; + /* Spacing scale — referenced by the tables tool (tables/css/table.css). + Were undefined (var() with no fallback → collapsed to 0), which left + table cells unpadded and the table flush to the viewport edges. */ + --spacing-sm: 0.4rem; + --spacing-md: 0.8rem; + --spacing-lg: 1.5rem; + + /* Token aliases the tables tool references under --color-*/--radius-* + names; map them to the canonical tokens (themed values flow through). */ + --color-text-muted: var(--text-muted); + --color-border: var(--border); + --color-bg-elevated: var(--bg-secondary); + --radius-sm: var(--radius); + /* Typography. --font-display covers headings (Source Serif 4 — a refined transitional serif that reads as "engineering / document / serious" without being academic). --font is body UI text (IBM Plex Sans — @@ -1182,7 +1196,9 @@ body.is-elevated::after { /* tables/ — directory-of-YAML table view. Reuses tokens from shared/base.css. */ .table-main { - padding: var(--spacing-md); + /* Vertical breathing room + clear left/right gutters so the table isn't + flush to the viewport edges. */ + padding: var(--spacing-md) var(--spacing-lg); max-width: 100%; } @@ -1632,7 +1648,7 @@ body.is-elevated::after {
ZDDC Table - v0.0.27-dev · 2026-06-06 23:22:12 · 0c6396d-dirty + v0.0.27-dev · 2026-06-07 13:11:11 · 1b9fec6-dirty