From caa16a0ce8ff6317ccde78f95c521a3d36674ddb Mon Sep 17 00:00:00 2001 From: Hans Dijkema Date: Fri, 14 Aug 2026 23:30:48 +0200 Subject: [PATCH] Graph functionality op basis van Cytoscape.js --- README.md | 5 ++ static/css/wiki.css | 48 +++++++++++++++ static/index.html | 11 ++++ static/js/wiki.js | 146 +++++++++++++++++++++++++++++++++++++++++++- translate.rkt | 4 +- 5 files changed, 211 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 3d90132..095123d 100644 --- a/README.md +++ b/README.md @@ -339,3 +339,8 @@ The special translations page is now one page named `wiki-translations`. It is p ## Version 0.2.13 Version 0.2.13 centers the wiki name in the sidebar and makes it a link to the first/start page. The sticky top chrome now starts without top padding (`padding-top: 0`). + + +## Version 0.2.14 + +Version 0.2.14 fixes the wiki-name/home navigation so clicking the wiki name, including while a special view such as Todo is open, always returns to the first/start page. It also adds a lightweight Wiki Graph view. The graph uses the existing pages and their internal Markdown links, requires no extra JavaScript dependency or database migration, and opens a page when its node is selected. diff --git a/static/css/wiki.css b/static/css/wiki.css index 41e56d5..32e8c76 100644 --- a/static/css/wiki.css +++ b/static/css/wiki.css @@ -966,3 +966,51 @@ body.editor-mode .editor-metadata-row { background: white; } } + + +/* Wiki graph ------------------------------------------------------------- */ +#graph-view { + max-width: 1100px; +} + +.wiki-graph-shell { + margin-top: 18px; + border: 1px solid var(--wiki-border); + background: #fafafa; + overflow: auto; +} + +.wiki-graph { + display: block; + width: 100%; + min-width: 720px; + min-height: 520px; +} + +.wiki-graph-edges line { + stroke: #b8b8b8; + stroke-width: 1.4; +} + +.wiki-graph-node { + cursor: pointer; + outline: none; +} + +.wiki-graph-node circle { + fill: #46639b; + stroke: white; + stroke-width: 2; +} + +.wiki-graph-node text { + fill: var(--wiki-text); + font-family: Arial, Helvetica, sans-serif; + font-size: 14px; +} + +.wiki-graph-node:hover circle, +.wiki-graph-node:focus circle { + fill: #1e2f6d; + stroke: #1e2f6d; +} diff --git a/static/index.html b/static/index.html index 42e57b2..ab349b9 100644 --- a/static/index.html +++ b/static/index.html @@ -17,6 +17,7 @@