fix(dashboard): inject improvement modal via head config, not _footer.md

_footer.md is not a supported special file in Observable Framework 1.13.3
and was silently ignored. The preview server does serve src/*.js files at
their root-relative path, so the correct approach is a <script type="module">
in the head config — runs once on page load, persists across SPA navigation.
Removed _footer.md.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-18 00:28:06 +01:00
parent 4d0941b524
commit f3568cb111
2 changed files with 4 additions and 6 deletions

View File

@@ -75,6 +75,10 @@ export default {
],
theme: ["air", "near-midnight"],
head: `<link rel="icon" href="data:image/svg+xml,<svg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 100 100%22><text y=%22.9em%22 font-size=%2290%22>🗄️</text></svg>">
<script type="module">
import {initImprovementModal} from "/components/improvement-modal.js";
initImprovementModal({apiBase: "http://127.0.0.1:8000", domain: "custodian"});
</script>
<style>
.kpi-infobox { background: var(--theme-background-alt, #f9f9f9); border: 1px solid var(--theme-foreground-faint, #e0e0e0); border-radius: 10px; padding: 0.75rem 1rem; position: relative; box-shadow: 0 1px 6px rgba(0,0,0,0.07); margin-bottom: 1.25rem; }
.kpi-infobox-title { font-size: 0.68rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--theme-foreground-muted, #888); margin-bottom: 0.55rem; padding-right: 1.6rem; }

View File

@@ -1,6 +0,0 @@
```js
// Right-click improvement modal — initialised once, active on every page
import {initImprovementModal} from "./components/improvement-modal.js";
import {API} from "./components/config.js";
initImprovementModal({apiBase: API, domain: "custodian"});
```