Move Work to partial, recurse
This commit is contained in:
35
layouts/_partials/nav.html
Normal file
35
layouts/_partials/nav.html
Normal file
@ -0,0 +1,35 @@
|
||||
<nav>
|
||||
<ul>
|
||||
<li>
|
||||
<details>
|
||||
<summary>Books</summary>
|
||||
<ul>
|
||||
<li><a href="/cycle">The Post-Self Cycle:</a>
|
||||
<ul>
|
||||
<li><a href="https://qoheleth.post-self.ink" target="_blank"><em>Qoheleth</em></a></li>
|
||||
<li><a href="https://toledot.post-self.ink" target="_blank"><em>Toledot</em></a></li>
|
||||
<li><a href="https://neviim.post-self.ink" target="_blank"><em>Nevi'im</em></a></li>
|
||||
<li><a href="https://mitzvot.post-self.ink" target="_blank"><em>Mitzvot</em></a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a href="/stories-of-restoration">Stories of Restoration:</a>
|
||||
<ul>
|
||||
<li><a href="https://marsh.post-self.ink" target="_blank"><em>Marsh</em></a></li>
|
||||
<li><a href="https://idumea.post-self.ink" target="_blank"><em>Idumea</em></a></li>
|
||||
<li><a href="https://kaddish.post-self.ink" target="_blank"><em>Kaddish</em></a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a href="https://clade.post-self.ink"><em>Clade</em></a></li>
|
||||
<li><a href="https://jessfluf.itch.io/unintended-tendencies" target="_blank"><em>Unintended Tendencies</em></a></li>
|
||||
<li><a href="https://motes-played.post-self.ink" target="_blank"><em>Motes Played</em></a></li>
|
||||
<li><a href="https://ask.post-self.ink" target="_blank"><em>Ask. — An Odist Q&A</em></a></li>
|
||||
</ul>
|
||||
</details>
|
||||
</li>
|
||||
<li><a href="/works">Stories</a></li>
|
||||
<li><a href="/gallery">Images</a></li>
|
||||
<!--<li><a href="https://rpg.post-self.ink">The TTRPG</a></li>-->
|
||||
<li><a href="https://wiki.post-self.ink" target="_blank">Wiki</a></li>
|
||||
<li><a href="/extras">Extras</a></li>
|
||||
</ul>
|
||||
</nav>
|
||||
1
layouts/_partials/title/full.html
Normal file
1
layouts/_partials/title/full.html
Normal file
@ -0,0 +1 @@
|
||||
{{ if .Title }}{{ .Title }} | {{ end }}{{ if .Page.Params.author }}{{ if .Page.Params.plainAuthor }}{{ .Page.Params.PlainAuthor }} |{{ else }}{{ .Page.Params.author }} | {{ end }}{{ end }} Post-Self
|
||||
36
layouts/_partials/work.html
Normal file
36
layouts/_partials/work.html
Normal file
@ -0,0 +1,36 @@
|
||||
{{- $work := .work }}
|
||||
{{- $works := .works }}
|
||||
{{- $creators := .creators }}
|
||||
{{- /* This is really ugly, but alas, it is precisely what we need. */ -}}
|
||||
<dt><a href="{{ $work.url }}">{{ $work.title }}</a> <span class="author">by
|
||||
{{ range $k, $author := $work.authors }}
|
||||
{{- if index $creators $author }}<a href="{{ index $creators $author }}" target="_blank">{{ $author | markdownify }}</a>{{ else }}{{ $author | markdownify }}{{ end }}
|
||||
{{- if ne (add $k 1) ($work.authors | len) }}, {{ end }}
|
||||
{{- end }}
|
||||
{{- range $contributor := $work.contributors }},
|
||||
{{ if index $creators $contributor }}<a href="{{ index $creators $contributor }}" target="_blank">{{ $contributor | markdownify }}</a>{{ else }}{{ $contributor | markdownify }}{{ end }}
|
||||
<small>(contributor)</small>
|
||||
{{- end }}
|
||||
</span></dt>
|
||||
<dd>
|
||||
{{ $work.description | markdownify }}
|
||||
<ul class="meta">
|
||||
{{- if $work.type }}<li><em>Type:</em> {{ $work.type }}</li>{{- end }}
|
||||
<li><em>Characters and dates:</em>
|
||||
{{- range $k, $v := $work.years }}
|
||||
{{ index $work.characters $k }} — {{ $v }}
|
||||
{{- if ne (add $k 1) ($work.years | len) }}, {{- end }}
|
||||
{{- end }}</li>
|
||||
{{- if $work.cw }}<li><em>CWs:</em> {{ $work.cw }}</li>{{- end }}
|
||||
{{- if $work.spoilers }}<li><em>Spoilers:</em> {{ $work.spoilers | markdownify }}</li>{{- end }}
|
||||
</ul>
|
||||
{{- $subworks := where $works "parent" "eq" $work.title }}
|
||||
{{- if gt (len $subworks) 0 }}
|
||||
<h3>Associated works</h3>
|
||||
<dl>
|
||||
{{- range $subwork := where $works "parent" "eq" $work.title }}
|
||||
{{ partial "work.html" (dict "work" $subwork "works" $works "creators" $creators) }}
|
||||
{{- end }}
|
||||
</dl>
|
||||
{{- end }}
|
||||
</dd>
|
||||
Reference in New Issue
Block a user