initial commit
This commit is contained in:
@@ -0,0 +1 @@
|
||||
<h{{ add .Level 1 }} id="{{ .Anchor | safeURL }}">{{ .Text | safeHTML }}</h{{ add .Level 1 }}>
|
||||
@@ -0,0 +1,5 @@
|
||||
{{- if eq (path.Ext .Destination) ".mp4" -}}
|
||||
<div><video src='{{ .Destination | safeURL }}' alt='{{ .Text }}' title='{{ .Text }}' controls preload="metadata" playsinline></video></div>
|
||||
{{- else -}}
|
||||
<div><img src="{{ .Destination | safeURL }}" alt="{{ .Text }}" title="{{ .Text }}"></div>
|
||||
{{- end -}}
|
||||
@@ -0,0 +1,42 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>{{ .Title }}</title>
|
||||
<meta name='viewport' content='width=device-width'>
|
||||
<meta name='theme-color' content='#ab5aed'>
|
||||
<meta name='og:type' content='website'>
|
||||
<meta name='og:title' content='{{ .Title }}'>
|
||||
<meta name='og:description' content='{{ .Description | markdownify | plainify }}'>
|
||||
<meta name='og:url' content='{{ .Permalink }}'>
|
||||
<meta name='og:image' content='/espurr.png'>
|
||||
<link rel='preconnect' href='https://rsms.me'>
|
||||
<link rel='preconnect' href='https://ajlee2006.github.io'>
|
||||
<link rel='stylesheet' href='https://rsms.me/inter/inter.css'>
|
||||
{{ $css := resources.Get "style.css" | resources.Minify | resources.Fingerprint }}
|
||||
<link rel='stylesheet' href='{{ $css.RelPermalink }}'>
|
||||
<link rel='icon' href='/espurr.png'>
|
||||
</head>
|
||||
<body>
|
||||
<nav>
|
||||
<div><a href='https://grasswren.net'>grasswren.net</a></div>
|
||||
<ul>
|
||||
<li><a {{ if .IsHome }}class='active'{{ end }} href='https://grasswren.net'>Home</a></li>
|
||||
<li><a {{ if eq .Type "blog" }}class='active'{{ end }} href='https://blog.grasswren.net'>Blog</a></li>
|
||||
<li><a {{ if eq .Type "birds" }}class='active'{{ end }} href='https://birds.grasswren.net'>Birds</a></li>
|
||||
</ul>
|
||||
</nav>
|
||||
<header>
|
||||
<div>
|
||||
<h1>{{ .Title }} {{ if eq .Page.BundleType "branch" }}<span class='t'>[_lipu_pi_soweli_kili]</span>{{ end }}</h1>
|
||||
<p>{{ .Description | markdownify }}</p>
|
||||
</div>
|
||||
<img src='/espurr.png' alt='Espurr'>
|
||||
</header>
|
||||
{{ block "main" . }}
|
||||
{{ end }}
|
||||
<footer>
|
||||
<div><p>by <a href='mailto:lilac@grasswren.net'>Lilac</a> <small>(she/her)</small></p></div>
|
||||
<div><p>ΘΔ ⸱ 🏳️⚧️</p></div>
|
||||
</footer>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,8 @@
|
||||
{{ define "main" }}
|
||||
{{ $sections := split .Content "<h2" }}
|
||||
{{ range after 1 $sections }}
|
||||
<section>
|
||||
{{ print "<h2" . | safeHTML }}
|
||||
</section>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
@@ -0,0 +1,10 @@
|
||||
{{ define "main" }}
|
||||
<section>
|
||||
<dl>
|
||||
{{ range .Pages }}
|
||||
<time>{{ time.Format "2006-01-02" .Date }}</time>
|
||||
<a href="{{ .RelPermalink }}">{{ .Title }}</a>
|
||||
{{ end }}
|
||||
</dl>
|
||||
</section>
|
||||
{{ end }}
|
||||
@@ -0,0 +1,12 @@
|
||||
{{ define "main" }}
|
||||
{{- $content := .Content -}}
|
||||
{{- $content = replaceRE `<div class="footnotes" role="doc-endnotes">` "" $content -}}
|
||||
{{- $content = replaceRE `</div>\s*$` "" $content -}}
|
||||
{{- $tmp := $content | safeHTML -}}
|
||||
{{ $sections := split $tmp "<h2" }}
|
||||
{{ range after 1 $sections }}
|
||||
<section>
|
||||
{{ print "<h2" . | safeHTML }}
|
||||
</section>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
Reference in New Issue
Block a user