2020-11-29 01:28:30 +01:00
|
|
|
|
{{ $s := partialCached "scratch.html" . }}
|
|
|
|
|
|
|
|
|
|
{{ $currentNode := . }}
|
|
|
|
|
{{ $currentDir := "" }}
|
|
|
|
|
{{ with .File }}
|
|
|
|
|
{{ $currentDir = .Dir }}
|
|
|
|
|
{{ end }}
|
|
|
|
|
{{ $currentFile := (printf "/%s" .File) }}
|
|
|
|
|
{{ $scratch := $s.Get $currentFile }}
|
|
|
|
|
|
2021-02-04 21:50:05 +01:00
|
|
|
|
{{ $sandnamePlural := (slice) }}
|
|
|
|
|
|
2021-04-11 00:43:19 +02:00
|
|
|
|
{{ $couldHaveSection := "" }}
|
|
|
|
|
{{ $couldHave := (slice)}}
|
|
|
|
|
|
2021-02-05 00:07:35 +01:00
|
|
|
|
<div class="{{ $scratch.depth | default "crust" }}title"><span class="supt">{{ substr $currentDir 0 -1 }}⁄{{ substr .Title 0 1 }}</span>{{ substr .Title 1 }}</div></div>
|
2020-11-29 01:28:30 +01:00
|
|
|
|
|
|
|
|
|
<div class="grid">
|
2020-12-09 03:13:51 +01:00
|
|
|
|
<div class="leftcolumn">
|
2020-12-15 02:09:00 +01:00
|
|
|
|
{{ if ne (trim .Page.TableOfContents "\n") "<nav id=\"TableOfContents\"></nav>" }}
|
|
|
|
|
{{ .Page.TableOfContents }}
|
|
|
|
|
{{ end }}
|
2020-12-09 03:13:51 +01:00
|
|
|
|
</div>
|
|
|
|
|
<div class="rightcolumn">
|
2021-02-04 21:50:05 +01:00
|
|
|
|
{{ $closeDivs := false }}
|
2020-12-10 01:58:18 +01:00
|
|
|
|
|
2021-02-04 21:50:05 +01:00
|
|
|
|
{{ range $k, $v := $.Site.Data.sandpointsnamegraph }}
|
|
|
|
|
{{ $sandnamePlural = $sandnamePlural | append $v }}
|
2021-04-11 00:43:19 +02:00
|
|
|
|
{{ if eq $scratch.has $v }}
|
|
|
|
|
{{ $couldHaveSection = $k }}
|
|
|
|
|
{{ end }}
|
2021-02-04 21:50:05 +01:00
|
|
|
|
{{ end }}
|
|
|
|
|
{{ $paramsKeys := (slice) }}
|
|
|
|
|
{{ range $k, $v := $currentNode.Params }}
|
|
|
|
|
{{ $paramsKeys = $paramsKeys | append $k }}
|
|
|
|
|
{{ end }}
|
|
|
|
|
{{ $mentions := intersect $paramsKeys $sandnamePlural }}
|
|
|
|
|
{{ range $mention := $mentions }}
|
|
|
|
|
{{ range $k, $m := index $currentNode.Params $mention }}
|
|
|
|
|
{{ $mentionLink := printf "/%s/%s" (substr $mention 0 -1) $m }}
|
|
|
|
|
{{- with $.GetPage $mentionLink -}}
|
|
|
|
|
{{- with not $k -}}
|
|
|
|
|
{{ $closeDivs = true }}
|
|
|
|
|
<div class="has hasauthors">
|
|
|
|
|
<div class="hassup">{{ with (index $currentNode.Params $mention) }}{{ if gt (len (index $currentNode.Params $mention)) 1 }}{{ $mention }}{{ else }}{{ substr $mention 0 -1 }}{{ end }}{{ end }}⁄</div>
|
|
|
|
|
<div class="afterhas">
|
|
|
|
|
{{- end -}}
|
|
|
|
|
<div class="crust">
|
|
|
|
|
<a href="{{ .RelPermalink }}{{ if eq hugo.Environment "offline" }}index.html{{ end }}">{{ .Title }}</a>
|
|
|
|
|
</div>
|
|
|
|
|
{{- end -}}
|
|
|
|
|
{{ end }}
|
|
|
|
|
{{ end }}
|
|
|
|
|
{{- with $closeDivs -}}</div></div>{{ end }}
|
|
|
|
|
|
2020-12-09 03:27:46 +01:00
|
|
|
|
{{ if in .Page.Site.Params.sandpointsMentionedIn (substr $currentDir 0 -1) }}
|
2021-02-04 21:50:05 +01:00
|
|
|
|
<div class="has hasmentionedin">
|
2020-12-09 03:13:51 +01:00
|
|
|
|
{{ with $scratch.backlinks }}
|
2020-12-10 01:58:18 +01:00
|
|
|
|
<div class="hassup">mentioned in⁄</div>
|
2020-11-29 01:28:30 +01:00
|
|
|
|
{{ end }}
|
2020-12-15 02:09:00 +01:00
|
|
|
|
<div class="afterhas">
|
|
|
|
|
{{ range $scratch.backlinks }}
|
|
|
|
|
<div class="{{ $scratch.child_depth }}">
|
|
|
|
|
<a href="{{ .RelPermalink }}{{ if eq hugo.Environment "offline" }}index.html{{ end }}">{{ .Title }}</a>
|
|
|
|
|
</div>
|
|
|
|
|
{{ end }}
|
|
|
|
|
</div></div>
|
2020-12-09 03:13:51 +01:00
|
|
|
|
{{ end }}
|
2020-11-29 01:28:30 +01:00
|
|
|
|
|
2020-12-09 03:13:51 +01:00
|
|
|
|
{{ if and (not (eq $scratch.depth "crust")) $scratch.has_children }}
|
2021-02-04 21:50:05 +01:00
|
|
|
|
<div class="has hashas">
|
2020-12-15 02:09:00 +01:00
|
|
|
|
{{ with $scratch.has }}
|
|
|
|
|
<div class="hassup">has {{ $scratch.has }}⁄</div>
|
2020-12-09 03:13:51 +01:00
|
|
|
|
{{ end }}
|
2020-12-15 02:09:00 +01:00
|
|
|
|
<div class="afterhas">
|
|
|
|
|
{{ range $scratch.has_children }}
|
|
|
|
|
<div class="{{ $scratch.child_depth }}">
|
|
|
|
|
<a href="{{ .RelPermalink }}{{ if eq hugo.Environment "offline" }}index.html{{ end }}">{{ .Title }}</a>
|
|
|
|
|
</div>
|
|
|
|
|
{{ end }}
|
|
|
|
|
</div></div>
|
2020-12-09 03:13:51 +01:00
|
|
|
|
{{ end }}
|
|
|
|
|
|
|
|
|
|
{{ if eq $scratch.depth "crust" }}
|
2021-02-04 21:50:05 +01:00
|
|
|
|
<div class="has hasin">
|
2020-12-15 02:09:00 +01:00
|
|
|
|
<div class="hassup">in {{ index $scratch.in 1 }}⁄</div>
|
|
|
|
|
<div class="afterhas">
|
|
|
|
|
{{ range $scratch.is_in }}
|
|
|
|
|
<div class="{{ substr $currentDir 0 -1 }}">
|
2020-12-09 03:13:51 +01:00
|
|
|
|
<a href="{{ .RelPermalink }}{{ if eq hugo.Environment "offline" }}index.html{{ end }}">{{ .Title }}</a>
|
2020-12-15 02:09:00 +01:00
|
|
|
|
</div>
|
|
|
|
|
{{ end }}
|
|
|
|
|
</div></div>
|
2020-12-09 03:13:51 +01:00
|
|
|
|
{{ end }}
|
|
|
|
|
</div>
|
2020-11-29 01:28:30 +01:00
|
|
|
|
</div>
|
|
|
|
|
|
2020-12-10 02:59:02 +01:00
|
|
|
|
|
2021-02-04 21:50:05 +01:00
|
|
|
|
{{ with .Page.Params.abstract }}<div class="abstract"><span class="supt">abstract⁄</span>{{ . | $.Page.RenderString | htmlUnescape | safeHTML }}</div>{{ end }}
|
2020-12-10 02:01:10 +01:00
|
|
|
|
|
2021-02-04 21:50:05 +01:00
|
|
|
|
{{- $vld := false -}}{{- range $k, $v := .Page.Params.keywords -}}{{- if eq $k 0 -}}{{- $vld = true -}}<div class="keywords"><span class="sup">keywords⁄</span>{{- $v -}}{{- else -}}, {{- $v -}}{{- end -}}{{- end -}}{{- with $vld -}}</div>{{- end -}}
|
2021-03-28 01:40:09 +01:00
|
|
|
|
|
2021-04-11 00:43:19 +02:00
|
|
|
|
{{ if $couldHaveSection }}
|
|
|
|
|
{{ range where .Site.RegularPages "Section" $couldHaveSection }}
|
|
|
|
|
{{ $couldHave = $couldHave | append .File.LogicalName }}
|
|
|
|
|
{{ end }}
|
|
|
|
|
{{ end }}
|
|
|
|
|
|
|
|
|
|
{{ $var := printf "repo={\"frontmatter\": %s, \"content\": %s, \"path\": \"%s\", \"relpermalink\": \"%s\", \"couldhave\": %s }" (jsonify .Params) (jsonify .RawContent) .File.Path .RelPermalink (jsonify $couldHave)| resources.FromString (printf "js/repo/%s.js" .File.UniqueID) }}
|
2021-03-28 01:40:09 +01:00
|
|
|
|
{{ $dummy := $var.Permalink }}
|