File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -78,6 +78,29 @@ div.feature-matrix {
7878 vertical-align: center;
7979 }
8080}
81+ footer nav ul {
82+ list-style: none;
83+ padding: 0;
84+ margin: 0;
85+ display: flex;
86+ flex-wrap: wrap;
87+ gap: 0.5em 1em;
88+ justify-content: center;
89+ text-align: center;
90+ }
91+ footer nav ul li a {
92+ text-decoration: none;
93+ }
94+ .footer-favicon {
95+ width: 24px;
96+ height: 24px;
97+ display: block;
98+ }
99+ .footer-home-link {
100+ display: block;
101+ width: 24px;
102+ margin: 0.75em auto 0;
103+ }
81104@media screen and (max-width: 450px) {
82105 big {
83106 font-size: 300%;
Original file line number Diff line number Diff line change 77 <link rel="icon" href="{{ relURL "favicon.ico" }}">
88 {{- $style := resources.Get "sass/main.scss" | resources.ExecuteAsTemplate "main.scss" . | css.Sass }}
99 <link rel="stylesheet" href="{{ $style.RelPermalink }}">
10+ {{- partial "breadcrumbs.html" . -}}
1011 </head>
1112 <body>
1213 {{ partial "banner.html" . -}}
Original file line number Diff line number Diff line change 11{{ define "main" }}
22{{ .Content | replaceRE "(<h2 id=\"([^\"]+)\".+)(</h[1-9]+>)" `${1} <a href="#${2}">#</a> ${3}` | safeHTML }}
3+ {{ partial "footer.html" . }}
34{{ end }}
Original file line number Diff line number Diff line change 22<div class="block">
33{{ .Content }}
44</div>
5+ {{ partial "footer.html" . }}
56{{ end }}
Original file line number Diff line number Diff line change 1+ <script type="application/ld+json">
2+ {
3+ "@context": "https://schema.org",
4+ "@type": "BreadcrumbList",
5+ "itemListElement": [
6+ {
7+ "@type": "ListItem",
8+ "position": 1,
9+ "name": "Home",
10+ "item": "{{ .Site.BaseURL }}"
11+ }{{ if ne .Kind "home" }},
12+ {
13+ "@type": "ListItem",
14+ "position": 2,
15+ "name": "{{ .Title }}",
16+ "item": "{{ .Permalink }}"
17+ }{{ end }}
18+ ]
19+ }
20+ </script>
Original file line number Diff line number Diff line change 1+ <footer>
2+ <hr>
3+ <nav>
4+ <ul>
5+ <li><a href="{{ relURL "/" }}">Home</a></li>
6+ <li><a href="{{ relURL "architecture/" }}">Architecture</a></li>
7+ <li><a href="{{ relURL "reply-to-this/" }}">Reply to this</a></li>
8+ </ul>
9+ </nav>
10+ <a class="footer-home-link" href="{{ relURL "/" }}" aria-label="Home">
11+ <img class="footer-favicon" src="{{ relURL "favicon.ico" }}" alt="" aria-hidden="true">
12+ </a>
13+ </footer>
Original file line number Diff line number Diff line change @@ -13,7 +13,10 @@ import Viz from "../static/js/viz-global.js"
1313 for (const { Path: pathInPublic } of JSON.parse(readFileSync("public/diagram-list.json", "utf-8"))) {
1414 const path = `public${pathInPublic}.html`
1515 const contents = readFileSync(path, "utf-8")
16- const html = parse(contents)
16+ // `node-html-parser` can misparse unquoted URLs ending in `/` (e.g. `href=../architecture/`)
17+ // and rewrite links as empty anchors. Quote these attribute values before parsing.
18+ const normalized = contents.replace(/\b(href|src)=([^"'`\s>]+)/g, '$1="$2"')
19+ const html = parse(normalized)
1720 const vizImport = html.querySelector('script[src$="viz-global.js"]')
1821 if (!vizImport) {
1922 console.error(`No 'viz-global.js' import found in ${path}; skipping`)
You can’t perform that action at this time.
0 commit comments