diff --git a/assets/sass/main.scss b/assets/sass/main.scss index 371969f..0d30aa8 100644 --- a/assets/sass/main.scss +++ b/assets/sass/main.scss @@ -78,6 +78,17 @@ div.feature-matrix { vertical-align: center; } } +footer nav ul { + list-style: none; + padding: 0; + margin: 0; + display: flex; + flex-wrap: wrap; + gap: 0.5em 1em; +} +footer nav ul li a { + text-decoration: none; +} @media screen and (max-width: 450px) { big { font-size: 300%; diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html index 62ae931..bb929e2 100644 --- a/layouts/_default/baseof.html +++ b/layouts/_default/baseof.html @@ -7,6 +7,7 @@ {{- $style := resources.Get "sass/main.scss" | resources.ExecuteAsTemplate "main.scss" . | css.Sass }} + {{- partial "breadcrumbs.html" . -}} {{ partial "banner.html" . -}} diff --git a/layouts/_default/index.html b/layouts/_default/index.html index 80ee303..dc1e8ef 100644 --- a/layouts/_default/index.html +++ b/layouts/_default/index.html @@ -1,3 +1,4 @@ {{ define "main" }} {{ .Content | replaceRE "(

)" `${1} # ${3}` | safeHTML }} +{{ partial "footer.html" . }} {{ end }} diff --git a/layouts/_default/single.html b/layouts/_default/single.html index 0e25fd1..22bc9f8 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -2,4 +2,5 @@
{{ .Content }}
+{{ partial "footer.html" . }} {{ end }} diff --git a/layouts/partials/breadcrumbs.html b/layouts/partials/breadcrumbs.html new file mode 100644 index 0000000..7d897b1 --- /dev/null +++ b/layouts/partials/breadcrumbs.html @@ -0,0 +1,20 @@ + diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html new file mode 100644 index 0000000..c72ddfc --- /dev/null +++ b/layouts/partials/footer.html @@ -0,0 +1,10 @@ + diff --git a/script/graphviz-ssr.js b/script/graphviz-ssr.js index fdc5f65..b3f4a47 100755 --- a/script/graphviz-ssr.js +++ b/script/graphviz-ssr.js @@ -13,7 +13,10 @@ import Viz from "../static/js/viz-global.js" for (const { Path: pathInPublic } of JSON.parse(readFileSync("public/diagram-list.json", "utf-8"))) { const path = `public${pathInPublic}.html` const contents = readFileSync(path, "utf-8") - const html = parse(contents) + // `node-html-parser` can misparse unquoted URLs ending in `/` (e.g. `href=../architecture/`) + // and rewrite links as empty anchors. Quote these attribute values before parsing. + const normalized = contents.replace(/\b(href|src)=([^"'`\s>]+)/g, '$1="$2"') + const html = parse(normalized) const vizImport = html.querySelector('script[src$="viz-global.js"]') if (!vizImport) { console.error(`No 'viz-global.js' import found in ${path}; skipping`)