hmn/src/templates/src/layouts/base.html

100 lines
3.7 KiB
HTML

<!DOCTYPE html>
<html lang="en-US" {{ if .OpenGraphItems }} prefix="og: http://ogp.me/ns#"{{ end }}>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
{{ if .CanonicalLink }}<link rel="canonical" href="{{ .CanonicalLink }}">{{ end }}
{{ range .OpenGraphItems }}
{{ if .Property }}
<meta property="{{ .Property }}" content="{{ .Value }}" />
{{ else }}
<meta name="{{ .Name }}" content="{{ .Value }}" />
{{ end }}
{{ end }}
{{ if .Title }}
<title>{{ .Title }} | Handmade Network</title>
{{ else }}
<title>Handmade Network</title>
{{ end }}
<link rel="stylesheet" href="{{ static "fonts/mohave/stylesheet.css" }}">
<link href='https://fonts.googleapis.com/css?family=Fira+Sans:300,400,500,600' rel='stylesheet' type='text/css'>
<link href='https://fonts.googleapis.com/css?family=Fira+Mono:300,400,500,700' rel='stylesheet' type='text/css'>
<link rel="stylesheet" type="text/css" href="{{ static "style.css" }}" />
{{/* <link rel="stylesheet" href="{{ .ProjectCSSUrl }}" /> */}}
<link rel="apple-touch-icon" sizes="400x400" href="{{ static "logo.png" }}">
<link rel="icon" type="image/png" sizes="16x16" href="{{ static "favicon-16x16.png" }}">
<link rel="icon" type="image/png" sizes="32x32" href="{{ static "favicon-32x32.png" }}">
<link rel="icon" type="image/png" sizes="400x400" href="{{ static "logo.png" }}">
<meta name="msapplication-TileColor" content="#ffffff">
<meta name="msapplication-TileImage" content="{{ static "ms-icon-144x144.png" }}">
{{ if .Project.Color1 }}
<meta name="theme-color" content="#{{ .Project.Color1 }}">
{{ else }}
<meta name="theme-color" content="#ffffff">
{{ end }}
<script>
MathJax = {
tex: {
inlineMath: [['$', '$']],
displayMath: [['$$', '$$']],
},
svg: {
fontCache: 'global',
}
};
</script>
<script async src="{{ static "mathjax.js" }}"></script>
{{ if .EsBuildSSEUrl }}
<script>
new EventSource("{{ .EsBuildSSEUrl }}").addEventListener('change', e => {
const { added, removed, updated } = JSON.parse(e.data)
console.log("EsBuild", added, removed, updated);
if (!added.length && !removed.length && updated.length === 1) {
for (const link of document.getElementsByTagName("link")) {
const url = new URL(link.href)
if (url.host === location.host && url.pathname === updated[0]) {
const next = link.cloneNode()
next.href = updated[0] + '?' + Math.random().toString(36).slice(2)
next.onload = () => link.remove()
link.parentNode.insertBefore(next, link.nextSibling)
return
}
}
}
})
</script>
{{ end }}
{{ block "extrahead" . }}{{ end }}
</head>
<body class="{{ join " " .BodyClasses }}">
<div class="m-center mw-site ph3-m ph4-l">
{{ template "header.html" . }}
<div class="notice notice-warn mt3 mb2 white ph3 pv2 br2-ns">
We are currently in the process of converting the website to the new design. Some pages, like this one, are still broken. We appreciate your patience.
</div>
{{ template "notices.html" .Notices }}
{{ with .Breadcrumbs }}
<div class="tc tl-ns ph2 ph0-ns mb2">
{{ range $i, $e := . -}}
{{- if gt $i 0 -}}
<span class="ph2">&raquo;</span>
{{- end -}}
<a class="breadcrumb" href="{{ .Url }}">{{ .Name }}</a>
{{- end }}
</div>
{{ end }}
{{ block "content" . }}{{ end }}
{{ template "footer.html" . }}
</div>
</body>
</html>