From b3afd64769ffdff16c9d8923512ca4ef895c6ebf Mon Sep 17 00:00:00 2001 From: Hans Dijkema Date: Sat, 15 Aug 2026 00:51:51 +0200 Subject: [PATCH] graph functionality --- README.md | 4 ++-- info.rkt | 2 +- static/css/wiki.css | 34 ++++++++++++++++++++++++++++++++++ static/index.html | 4 ++-- static/js/wiki.js | 40 ++++++++++++++++++++++++++++++++++++++-- translate.rkt | 4 ++-- 6 files changed, 79 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 095123d..81f9b02 100644 --- a/README.md +++ b/README.md @@ -341,6 +341,6 @@ The special translations page is now one page named `wiki-translations`. It is p 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 +## 0.2.15 -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. +The page table of contents now includes a `(context)` link. It opens a graph containing the current page and all pages that link directly to it or are linked directly from it. The current page is highlighted. Heading anchors also reserve space for the sticky top navigation so a selected heading remains visible. diff --git a/info.rkt b/info.rkt index f7f6203..f9d4017 100644 --- a/info.rkt +++ b/info.rkt @@ -1,7 +1,7 @@ #lang info (define pkg-authors '(hnmdijkema)) -(define version "0.2.14") +(define version "0.2.15") (define license 'MIT) (define collection "racket-wiki") (define pkg-desc diff --git a/static/css/wiki.css b/static/css/wiki.css index 32e8c76..448eb16 100644 --- a/static/css/wiki.css +++ b/static/css/wiki.css @@ -1014,3 +1014,37 @@ body.editor-mode .editor-metadata-row { fill: #1e2f6d; stroke: #1e2f6d; } + + +/* 0.2.15 context navigation and sticky-anchor correction ---------------- */ +.context-link { + color: var(--wiki-link); + font-size: .76rem; + font-weight: 400; + letter-spacing: normal; + text-transform: none; + text-decoration: none; +} + +.context-link:hover { + text-decoration: underline; +} + +.markdown-body h1, +.markdown-body h2, +.markdown-body h3, +.markdown-body h4, +.markdown-body h5, +.markdown-body h6 { + scroll-margin-top: 82px; +} + +.wiki-graph-node-focus circle { + r: 15px; + fill: #1e2f6d; + stroke: #1e2f6d; +} + +.wiki-graph-node-focus text { + font-weight: 700; +} diff --git a/static/index.html b/static/index.html index ab349b9..82a81e7 100644 --- a/static/index.html +++ b/static/index.html @@ -22,7 +22,7 @@