Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions 23 assets/sass/main.scss
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,29 @@ 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;
justify-content: center;
text-align: center;
}
footer nav ul li a {
text-decoration: none;
}
.footer-favicon {
width: 24px;
height: 24px;
display: block;
}
.footer-home-link {
display: block;
width: 24px;
margin: 0.75em auto 0;
}
@media screen and (max-width: 450px) {
big {
font-size: 300%;
Expand Down
1 change: 1 addition & 0 deletions 1 layouts/_default/baseof.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
<link rel="icon" href="{{ relURL "favicon.ico" }}">
{{- $style := resources.Get "sass/main.scss" | resources.ExecuteAsTemplate "main.scss" . | css.Sass }}
<link rel="stylesheet" href="{{ $style.RelPermalink }}">
{{- partial "breadcrumbs.html" . -}}
</head>
<body>
{{ partial "banner.html" . -}}
Expand Down
1 change: 1 addition & 0 deletions 1 layouts/_default/index.html
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{{ define "main" }}
{{ .Content | replaceRE "(<h2 id=\"([^\"]+)\".+)(</h[1-9]+>)" `${1} <a href="#${2}">#</a> ${3}` | safeHTML }}
{{ partial "footer.html" . }}
{{ end }}
1 change: 1 addition & 0 deletions 1 layouts/_default/single.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@
<div class="block">
{{ .Content }}
</div>
{{ partial "footer.html" . }}
{{ end }}
20 changes: 20 additions & 0 deletions 20 layouts/partials/breadcrumbs.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "BreadcrumbList",
"itemListElement": [
{
"@type": "ListItem",
"position": 1,
"name": "Home",
"item": "{{ .Site.BaseURL }}"
}{{ if ne .Kind "home" }},
{
"@type": "ListItem",
"position": 2,
"name": "{{ .Title }}",
"item": "{{ .Permalink }}"
}{{ end }}
]
}
</script>
13 changes: 13 additions & 0 deletions 13 layouts/partials/footer.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<footer>
<hr>
<nav>
<ul>
<li><a href="{{ relURL "/" }}">Home</a></li>
<li><a href="{{ relURL "architecture/" }}">Architecture</a></li>
<li><a href="{{ relURL "reply-to-this/" }}">Reply to this</a></li>
</ul>
</nav>
<a class="footer-home-link" href="{{ relURL "/" }}" aria-label="Home">
<img class="footer-favicon" src="{{ relURL "favicon.ico" }}" alt="" aria-hidden="true">
</a>
</footer>
5 changes: 4 additions & 1 deletion 5 script/graphviz-ssr.js
Original file line number Diff line number Diff line change
Expand Up @@ -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`)
Expand Down
Morty Proxy This is a proxified and sanitized view of the page, visit original site.