moved project into new repo

This commit is contained in:
2026-06-22 16:50:45 +00:00
commit 59cf49c026
101 changed files with 3557 additions and 0 deletions

View File

@@ -0,0 +1,4 @@
<pre class="abc">
{{ .Inner | htmlEscape | safeHTML }}
</pre>
{{ .Page.Store.Set "hasAbc" true }}

View File

@@ -0,0 +1,4 @@
<pre class="mermaid">
{{ .Inner | htmlEscape | safeHTML }}
</pre>
{{ .Page.Store.Set "hasMermaid" true }}

View File

@@ -0,0 +1,4 @@
<pre class="jtab">
{{ .Inner | htmlEscape | safeHTML }}
</pre>
{{ .Page.Store.Set "hasTab" true }}

View File

@@ -0,0 +1,36 @@
<!DOCTYPE html>
<html lang="{{ or site.Language.LanguageCode }}" dir="{{ or site.Language.LanguageDirection `ltr` }}">
<head>
{{ partial "head.html" . }}
</head>
{{ partial "audio_autoplay.html" . }}
<body>
<header>
{{ partial "header.html" . }}
</header>
<div>
<div class="black-hole wrap">
<div id="black-hole"></div>
</div>
</div>
<main>
{{ block "expo" . }}{{ end }}
{{ block "main" . }}{{ end }}
</main>
<footer>
{{ partial "footer.html" . }}
</footer>
{{ if .Param "math" }}
{{ partialCached "math.html" . }}
{{ end }}
{{ if .Store.Get "hasMermaid" }}
{{ partialCached "diagram.html" . }}
{{ end }}
{{ if .Store.Get "hasAbc" }}
{{ partialCached "music-notation.html" . }}
{{ end }}
{{ if .Store.Get "hasTab" }}
{{ partialCached "tablature-notation.html" . }}
{{ end }}
</body>
</html>

View File

@@ -0,0 +1,7 @@
{{ define "main" }}
<div id="{{ lower .Title }}" class="page">
<div id="content" class="page">
{{ .Content }}
</div>
</div>
{{ end }}

View File

@@ -0,0 +1,17 @@
{{ define "main" }}
{{ with .Content }}
<div id="content" class="page">
{{ . }}
</div>
{{ end }}
<div id="posts" class="directory">
{{ range .Paginator.Pages }}
<a href="{{ .RelPermalink }}">
<article class="post">
<h2>{{ .LinkTitle }}</h2>
<p>{{ .Summary }}</p>
</article>
</a>
{{ end }}{{ template "_internal/pagination.html" . }}
</div>
{{ end }}

View File

@@ -0,0 +1,37 @@
{{ define "main" }}
<article id="post">
<h1>{{ .Title }}</h1>
<section id="frontmatter">
{{ if ne .PublishDate nil }}
{{ $dateMachine := .PublishDate | time.Format "2006-01-02T15:04:05-07:00" }}
{{ $dateHuman := .PublishDate | time.Format "2 Jan 2006" }}
<time datetime="{{ $dateMachine }}">Published {{ $dateHuman }}</time>
{{ else }}
{{ $dateMachine := .Date | time.Format "2006-01-02T15:04:05-07:00" }}
{{ $dateHuman := .Date | time.Format "2 Jan 2006" }}
<time datetime="{{ $dateMachine }}">Created {{ $dateHuman }}</time>
{{ end }}
{{ with .Params.author }}
<p>Written by {{ . }}</p>
{{ end }}
{{ if ne .Params.editor .Params.author }}
<p>Edited by {{ .Params.editor }}</p>
{{ end }}
{{ with .Params.translator }}
<p>Translated by {{ . }}</p>
{{ end }}
</section>
<section id="content">
{{ .Content }}
</section>
<!-- {{ range .Params.updates }}
<details>
<summary>{{ .mod }}</summary>
{{ with .comment }}
<p>{{ . }}</p>
{{ end }}
</details>
{{ end }} -->
{{ partial "terms.html" (dict "taxonomy" "tags" "page" .) }}
</article>
{{ end }}

View File

@@ -0,0 +1,31 @@
{{ define "main" }}
<div id="{{ lower .Title }}" class="page category">
<div>
<h1>{{ .Title }}</h1>
{{ with .Summary }}
<p>{{ . }}</p>
{{ end }}
</div>
{{ if ne .Params.image nil }}
{{ $path := print ".." .Params.image }}
<img src="{{ $path }}" alt="{{ lower .Title }}_image">
{{ else }}
@TODO: 404 image goes here
{{ end }}
</div>
{{ with .Content }}
<div id="content" class="page">
{{ . }}
</div>
{{ end }}
<div id="posts" class="directory">
{{ range .Paginator.Pages }}
<a href="{{ .RelPermalink }}">
<article class="post">
<h2>{{ .LinkTitle }}</h2>
<p>{{ .Summary }}</p>
</article>
</a>
{{ end }}{{ template "_internal/pagination.html" . }}
</div>
{{ end }}

View File

@@ -0,0 +1,24 @@
{{ define "expo" }}
<div id="{{ lower .Title }}" class="expo site {{ lower .Title }}">
<h1 id="title" class="site {{ lower .Title }}">{{ .Title }}</h1>
<p id="summary" class="site {{ lower .Title }}">{{ .Content }}</p>
</div>
{{ end }}
{{ define "main" }}
<div id="{{ lower .Title }}" class="directory">
{{ range .Data.Pages }}
{{ if ne .Params.image nil }}
{{ $path := print "." .Params.image }}
<div style="background-image: linear-gradient(#121212, #121212), url({{ $path }});" class="category">
{{ else }}
<div style="background-image: linear-gradient(#121212, #121212);" class="category">
{{ end }}
<h2><a href="{{ .Permalink }}">{{ .Title }}</a></h2>
<!-- <img src="images/{{ lower .LinkTitle }}" alt=""> -->
{{ with .Summary }}
<p>{{ . }}</p>
{{ end }}
</div>
{{ end }}
</div>
{{ end }}

View File

@@ -0,0 +1,7 @@
<audio preload autoplay class="audioplay" id="bgmusic">
<source src="/audio/dark-folktronica.mp3" type="audio/mpeg">
</audio>
<script>
var bg_audio = document.getElementById("bgmusic")
bg_audio.volume = 0.05
</script>

View File

@@ -0,0 +1,7 @@
<script id="mermaidjs" type="module">
import mermaid from 'https://cdn.jsdelivr.net/npm/mermaid/dist/mermaid.esm.min.mjs';
mermaid.initialize({
startOnLoad: true,
theme: 'dark',
});
</script>

View File

@@ -0,0 +1 @@
<p>Copyright {{ now.Year }}. All rights reserved.</p>

View File

@@ -0,0 +1,5 @@
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>{{ if .IsHome }}{{ site.Title }}{{ else }}{{ printf "%s | %s" .Title site.Title }}{{ end }}</title>
{{ partialCached "head/css.html" . }}
{{ partialCached "head/js.html" . }}

View File

@@ -0,0 +1,9 @@
{{- with resources.Get "css/main.css" }}
{{- if eq hugo.Environment "development" }}
<link rel="stylesheet" href="{{ .RelPermalink }}">
{{- else }}
{{- with . | minify | fingerprint }}
<link rel="stylesheet" href="{{ .RelPermalink }}" integrity="{{ .Data.Integrity }}" crossorigin="anonymous">
{{- end }}
{{- end }}
{{- end }}

View File

@@ -0,0 +1,12 @@
{{- with resources.Get "js/main.js" }}
{{- if eq hugo.Environment "development" }}
{{- with . | js.Build }}
<script src="{{ .RelPermalink }}"></script>
{{- end }}
{{- else }}
{{- $opts := dict "minify" true }}
{{- with . | js.Build $opts | fingerprint }}
<script src="{{ .RelPermalink }}" integrity="{{- .Data.Integrity }}" crossorigin="anonymous"></script>
{{- end }}
{{- end }}
{{- end }}

View File

@@ -0,0 +1,2 @@
<h1 id="title" class="site">{{ site.Title }}</h1>
{{ partial "menu.html" (dict "menuID" "main" "page" .) }}

View File

@@ -0,0 +1,15 @@
<script id="mathjax" async src="https://cdn.jsdelivr.net/npm/mathjax@4/tex-mml-chtml.js"></script>
<script>
MathJax = {
tex: {
displayMath: [['\\[', '\\]'], ['$$', '$$']], // block
inlineMath: [['$', '$']] // inline
},
loader: {
load: ['ui/safe']
},
output: {
font: 'mathjax-asana'
}
};
</script>

View File

@@ -0,0 +1,51 @@
{{- /*
Renders a menu for the given menu ID.
@context {page} page The current page.
@context {string} menuID The menu ID.
@example: {{ partial "menu.html" (dict "menuID" "main" "page" .) }}
*/}}
{{- $page := .page }}
{{- $menuID := .menuID }}
{{- with index site.Menus $menuID }}
<nav>
<!-- <ul> -->
{{- partial "inline/menu/walk.html" (dict "page" $page "menuEntries" .) }}
<!-- </ul> -->
</nav>
{{- end }}
{{- define "partials/inline/menu/walk.html" }}
{{- $page := .page }}
{{- range .menuEntries }}
{{- $attrs := dict "href" .URL }}
{{- if $page.IsMenuCurrent .Menu . }}
{{- $attrs = merge $attrs (dict "class" "active" "aria-current" "page") }}
{{- else if $page.HasMenuCurrent .Menu .}}
{{- $attrs = merge $attrs (dict "class" "ancestor" "aria-current" "true") }}
{{- end }}
{{- $name := .Name }}
{{- with .Identifier }}
{{- with T . }}
{{- $name = . }}
{{- end }}
{{- end }}
<!-- <li> -->
<a
{{- range $k, $v := $attrs }}
{{- with $v }}
{{- printf " %s=%q" $k $v | safeHTMLAttr }}
{{- end }}
{{- end -}}
>{{ $name }}</a>
{{- with .Children }}
<ul>
{{- partial "inline/menu/walk.html" (dict "page" $page "menuEntries" .) }}
</ul>
{{- end }}
<!-- </li> -->
{{- end }}
{{- end }}

View File

@@ -0,0 +1,10 @@
<script id="abcjs" src="https://cdn.jsdelivr.net/npm/abcjs@6.5.0/dist/abcjs-plugin-min.js"></script>
<script>
ABCJS.plugin.render_options = {
add_classes: true,
hint_measures: true,
responsive: 'resize',
tablature: [{instrument: 'guitar'}]
};
ABCJS.plugin.hide_abc = true;
</script>

View File

@@ -0,0 +1,3 @@
<script src="https://jtab.tardate.com/javascripts/jquery.js"></script>
<script src="https://jtab.tardate.com/javascripts/raphael.js"></script>
<script src="https://jtab.tardate.com/javascripts/jtab.js"></script>

View File

@@ -0,0 +1,23 @@
{{- /*
For a given taxonomy, renders a list of terms assigned to the page.
@context {page} page The current page.
@context {string} taxonomy The taxonomy.
@example: {{ partial "terms.html" (dict "taxonomy" "tags" "page" .) }}
*/}}
{{- $page := .page }}
{{- $taxonomy := .taxonomy }}
{{- with $page.GetTerms $taxonomy }}
{{- $label := (index . 0).Parent.LinkTitle }}
<div id="terms">
<div id="label" class="terms"><span>{{ $label }}:</span></div>
<ul id="directory" class="terms">
{{- range . }}
<li class="term"><a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a></li>
{{- end }}
</ul>
</div>
{{- end }}

28
layouts/tags/list.html Normal file
View File

@@ -0,0 +1,28 @@
{{ define "main" }}
<div id="{{ lower .Title }}" class="page tag">
<h1>{{ .Title }}</h1>
{{ with .Summary }}
<p>{{ . }}</p>
{{ end }}
{{ with .Params.image }}
{{ $path := print ".." .Params.image }}
<img src="{{ $path }}" alt="{{ lower .Title }}_image">
{{ end }}
<!-- <img src="images/{{ lower .LinkTitle }}" alt=""> -->
</div>
{{ with .Content }}
<div id="content" class="page">
{{ . }}
</div>
{{ end }}
<div id="posts" class="directory">
{{ range .Paginator.Pages }}
<a href="{{ .RelPermalink }}">
<article class="post">
<h2>{{ .LinkTitle }}</h2>
<p>{{ .Summary }}</p>
</article>
</a>
{{ end }}{{ template "_internal/pagination.html" . }}
</div>
{{ end }}

18
layouts/tags/terms.html Normal file
View File

@@ -0,0 +1,18 @@
{{ define "expo" }}
<div id="{{ lower .Title }}" class="expo site">
<h1 id="title" class="site {{ lower .Title }}">{{ .Title }}</h1>
<p id="summary" class="site {{ lower .Title }}">{{ .Content }}</p>
</div>
{{ end }}
{{ define "main" }}
<div id="{{ lower .Title }}" class="directory">
<dl>
{{ range .Data.Pages }}
<dt class="tag title"><a href="{{ .Permalink }}">{{ .Title }}</a></dt>
{{ with .Summary }}
<dd class="tag content">{{ . }}</dd>
{{ end }}
{{ end }}
</dl>
</div>
{{ end }}