clean it up first
This commit is contained in:
parent
6d31001106
commit
1331ed0e53
30 changed files with 50 additions and 1086 deletions
|
@ -1,3 +0,0 @@
|
|||
{{ define "main" }}
|
||||
<p>404 - page not found</p>
|
||||
{{ end }}
|
|
@ -1,30 +0,0 @@
|
|||
{{ $currentLevel := .Level }}
|
||||
{{ $currentHeaderKey := printf "H_%d" $currentLevel }}
|
||||
|
||||
{{ if not (.Page.Scratch.Get $currentHeaderKey) }}
|
||||
{{ .Page.Scratch.Set $currentHeaderKey 1 }}
|
||||
{{ else }}
|
||||
{{ .Page.Scratch.Set $currentHeaderKey (add 1 (.Page.Scratch.Get $currentHeaderKey)) }}
|
||||
{{ end }}
|
||||
|
||||
{{ if .Page.Scratch.Get "previousLevel" }}
|
||||
{{ $previousLevel := .Page.Scratch.Get "previousLevel" }}
|
||||
{{ if gt $previousLevel $currentLevel }}
|
||||
{{ range $header := slice 1 2 3 4 5 6 }}
|
||||
{{ if gt $header $currentLevel }}
|
||||
{{ $.Page.Scratch.Delete (printf "H_%d" $header) }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
||||
{{ $counter := "" }}
|
||||
{{ range $header := slice 1 2 3 4 5 6 }}
|
||||
{{ if gt ($.Page.Scratch.Get (printf "H_%d" $header)) 0 }}
|
||||
{{ $counter = printf "%s%d." $counter ($.Page.Scratch.Get (printf "H_%d" $header))}}
|
||||
{{ end }}
|
||||
{{end}}
|
||||
|
||||
<h{{ add 1 .Level }} id="{{ .Anchor | safeURL }}" class="hx css-{{ .Page.File.UniqueID }}-h{{ add 1 .Level }}"><span class="counters">{{ $counter }} </span>{{ .Text | safeHTML }}<a class="hpar" href="#{{ .Anchor | safeURL }}">¶</a> {{ .Page.Scratch.Get "level" }}</h{{ add 1 .Level }}>
|
||||
|
||||
{{ .Page.Scratch.Set "previousLevel" .Level }}
|
|
@ -1,60 +0,0 @@
|
|||
{{- $text_link := .Text -}}
|
||||
|
||||
{{ $_ := newScratch }}
|
||||
{{- range $k, $v := .Page.Site.Data.sandpointsnamegraph -}}
|
||||
{{ $_.Add "triads" $k }}
|
||||
{{- end -}}
|
||||
|
||||
{{- if strings.HasPrefix .Destination "img:" -}}
|
||||
{{- $img_params := (substr .Destination 4) -}}
|
||||
{{- $img_src := index (split $img_params " ") 0 -}}
|
||||
{{- $img_attr := index (split $img_params $img_src) 1 -}}
|
||||
<img class="sandpoints-img" src="{{ $img_src }}" {{ $img_attr | safeHTMLAttr }} />
|
||||
{{- else if strings.HasPrefix .Destination "vid:" -}}
|
||||
{{- $vid_params := (substr .Destination 4) -}}
|
||||
{{- $vid_src := index (split $vid_params " ") 0 -}}
|
||||
{{- $vid_attr := index (split $vid_params $vid_src) 1 -}}
|
||||
<video class="sandpoints-vid" controls src="{{ $vid_src }}" {{ $vid_attr | safeHTMLAttr }}></video>
|
||||
{{- else if strings.HasPrefix .Destination "bib:" -}}
|
||||
{{- $destination := (substr .Destination 4) -}}
|
||||
{{- $c_prefix := .Page.Site.Params.sandpointsCatalogPrefix | default "/library/" -}}
|
||||
{{- if index $.Page.Site.Data.books.catalog $destination -}}
|
||||
{{- $b := index $.Page.Site.Data.books.catalog $destination -}}
|
||||
{{- $bibhref := printf "%sBROWSE_LIBRARY.html#/book/%s" (safeURL ($c_prefix)) $destination }}
|
||||
{{ $bibtitle := "" }}
|
||||
{{ with $b.title }}
|
||||
{{- $bibtitle = printf "%s" $b.title }}
|
||||
{{ end }}
|
||||
{{ .Page.Scratch.Add "bibs" (slice (slice $bibhref $bibtitle)) }}
|
||||
{{- if not $text_link -}}
|
||||
<span>{{- delimit $b.authors ", " " & " -}}{{- with $b.pubdate -}}, {{- substr . 0 4}}{{- end -}}. <a href="{{- $c_prefix | safeURL -}}BROWSE_LIBRARY.html#/book/{{- $destination -}}"{{- with $b.title}} title="{{- . -}}"{{- end -}} target="_blank"><span class="sup">bib⁄</span><i>{{- $b.title -}}</i></a>. {{- with $b.publisher -}}{{- . -}}.{{- end -}}</span>
|
||||
{{- else -}}
|
||||
<span class="sup">bib⁄</span><a href="{{- $c_prefix | safeURL -}}BROWSE_LIBRARY.html#/book/{{- $destination -}}"{{- with $b.title}} title="{{- . -}}"{{- end -}} target="_blank">{{- $text_link -}}</a>
|
||||
{{- end -}}
|
||||
{{- else -}}
|
||||
<a href="{{- $c_prefix | safeURL -}}BROWSE_LIBRARY.html#/book/{{- $destination -}}"{{- with .Title}} title="{{- . -}}"{{- end -}}>{{- $text_link -}}⦚<span>bib:{{- $destination -}} not found</span></a>
|
||||
{{- end -}}
|
||||
{{- else if in ($_.Get "triads") (index (split .Destination ":") 0) -}}
|
||||
{{- if $.Page.Site.GetPage (printf "/%s" (replace .Destination ":" "/")) -}}
|
||||
{{- $session := $.Page.Site.GetPage (printf "/%s" (replace .Destination ":" "/")) -}}
|
||||
{{ .Page.Scratch.Add "links" (slice $session) }}
|
||||
{{- if not $text_link -}}
|
||||
<a class="triadlink" repoid="{{- $session.File.UniqueID -}}" printhref="#ph-{{- $session.File.UniqueID -}}" href="{{- $session.RelPermalink -}}{{- if eq hugo.Environment "offline" -}}index.html{{- end -}}"{{- with $session.Title}} title="{{- $session.Title -}}"{{- end -}}><span class="sup">{{- index (split .Destination ":") 0 -}}⁄</span>{{- $session.Title -}}</a>
|
||||
{{- else -}}
|
||||
<a class="triadlink" repoid="{{- $session.File.UniqueID -}}" printhref="#ph-{{- $session.File.UniqueID -}}" href="{{- $session.RelPermalink -}}{{- if eq hugo.Environment "offline" -}}index.html{{- end -}}"{{- with .Title}} title="{{- . -}}"{{- end -}}><span class="sup">{{- index (split .Destination ":") 0 -}}⁄</span>{{- $text_link -}}</a>
|
||||
{{- end -}}
|
||||
{{- else -}}
|
||||
<a href="{{- .Destination -}}/{{- if eq hugo.Environment "offline" -}}index.html{{- end -}}">{{- $text_link -}}⦚<span>{{- .Destination -}} not found</span></a>
|
||||
{{- end -}}
|
||||
{{- else if strings.HasPrefix .Destination "audio:" -}}
|
||||
{{- $a_destination := (substr .Destination 6) -}}
|
||||
{{- if findRE "^.*static" $a_destination -}}
|
||||
<span class="soundcite" data-url="{{- (replaceRE "^.*static" "" $a_destination ) | safeURL -}}">{{ .Text }}</span>
|
||||
{{- else -}}
|
||||
<span class="soundcite" data-url="{{- $a_destination | safeURL -}}">{{ .Text }}</span>
|
||||
{{- end -}}
|
||||
{{- else if findRE "^.*static" .Destination -}}
|
||||
<img src="{{- (replaceRE "^.*static" "" .Destination ) | safeURL -}}" alt="{{- .Text -}}" {{- with .Title}} title="{{- . -}}"{{- end -}} />
|
||||
{{- else -}}
|
||||
<img src="{{- .Destination | safeURL -}}" alt="{{- .Text -}}" {{- with .Title}} title="{{- . -}}"{{- end -}} />
|
||||
{{- end -}}
|
|
@ -1 +1 @@
|
|||
{{- .Page.Scratch.Add "urls" (slice .Destination) -}}{{- $t := .Text -}}{{- $sup := "" -}}{{- if and (strings.HasPrefix .Destination "{") (.Destination | strings.Count "}") -}}{{- range first 1 (split .Destination "}") -}}{{- range $frmt := (split (substr . 1) ",") -}}{{- if eq $frmt "sc" -}}<span class="smallcaps">{{- $t -}}</span>{{- end -}}{{- end -}}{{- end -}}{{- else }}{{- if strings.HasPrefix .Destination "http" -}}{{- $sup = "www" -}}{{- end -}}{{- if strings.HasPrefix .Destination "#" -}}{{- $sup = "§" -}}{{- end -}}<a href="{{ .Destination | safeURL }}"{{ with .Title}} title="{{ . }}"{{ end }}{{ if strings.HasPrefix .Destination "http" }} target="_blank" rel="noopener"{{ else if strings.HasPrefix .Destination "#"}}class="anchorz"{{ end }}><span class="sup" style="font-size:0.7em">{{- $sup -}}⁄</span><i>{{ .Text | safeHTML }}</i></a>{{- end -}}
|
||||
{{- .Page.Scratch.Add "urls" (slice .Destination) -}}{{- $t := .Text -}}{{- $sup := "" -}}{{- if and (strings.HasPrefix .Destination "{") (.Destination | strings.Count "}") -}}{{- range first 1 (split .Destination "}") -}}{{- range $frmt := (split (substr . 1) ",") -}}{{- if eq $frmt "sc" -}}<span class="smallcaps">{{- $t -}}</span>{{- end -}}{{- end -}}{{- end -}}{{- else }}{{- if strings.HasPrefix .Destination "http" -}}{{- $sup = "www" -}}{{- end -}}{{- if strings.HasPrefix .Destination "#" -}}{{- $sup = "§" -}}{{- end -}}<a href="{{ .Destination | safeURL }}"{{ with .Title}} title="{{ . }}"{{ end }}{{ if strings.HasPrefix .Destination "http" }} target="_blank" rel="noopener"{{ else if strings.HasPrefix .Destination "#"}}class="anchorz"{{ end }}><span class="sup" style="font-size:0.7em">{{- $sup -}}⁄</span><i>{{ .Text | safeHTML }}</i></a>{{- end -}}
|
||||
|
|
|
@ -1,13 +1,15 @@
|
|||
<!DOCTYPE html>
|
||||
|
||||
<html lang="{{ with .Site.LanguageCode }}{{ . }}{{ else }}en-us{{ end }}">
|
||||
<head>
|
||||
{{- partial "head.html" . -}}
|
||||
<title>{{- .Title }} - {{ .Site.Title -}}</title>
|
||||
{{- partialCached "sandpointjs.html" . .RelPermalink -}}
|
||||
</head>
|
||||
<body>
|
||||
{{- block "singlebody" . }}{{- end -}}
|
||||
<html lang="{{ site.Language.LanguageCode | default site.LanguageCode | default "en" }}">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<title>{{ block "title" . }}{{ site.Title | default "Sandpoints in progress..." }}{{ end }}</title>
|
||||
</head>
|
||||
<body>
|
||||
{{- block "main" . }}{{- end -}}
|
||||
{{- partialCached "footer.html" . -}}
|
||||
</body>
|
||||
{{ if eq .RelPermalink "/mirror/ubu/" }}
|
||||
{{ partial "deferred_global_graph.html" . }}
|
||||
{{end}}
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -1,38 +1,21 @@
|
|||
{{ define "singlebody" }}
|
||||
|
||||
{{ $currentNode := . }}
|
||||
{{ $currentDir := "" }}
|
||||
{{ with .File }}
|
||||
{{ $currentDir = .Dir }}
|
||||
{{ end }}
|
||||
{{ $currentFile := (printf "/%s" .File) }}
|
||||
{{ $editFile := $.Site.GetPage "/edit" }}
|
||||
{{ $editFilePath := $editFile.RelPermalink }}
|
||||
|
||||
|
||||
<div class="coretitle"><span class="supt">Sitemap⁄{{ substr $.Site.Title 0 1 }}</span>{{ substr $.Site.Title 1 }} {{with $currentDir}}({{ . }}){{ end }}</div>
|
||||
|
||||
{{ $s := partialCached "scratch.html" . }}
|
||||
{{ $noTriad := (slice) }}
|
||||
{{ range $p := .Site.RegularPages }}
|
||||
{{ $scratch := $s.Get (printf "/%s" $p.File) }}
|
||||
{{ if eq $scratch.depth "core" }}
|
||||
<div class="sitemap" ><div class="{{ with $p.File }}{{ if eq $currentDir .Dir }}highline{{ end }}{{ end }}"><a href="{{- $p.RelPermalink -}}{{- if eq hugo.Environment "offline" -}}index.html{{- end -}}"{{- with $p.Title}} title="{{- $p.Title -}}"{{- end -}}><span class="sup">{{- substr $p.File.Dir 0 -1 -}}⁄</span>{{- $p.Title -}}</a></div>
|
||||
{{ range $coreKid := $scratch.has_children }}
|
||||
<div class="sitemap"><a href="{{- $coreKid.RelPermalink -}}{{- if eq hugo.Environment "offline" -}}index.html{{- end -}}"{{- with $coreKid.Title}} title="{{- $coreKid.Title -}}"{{- end -}}><div class="{{ with $coreKid.File }}{{ if eq $currentDir .Dir }}highline{{ end }}{{ end }}"><span class="sup">{{- substr $coreKid.File.Dir 0 -1 -}}⁄</span>{{- $coreKid.Title -}}</a></div>
|
||||
{{ $scratchCKid := $s.Get (printf "/%s" $coreKid.File) }}
|
||||
{{ range $mantleKid := $scratchCKid.has_children }}
|
||||
<div class="sitemap"><div class="{{ with $mantleKid.File }}{{ if eq $currentDir .Dir }} highline{{ end }}{{ end }}"><a href="{{- $mantleKid.RelPermalink -}}{{- if eq hugo.Environment "offline" -}}index.html{{- end -}}"{{- with $mantleKid.Title}} title="{{- $mantleKid.Title -}}"{{- end -}}><span class="sup">{{ with $mantleKid.File }}{{substr .Dir 0 -1 -}}⁄{{ end }}</span>{{- $mantleKid.Title -}}</a></div></div>
|
||||
{{ end }}
|
||||
</div>
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<title>{{ .Title }} - {{ .Site.Title }}</title>
|
||||
<link rel="stylesheet" href="/css/style.css" />
|
||||
</head>
|
||||
<body>
|
||||
<header>
|
||||
<h1><a href="/">{{ .Site.Title }}</a></h1>
|
||||
</header>
|
||||
<main>
|
||||
<h2>{{ .Title }}</h2>
|
||||
<ul>
|
||||
{{ range .Pages }}
|
||||
<li><a href="{{ .Permalink }}">{{ .Title }}</a></li>
|
||||
{{ end }}
|
||||
{{ else if not (in (slice "core" "mantle" "crust") $scratch.depth)}}
|
||||
{{ $noTriad = $noTriad | append $p }}
|
||||
{{ else }}
|
||||
</div>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ range $noTriad }}
|
||||
<div class="sitemap {{ with .File }}{{ if eq $currentDir .Dir }} highline{{ end }}{{ end }}"><a href="{{- .RelPermalink -}}{{- if eq hugo.Environment "offline" -}}index.html{{- end -}}"{{- with .Title }} title="{{- . -}}"{{- end -}}><span class="sup">{{- substr .File.Dir 0 -1 -}}⁄</span>{{- .Title -}}</a>{{ if not (or (hasPrefix .File.Dir "edit") (hasPrefix .File.Dir "print")) }}{{ end }}</div>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
</ul>
|
||||
</main>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
{{- define "singlebody" -}}
|
||||
{{- partialCached "header.html" . .RelPermalink -}}
|
||||
<h1>{{ .Title }}</h1>
|
||||
{{- partialCached "singlebody.html" . .RelPermalink -}}
|
||||
<div class="content">{{ .Content }}</div>
|
||||
{{- end -}}
|
||||
{{ define "main" }}
|
||||
{{ partial "single-page-graph.html" . }}
|
||||
<article>
|
||||
<h2>{{ .Title }}</h2>
|
||||
<p>{{ .Content }}</p>
|
||||
</article>
|
||||
{{ end }}
|
||||
|
|
|
@ -1,14 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
|
||||
<html lang="{{ with .Site.LanguageCode }}{{ . }}{{ else }}en-us{{ end }}">
|
||||
<head>
|
||||
<meta charset='utf-8'>
|
||||
<meta name='viewport' content='width=device-width,initial-scale=1'>
|
||||
<link rel='stylesheet' href='build/global.css'>
|
||||
<!-- <link rel='stylesheet' href='build/bundle.css'> -->
|
||||
<script defer src='../metadata/index.js'></script>
|
||||
<script defer src='build/bundle.js'></script>
|
||||
<title>edit⁄{{- .Site.Title -}}</title>
|
||||
</head>
|
||||
<body>{{- block "main" . -}}{{- end -}}</body>
|
||||
</html>
|
|
@ -1,2 +0,0 @@
|
|||
{{ define "main" }}
|
||||
{{ end }}
|
|
@ -1 +0,0 @@
|
|||
{{- define "main" -}}{{- end -}}
|
|
@ -1 +0,0 @@
|
|||
{{ block "main" . }}{{ end }}
|
|
@ -1,20 +0,0 @@
|
|||
{{- define "main" -}}
|
||||
{{ $sections := (slice) }}
|
||||
{{ $tiers := (slice) }}
|
||||
{{ range $.Site.Sections }}
|
||||
{{ with .File }}
|
||||
{{ $sections = $sections | append (strings.TrimSuffix "/" .Dir) }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ $metasp := (dict) }}
|
||||
{{ range $k, $v := $.Site.Data.sandpointsnamegraph }}
|
||||
{{ if in $sections $k }}
|
||||
{{ $tiers = (slice) }}
|
||||
{{ range where $.Site.RegularPages "Section" $k }}
|
||||
{{ $tiers = $tiers | append (merge (dict "file" .File.LogicalName) (dict "title" .Title)) }}
|
||||
{{ end }}
|
||||
{{ $metasp = merge $metasp (dict $v (merge (dict "singular" $k) (dict "tiers" $tiers))) }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ printf "METASP=%s;" (jsonify $metasp) }}
|
||||
{{ end }}
|
|
@ -1,8 +1,13 @@
|
|||
<footer>
|
||||
<a class="logolink" title="built by Sandpoints" href="https://git.sandpoints.org/Drawwell/">
|
||||
<a
|
||||
class="logolink"
|
||||
title="built by Sandpoints"
|
||||
href="https://dev.sandpoints.org/Drawwell/"
|
||||
>
|
||||
<div class="sandpointlogo">
|
||||
<span class="sandpointF">ß</span>
|
||||
<span class="sandpointN">•</span>
|
||||
<span class="sandpointC">:</span>
|
||||
</div></a>
|
||||
<span class="sandpointF">ß</span>
|
||||
<span class="sandpointN">•</span>
|
||||
<span class="sandpointC">:</span>
|
||||
</div></a
|
||||
>
|
||||
</footer>
|
||||
|
|
|
@ -1,48 +0,0 @@
|
|||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<meta name="msapplication-TileColor" content="#da532c">
|
||||
<meta name="theme-color" content="#ffffff">
|
||||
|
||||
{{ if .Description }}
|
||||
<meta name="description" content="{{ .Description }}" />
|
||||
{{ end }}
|
||||
|
||||
{{ if .Keywords }}
|
||||
<meta name="keywords" content="{{ delimit .Keywords "," }}" />
|
||||
{{ end }}
|
||||
|
||||
{{ if .Params.editors }}
|
||||
{{ range .Params.editors }}
|
||||
{{ $e := $.GetPage (printf "editor/%s" .) }}
|
||||
<meta name="editor" content="{{ $e.Title }}" />
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
||||
{{ if .Params.authors }}
|
||||
{{ range .Params.authors }}
|
||||
{{ $e := $.GetPage (printf "author/%s" .) }}
|
||||
<meta name="author" content="{{ $e.Title }}" />
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
||||
|
||||
{{ template "_internal/opengraph.html" . }}
|
||||
{{ template "_internal/twitter_cards.html" . }}
|
||||
|
||||
{{ hugo.Generator }}
|
||||
|
||||
<link rel="apple-touch-icon" sizes="76x76" href="/apple-touch-icon.png">
|
||||
<link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png">
|
||||
<link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png">
|
||||
<link rel="manifest" href="/site.webmanifest">
|
||||
<link rel="mask-icon" href="/safari-pinned-tab.svg" color="#996561">
|
||||
|
||||
{{ if eq hugo.Environment "dev" }}
|
||||
{{ $style := resources.Get "css/site.css" | resources.PostCSS (dict "config" "assets/css/postcss.config.js") | minify }}
|
||||
<link rel="stylesheet" href="{{ $style.RelPermalink }}" />
|
||||
{{ $style := resources.Get "css/player.css" | resources.PostCSS (dict "config" "assets/css/postcss.config.js") | minify }}
|
||||
<link rel="stylesheet" href="{{ $style.RelPermalink }}" />
|
||||
{{ else }}
|
||||
<link rel="stylesheet" href="/css/site.min.css" />
|
||||
<link rel="stylesheet" href="/css/player.min.css" />
|
||||
{{ end }}
|
|
@ -1,114 +0,0 @@
|
|||
{{ $s := partialCached "scratch.html" . }}
|
||||
|
||||
{{ $currentDir := "" }}
|
||||
{{ with .File }}
|
||||
{{ $currentDir = .Dir }}
|
||||
{{ end }}
|
||||
|
||||
{{ $currentFile := (printf "/%s" .File) }}
|
||||
{{ $scratch := $s.Get $currentFile }}
|
||||
|
||||
{{ $is_in_ := newScratch }}
|
||||
{{ with eq $scratch.depth "crust" }}
|
||||
{{ range $scratch.is_in }}
|
||||
{{ range $k,$v := $s.Get (printf "/%s" .File) }}
|
||||
{{ if eq $k "is_in" }}
|
||||
{{ range $v }}
|
||||
{{ $is_in_.Set (printf "/%s" .File) (printf "/%s" .File) }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
||||
{{ $is_in_is_in := (slice) }}
|
||||
{{ range $is_in_.Values }}
|
||||
{{ $is_in_is_in = $is_in_is_in | append ($.GetPage .) }}
|
||||
{{ end }}
|
||||
|
||||
{{ if eq hugo.Environment "gitea" }}
|
||||
<div class="headiter" id="preview">
|
||||
<a class="edit-button" target="_blank" href="{{ $.Site.Params.sandpointsGiteaUrl }}/_edit/master/content/{{ .File }}">EDIT_THIS</a>
|
||||
{{ with $scratch.core }}<a class="edit-button" target="_blank" href="{{ $.Site.Params.sandpointsGiteaUrl }}/_new/master/content/{{ index . 0 }}/">ADD_{{ index . 0 | upper }}</a>{{ end }}
|
||||
{{ with $scratch.mantle }}<a class="edit-button" target="_blank" href="{{ $.Site.Params.sandpointsGiteaUrl }}/_new/master/content/{{ index . 0 }}/">ADD_{{ index . 0 | upper }}</a>{{ end }}
|
||||
{{ with $scratch.crust }}<a class="edit-button" target="_blank" href="{{ $.Site.Params.sandpointsGiteaUrl }}/_new/master/content/{{ index . 0 }}/">ADD_{{ index . 0 | upper }}</a>{{ end }}
|
||||
{{ if not $scratch.core }}<a class="edit-button" target="_blank" href="{{ $.Site.Params.sandpointsGiteaUrl }}/_new/master/content/{{ $currentDir }}">ADD_{{ substr $currentDir 0 -1 | upper }}</a>{{ end }}
|
||||
<a class="edit-button" target="_blank" href="{{ $.Site.Params.sandpointsGiteaUrl }}/_edit/master/PUBLISH.trigger.mkd">PUBLISH</a>
|
||||
<a class="edit-button" target="_blank" href="{{ $.Site.Params.sandpointsGiteaUrl }}"> ? </a>
|
||||
</div>
|
||||
{{ else }}
|
||||
{{ $editPage := $.Site.GetPage "/edit" }}
|
||||
<div class="headiter" id="preview">
|
||||
<a class="edit-button" href="{{ $editPage.RelPermalink }}index.html?edit={{ .File.UniqueID }}">EDIT_THIS</a>
|
||||
{{ with $scratch.core }}<a class="edit-button" href="{{ $editPage.RelPermalink }}index.html?new={{ index . 0 }}">ADD_{{ index . 0 | upper }}</a>{{ end }}
|
||||
{{ with $scratch.mantle }}<a class="edit-button" href="{{ $editPage.RelPermalink }}index.html?new={{ index . 0 }}">ADD_{{ index . 0 | upper }}</a>{{ end }}
|
||||
{{ with $scratch.crust }}<a class="edit-button" href="{{ $editPage.RelPermalink }}index.html?new={{ index . 0 }}">ADD_{{ index . 0 | upper }}</a>{{ end }}
|
||||
{{ if not $scratch.core }}<a class="edit-button" href="{{ $editPage.RelPermalink }}index.html?new={{ $currentDir }}">ADD_{{ substr $currentDir 0 -1 | upper }}</a>{{ end }}
|
||||
</div>
|
||||
</div>
|
||||
{{ end }}
|
||||
|
||||
<div class="header">
|
||||
<a title="{{ $.Site.Home.Title }}'s Bibliotheke" href="/library/BROWSE_LIBRARY.html" class="bibliotheke" target="_blank">
|
||||
<img src="/images/bibliotheke.svg" />
|
||||
</a>
|
||||
<div class="breadcrumbs">
|
||||
{{ if and (not $scratch.depth) $.Site.Params.sandpointsHome }}
|
||||
<a href="{{ with $.GetPage $.Site.Params.sandpointsHome }}{{ .RelPermalink }}{{ end }}{{ if eq hugo.Environment "offline" }}index.html{{ end }}"><span class="supt">{{ with $.GetPage $.Site.Params.sandpointsHome }}{{ substr .Title 0 1 }}</span><i>{{ substr .Title 1 }}</i></a>{{ end }}
|
||||
{{ end }}
|
||||
{{ if eq $scratch.depth "mantle" }}
|
||||
{{ with gt (len $scratch.is_in) 1 }}
|
||||
<div class="ddmenu">
|
||||
<input id="toggly0" type="checkbox">
|
||||
<label for="toggly0" tabindex="1"><span class="sup">cf. </span><a href="{{ with (index $scratch.is_in 0) }}{{ .RelPermalink }}{{ end }}{{ if eq hugo.Environment "offline" }}index.html{{ end }}">{{ with index $scratch.is_in 0 }}<i>{{ .Title }}</i></a> {{ end }}</label>
|
||||
<div class="hiddendiv">
|
||||
<ul class="mt-4">
|
||||
{{ range after 1 $scratch.is_in }}
|
||||
<li><a href="{{ .RelPermalink }}{{ if eq hugo.Environment "offline" }}index.html{{ end }}"><i>{{ .Title }}</i></a></li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
{{ else }}
|
||||
<a href="{{ with (index $scratch.is_in 0) }}{{ .RelPermalink }}{{ end }}{{ if eq hugo.Environment "offline" }}index.html{{ end }}"><span class="supt">{{ with (index $scratch.is_in 0) }}{{ substr .Title 0 1 }}</span><i>{{ substr .Title 1 }}</i></a>{{ end }}
|
||||
{{ end }}
|
||||
<span class="mantlebar"><i> » <a href="{{ .RelPermalink }}{{ if eq hugo.Environment "offline" }}index.html{{ end }}">{{ .Title }}</a></i></span>
|
||||
{{ end }}
|
||||
|
||||
{{ if eq $scratch.depth "crust" }}
|
||||
{{ with gt (len $is_in_is_in) 1 }}
|
||||
<div class="ddmenu">
|
||||
<input id="toggly1" type="checkbox">
|
||||
<label for="toggly1" tabindex="1"><span class="sup">cf. </span><a href="{{ with (index $is_in_is_in 0) }}{{ .RelPermalink }}{{ end }}{{ if eq hugo.Environment "offline" }}index.html{{ end }}">{{ with (index $is_in_is_in 0) }}<i>{{ .Title }}</i></a> {{ end }}</label>
|
||||
<div class="hiddendiv">
|
||||
<ul class="mt-4">
|
||||
{{ range after 1 $is_in_is_in }}
|
||||
<li><a href="{{ .RelPermalink }}{{ if eq hugo.Environment "offline" }}index.html{{ end }}"><i>{{ .Title }}</i></a></li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
{{ else }}
|
||||
{{ $home := index $is_in_is_in 0 }}
|
||||
<a href="{{ $home.RelPermalink }}{{ if eq hugo.Environment "offline" }}index.html{{ end }}"><span class="supt">{{ substr $home.Title 0 1 }}</span><i>{{ substr $home.Title 1 }}</i></a>
|
||||
{{ end }}
|
||||
|
||||
{{ with gt (len $scratch.is_in) 1 }}
|
||||
»
|
||||
<div class="ddmenu">
|
||||
<input id="toggly" type="checkbox">
|
||||
<label for="toggly" tabindex="1"><span class="sup">cf. </span><a href="{{ with (index $scratch.is_in 0) }}{{ .RelPermalink }}{{ end }}{{ if eq hugo.Environment "offline" }}index.html{{ end }}">{{ with (index $scratch.is_in 0) }}<i>{{ .Title }}</i></a> {{ end }}</label>
|
||||
<div class="hiddendiv">
|
||||
<ul class="mt-4">
|
||||
{{ range after 1 $scratch.is_in }}
|
||||
<li><a href="{{ .RelPermalink }}{{ if eq hugo.Environment "offline" }}index.html{{ end }}"><i>{{ .Title }}</i></a></li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
{{ else }}» <a href="{{ with (index $scratch.is_in 0) }}{{ .RelPermalink }}{{ end }}{{ if eq hugo.Environment "offline" }}index.html{{ end }}">{{ with (index $scratch.is_in 0) }}<i>{{ .Title }}</i></a>{{ end }}
|
||||
{{ end }}
|
||||
<span class="mantlebar"><i> » <a href="{{ .RelPermalink }}{{ if eq hugo.Environment "offline" }}index.html{{ end }}">{{ .Title }}</a></i></span>
|
||||
{{ end }}
|
||||
</div>
|
||||
</div>
|
|
@ -1,3 +0,0 @@
|
|||
<link href="/css/paged_interface.css" rel="stylesheet" type="text/css">
|
||||
<link href="/css/print.css" rel="stylesheet" type="text/css">
|
||||
<script src="/js/paged.polyfill.js"></script>
|
|
@ -1,96 +0,0 @@
|
|||
{{ $s := partialCached "scratch.html" . }}
|
||||
|
||||
{{ $currentNode := . }}
|
||||
{{ $currentDir := "" }}
|
||||
{{ with .File }}
|
||||
{{ $currentDir = .Dir }}
|
||||
{{ end }}
|
||||
{{ $currentFile := (printf "/%s" .File) }}
|
||||
{{ $scratch := $s.Get $currentFile }}
|
||||
|
||||
{{ $longestTitle := "" }}
|
||||
|
||||
<div id="ph-{{ .File.UniqueID }}" class="{{ $scratch.depth | default "crust" }}title"><span class="supt">{{ substr $currentDir 0 -1 }}⁄</span>{{ .Title }}</div>
|
||||
|
||||
<div class="grid">
|
||||
<div class="leftcolumn">
|
||||
{{ if ne (trim .Page.TableOfContents "\n") "<nav id=\"TableOfContents\"></nav>" }}
|
||||
{{ .Page.TableOfContents }}
|
||||
{{ end }}
|
||||
</div>
|
||||
<div class="rightcolumn">
|
||||
{{ $closeDivs := false }}
|
||||
{{ $sandnamePlural := (slice) }}
|
||||
{{ range $k, $v := $.Site.Data.sandpointsnamegraph }}
|
||||
{{ $sandnamePlural = $sandnamePlural | append $v }}
|
||||
{{ 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="#ph-{{ .File.UniqueID }}">{{ .Title }}</a>{{ with .Params.affiliation }}<span class="affiliation">, {{ . }}</span>{{ end }}
|
||||
</div>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{- with $closeDivs -}}</div></div>{{ end }}
|
||||
|
||||
{{ if and (not (eq $scratch.depth "crust")) $scratch.has_children }}
|
||||
<div class="has hashas">
|
||||
{{ with $scratch.has }}
|
||||
<div class="hassup">has {{ $scratch.has }}⁄</div>
|
||||
{{ end }}
|
||||
<div class="afterhas">
|
||||
{{ range $scratch.has_children }}
|
||||
{{ $authors := "" }}
|
||||
{{ range $k, $authorLink := .Params.authors }}
|
||||
{{ $authorPage := $.GetPage (printf "/author/%s" $authorLink) }}
|
||||
{{ $prefix := ", " }}
|
||||
{{ with not $k }}
|
||||
{{ $prefix = "" }}
|
||||
{{ end }}
|
||||
{{ $authors = printf "%s%s%s" $authors $prefix $authorPage.Title }}
|
||||
{{ end }}
|
||||
<div class="{{ $scratch.child_depth }} crustoc">
|
||||
<a class="toc" href="#ph-{{ .File.UniqueID }}"><span><span class="back">{{ .Title }} {{with $authors}}({{ $authors }}){{ end }}</span></span></a>
|
||||
</div>
|
||||
{{ if gt (len .Title) (len $longestTitle) }}
|
||||
{{ $longestTitle = .Title }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
<div class="{{ $scratch.child_depth }} crustoc longesttitle">
|
||||
<a class="toc" href="javascript:;"><span><span class="back">{{ $longestTitle }}.....</span></span></a>
|
||||
</div>
|
||||
</div></div>
|
||||
{{ end }}
|
||||
|
||||
{{ if eq $scratch.depth "crust" }}
|
||||
<div class="has hasin">
|
||||
<div class="hassup">in {{ index $scratch.in 1 }}⁄</div>
|
||||
<div class="afterhas">
|
||||
{{ range $scratch.is_in }}
|
||||
<div class="{{ substr $currentDir 0 -1 }}">
|
||||
<a href="{{ .RelPermalink }}{{ if eq hugo.Environment "offline" }}index.html{{ end }}">{{ .Title }}</a>
|
||||
</div>
|
||||
{{ end }}
|
||||
</div></div>
|
||||
{{ end }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
{{ with .Page.Params.abstract }}<div class="abstract"><span class="supt">abstract⁄</span>{{ . | $.Page.RenderString | htmlUnescape | safeHTML }}</div>{{ end }}
|
||||
|
||||
{{- $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 -}}
|
|
@ -1,13 +0,0 @@
|
|||
{{ $parentName := . }}
|
||||
{{ range (readDir .) }}
|
||||
{{ $currentName := printf "%s/%s" $parentName .Name }}
|
||||
{{ if .IsDir }}
|
||||
<p>_Dir: {{ $currentName }}</p>
|
||||
{{ partial "readdir.html" $currentName }}
|
||||
{{ else }}
|
||||
{{ if eq (path.Ext .Name) ".md" }}
|
||||
{{ $f := readFile $currentName }}
|
||||
<textarea wrap="off" col="108" row="48 ">{{ $f }}</textarea>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ end }}
|
|
@ -1,4 +0,0 @@
|
|||
<script type="text/javascript">var relPathDepth = {{- .RelPermalink | strings.Count "/" -}};var sandpointsPageId = "{{- with .File -}}{{- .UniqueID -}}{{- end -}}";</script>
|
||||
{{ $sjsopts := dict "targetPath" "js/sandpoints.js" "minify" "true"}}
|
||||
{{ $sjs := resources.Get "js/sandpoints.js" | js.Build $sjsopts }}
|
||||
<script defer src='{{ $sjs.RelPermalink }}' type="application/javascript"></script>
|
|
@ -1,202 +0,0 @@
|
|||
{{ $currentNode := . }}
|
||||
|
||||
{{ $_ := newScratch }}
|
||||
{{ $debug := (slice) }}
|
||||
|
||||
{{ $sandnameSingular := (slice) }}
|
||||
{{ $sandnamePlural := (slice) }}
|
||||
|
||||
{{ range $k, $v := $.Site.Data.sandpointsnamegraph }}
|
||||
{{ $sandnameSingular = $sandnameSingular | append $k }}
|
||||
{{ $sandnamePlural = $sandnamePlural | append $v }}
|
||||
{{ end }}
|
||||
|
||||
{{ $pPath := "" }}
|
||||
{{ range $p := .Site.RegularPages }}
|
||||
{{ $pPath = printf "/%s" $p.File }}
|
||||
{{ $pageDir := "" }}
|
||||
{{ with $p.File }}
|
||||
{{ $pageDir = (substr .Dir 0 -1)}}
|
||||
{{ end }}
|
||||
|
||||
{{ $content := $p.Content }}
|
||||
{{ with $links := $p.Scratch.Get "links" }}
|
||||
{{ range $link := $links }}
|
||||
{{ $linkPath := printf "/%s" $link.File}}
|
||||
{{ with ($_.Get $linkPath) }}
|
||||
{{ $_.SetInMap $linkPath "backlinks" (uniq ((index ($_.Get $linkPath) "backlinks") | append $p)) }}
|
||||
{{ else }}
|
||||
{{ $_.SetInMap $linkPath "backlinks" (slice $p) }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
||||
{{ $paramsKeys := (slice) }}
|
||||
{{ range $k, $v := $p.Params }}
|
||||
{{ $paramsKeys = $paramsKeys | append $k }}
|
||||
{{ end }}
|
||||
|
||||
{{ $mentions := intersect $paramsKeys $sandnamePlural }}
|
||||
{{ range $mention := $mentions }}
|
||||
{{ range $m := index $p.Params $mention }}
|
||||
{{ $mentionLink := printf "/%s/%s" (substr $mention 0 -1) $m }}
|
||||
{{ with ($_.Get $mentionLink) }}
|
||||
{{ $p.Scratch.Add "links" (uniq (($p.Scratch.Get "links")| append ($.GetPage $mentionLink))) }}
|
||||
{{ $_.SetInMap $mentionLink "backlinks" (uniq ((index ($_.Get $mentionLink) "backlinks") | append $p)) }}
|
||||
{{ else }}
|
||||
{{ $p.Scratch.Add "links" (uniq (($p.Scratch.Get "links")| append ($.GetPage $mentionLink))) }}
|
||||
{{ $_.SetInMap $mentionLink "backlinks" (slice $p) }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
||||
{{ $gp := $.GetPage $pPath }}
|
||||
{{ $gpPath := printf "/%s" $gp.File }}
|
||||
{{ range $k, $v := $gp.Params }}
|
||||
{{ with in $k "has_" }}
|
||||
{{ $s := index (split $k "has_") 1 }}
|
||||
{{ range $sin,$plur := $currentNode.Site.Data.sandpointsnamegraph }}
|
||||
{{ if eq $s $plur }}
|
||||
{{ range index $gp.Params $k }}
|
||||
{{ $cp := $.GetPage (printf "/%s/%s" $sin .) }}
|
||||
{{ $cpPath := printf "/%s" $cp.File }}
|
||||
{{ range $kcp, $vcp := $cp.Params }}
|
||||
{{ with in $kcp "has_" }}
|
||||
{{ $scp := index (split $kcp "has_") 1 }}
|
||||
{{ range $sincp,$plurcp := $currentNode.Site.Data.sandpointsnamegraph }}
|
||||
{{ if eq $scp $plurcp }}
|
||||
|
||||
{{ $_.SetInMap $gpPath "depth" "core" }}
|
||||
{{ $_.SetInMap $gpPath "child_depth" "mantle" }}
|
||||
{{ $_.SetInMap $gpPath "has" $s }}
|
||||
|
||||
{{ with $gp.File }}
|
||||
{{ $core := substr .Dir 0 -1 }}
|
||||
{{ with index ($_.Get $gpPath) "core" }}
|
||||
{{ $_.SetInMap $gpPath "core" (uniq ((index ($_.Get $gpPath) "core") | append $core)) }}
|
||||
{{ else }}
|
||||
{{ $_.SetInMap $gpPath "core" (slice $core) }}
|
||||
{{ end }}
|
||||
{{ $cor := $_.Get $cpPath }}
|
||||
{{ with $cor.core }}
|
||||
{{ $_.SetInMap $cpPath "core" (uniq ((index ($_.Get $cpPath) "core") | append $core)) }}
|
||||
{{ else }}
|
||||
{{ $_.SetInMap $cpPath "core" (slice $core) }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
||||
{{ with $cp.File }}
|
||||
{{ $mantle := substr .Dir 0 -1 }}
|
||||
{{ with index ($_.Get $gpPath) "mantle" }}
|
||||
{{ $_.SetInMap $gpPath "mantle" (uniq ((index ($_.Get $gpPath) "mantle") | append $mantle)) }}
|
||||
{{ else }}
|
||||
{{ $_.SetInMap $gpPath "mantle" (slice $mantle) }}
|
||||
{{ end }}
|
||||
{{ with index ($_.Get $cpPath) "mantle" }}
|
||||
{{ $_.SetInMap $cpPath "mantle" (uniq ((index ($_.Get $cpPath) "mantle") | append $mantle)) }}
|
||||
{{ else }}
|
||||
{{ $_.SetInMap $cpPath "mantle" (slice $mantle) }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
||||
{{ with $_.Get $gpPath }}
|
||||
{{ if .has_children }}
|
||||
{{ $hasChildren := index . "has_children" | append $cp }}
|
||||
{{ $_.SetInMap $gpPath "has_children" (uniq $hasChildren) }}
|
||||
{{ else }}
|
||||
{{ $_.SetInMap $gpPath "has_children" (slice $cp) }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
||||
{{ $_.SetInMap $cpPath "depth" "mantle" }}
|
||||
{{ $_.SetInMap $cpPath "child_depth" "crust" }}
|
||||
{{ $_.SetInMap $cpPath "plural" $plur }}
|
||||
{{ $_.SetInMap $cpPath "has" $scp }}
|
||||
|
||||
{{ if isset $cp.Params $kcp }}
|
||||
{{ $_.SetInMap $cpPath "has_children" (slice) }}
|
||||
{{ with index ($_.Get $cpPath) "is_in" }}
|
||||
{{ $isincore := index ($_.Get $cpPath) "is_in" | append $gp}}
|
||||
{{ $_.SetInMap $cpPath "is_in" (uniq $isincore) }}
|
||||
{{ else }}
|
||||
{{ $_.SetInMap $cpPath "is_in" (slice $gp) }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
||||
{{ range index $cp.Params $kcp }}
|
||||
{{ $gcp := $.GetPage (printf "/%s/%s" $sincp .) }}
|
||||
{{ $gcpPath := printf "/%s" $gcp.File }}
|
||||
|
||||
{{ with $_.Get $cpPath }}
|
||||
{{ if .has_children }}
|
||||
{{ $hasGChildren := index . "has_children" | append $gcp }}
|
||||
{{ $_.SetInMap $cpPath "has_children" (uniq $hasGChildren) }}
|
||||
{{ else }}
|
||||
{{ $_.SetInMap $cpPath "has_children" (slice $gcp) }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
||||
{{ $_.SetInMap $gcpPath "depth" "crust" }}
|
||||
{{ $_.SetInMap $gcpPath "plural" $plurcp }}
|
||||
{{ $_.SetInMap $gcpPath "in" (slice $sin $plur) }}
|
||||
|
||||
{{ with $gp.File }}
|
||||
{{ $core := substr .Dir 0 -1 }}
|
||||
{{ with index ($_.Get $gcpPath) "core" }}
|
||||
{{ $_.SetInMap $gcpPath "core" (uniq ((index ($_.Get $gcpPath) "core") | append $core)) }}
|
||||
{{ else }}
|
||||
{{ $_.SetInMap $gcpPath "core" (slice $core) }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
||||
{{ with $cp.File }}
|
||||
{{ $mantle := substr .Dir 0 -1 }}
|
||||
{{ with index ($_.Get $gcpPath) "mantle" }}
|
||||
{{ $_.SetInMap $gcpPath "mantle" (uniq ((index ($_.Get $gcpPath) "mantle") | append $mantle)) }}
|
||||
{{ else }}
|
||||
{{ $_.SetInMap $gcpPath "mantle" (slice $mantle) }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
||||
{{ with $gcp.File }}
|
||||
{{ $crust := substr .Dir 0 -1 }}
|
||||
{{ with index ($_.Get $gpPath) "crust" }}
|
||||
{{ $_.SetInMap $gpPath "crust" (uniq ((index ($_.Get $gpPath) "crust") | append $crust)) }}
|
||||
{{ else }}
|
||||
{{ $_.SetInMap $gpPath "crust" (slice $crust) }}
|
||||
{{ end }}
|
||||
{{ with index ($_.Get $cpPath) "crust" }}
|
||||
{{ $_.SetInMap $cpPath "crust" (uniq ((index ($_.Get $cpPath) "crust") | append $crust)) }}
|
||||
{{ else }}
|
||||
{{ $_.SetInMap $cpPath "crust" (slice $crust) }}
|
||||
{{ end }}
|
||||
{{ with index ($_.Get $gcpPath) "crust" }}
|
||||
{{ $_.SetInMap $gcpPath "crust" (uniq ((index ($_.Get $gcpPath) "crust") | append $crust)) }}
|
||||
{{ else }}
|
||||
{{ $_.SetInMap $gcpPath "crust" (slice $crust) }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
||||
{{ with $_.Get $gcpPath }}
|
||||
{{ if .is_in }}
|
||||
{{ $isinmantle := index . "is_in" | append $cp}}
|
||||
{{ $_.SetInMap $gcpPath "is_in" (uniq $isinmantle) }}
|
||||
{{ else }}
|
||||
{{ $_.SetInMap $gcpPath "is_in" (slice $cp) }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
||||
{{ $_.SetInMap $pPath "debug" (printf "%#v" $debug) }}
|
||||
{{ end }}
|
||||
|
||||
{{ return $_ }}
|
|
@ -1,105 +0,0 @@
|
|||
{{ $s := partialCached "scratch.html" . }}
|
||||
|
||||
{{ $currentNode := . }}
|
||||
{{ $currentDir := "" }}
|
||||
{{ with .File }}
|
||||
{{ $currentDir = .Dir }}
|
||||
{{ end }}
|
||||
{{ $currentFile := (printf "/%s" .File) }}
|
||||
{{ $scratch := $s.Get $currentFile }}
|
||||
|
||||
{{ $sandnamePlural := (slice) }}
|
||||
{{ $sandnameSingular := "" }}
|
||||
{{ $mentionLink := "" }}
|
||||
|
||||
<div class="{{ $scratch.depth | default "crust" }}title"><span class="supt">{{ substr $currentDir 0 -1 }}⁄{{ substr .Title 0 1 }}</span>{{ substr .Title 1 }}</div></div>
|
||||
|
||||
<div class="grid">
|
||||
<div class="leftcolumn">
|
||||
{{ if ne (trim .Page.TableOfContents "\n") "<nav id=\"TableOfContents\"></nav>" }}
|
||||
{{ .Page.TableOfContents }}
|
||||
{{ end }}
|
||||
</div>
|
||||
<div class="rightcolumn">
|
||||
{{ $closeDivs := false }}
|
||||
|
||||
{{ range $k, $v := $.Site.Data.sandpointsnamegraph }}
|
||||
{{ $sandnamePlural = $sandnamePlural | append $v }}
|
||||
{{ 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 }}
|
||||
{{ range $k, $v := $.Site.Data.sandpointsnamegraph }}
|
||||
{{ if eq $v $mention }}
|
||||
{{ $mentionLink = printf "/%s/%s" $k $m }}
|
||||
{{ $sandnameSingular = $k }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{- 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 }}{{ $sandnameSingular }}{{ end }}{{ end }}⁄</div>
|
||||
<div class="afterhas">
|
||||
{{- end -}}
|
||||
<div class="crust">
|
||||
<a href="{{ .RelPermalink }}{{ if eq hugo.Environment "offline" }}index.html{{ end }}">{{ .Title }}</a>{{ with .Params.affiliation }}<span class="affiliation">, {{ . }}</span>{{ end }}
|
||||
</div>
|
||||
{{- end -}}
|
||||
{{ end }}
|
||||
{{- with $closeDivs -}}</div></div>{{ end }}
|
||||
{{ end }}
|
||||
|
||||
{{ if in .Page.Site.Params.sandpointsMentionedIn (substr $currentDir 0 -1) }}
|
||||
<div class="has hasmentionedin">
|
||||
{{ with $scratch.backlinks }}
|
||||
<div class="hassup">mentioned in⁄</div>
|
||||
{{ end }}
|
||||
<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>
|
||||
{{ end }}
|
||||
|
||||
{{ if and (not (eq $scratch.depth "crust")) $scratch.has_children }}
|
||||
<div class="has hashas">
|
||||
{{ with $scratch.has }}
|
||||
<div class="hassup">has {{ $scratch.has }}⁄</div>
|
||||
{{ end }}
|
||||
<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>
|
||||
{{ end }}
|
||||
|
||||
{{ if eq $scratch.depth "crust" }}
|
||||
<div class="has hasin">
|
||||
<div class="hassup">in {{ index $scratch.in 1 }}⁄</div>
|
||||
<div class="afterhas">
|
||||
{{ range $scratch.is_in }}
|
||||
<div class="{{ substr $currentDir 0 -1 }}">
|
||||
<a href="{{ .RelPermalink }}{{ if eq hugo.Environment "offline" }}index.html{{ end }}">{{ .Title }}</a>
|
||||
</div>
|
||||
{{ end }}
|
||||
</div></div>
|
||||
{{ end }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
{{ with .Page.Params.abstract }}<div class="abstract"><span class="supt">abstract⁄</span>{{ . | $.Page.RenderString | htmlUnescape | safeHTML }}</div>{{ end }}
|
||||
|
||||
{{- $vld := false -}}{{- range $k, $v := .Page.Params.keywords -}}{{- if eq $k 0 -}}{{- $vld = true -}}<div class="keywords"><span class="sup">keywords⁄</span><a href="/keywords/{{ urlize $v }}/{{ if eq hugo.Environment "offline" }}index.html{{ end }}">{{- $v -}}</a>{{- else -}}, <a href="/keywords/{{ urlize $v }}/{{ if eq hugo.Environment "offline" }}index.html{{ end }}">{{- $v -}}</a>{{- end -}}{{- end -}}{{- with $vld -}}</div>{{- end -}}
|
||||
|
||||
{{ $var := printf "repo={\"frontmatter\": %s, \"content\": %s, \"path\": \"%s\", \"relpermalink\": \"%s\" }" (jsonify .Params) (jsonify .RawContent) .File.Path .RelPermalink | resources.FromString (printf "js/repo/%s.js" .File.UniqueID) }}
|
||||
{{ $dummy := $var.Permalink }}
|
|
@ -1,11 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
|
||||
<html lang="{{ with .Site.LanguageCode }}{{ . }}{{- else -}}en-us{{- end -}}">
|
||||
<head>
|
||||
{{- partial "head.html" . -}}
|
||||
{{- partial "pagedjs.html" . -}}
|
||||
</head>
|
||||
<body>
|
||||
{{- block "singlebody" . -}}{{- end -}}
|
||||
</body>
|
||||
</html>
|
|
@ -1,113 +0,0 @@
|
|||
{{- define "singlebody" -}}
|
||||
{{ $cssOutput := "" }}
|
||||
{{ $cssHashes := "" }}
|
||||
|
||||
{{ $s := partialCached "scratch.html" . }}
|
||||
{{ $p := $.GetPage .Params.print }}
|
||||
{{ $scratch := $s.Get (printf "/%s" $p.File) }}
|
||||
|
||||
{{ $authorsPages := (slice) }}
|
||||
{{ with $p.Params.authors }}
|
||||
{{ range $n, $authorFile := . }}
|
||||
{{ $author := $.GetPage (printf "/author/%s" $authorFile) }}
|
||||
{{ $authorsPages = (uniq $authorsPages) | append $author }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
||||
{{ $editorsPages := (slice) }}
|
||||
{{ with $p.Params.editors }}
|
||||
{{ range $n, $editorFile := . }}
|
||||
{{ $editor := $.GetPage (printf "/editor/%s" $editorFile) }}
|
||||
{{ $editorsPages = (uniq $editorsPages) | append $editor }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
||||
{{ $currentDir := "" }}
|
||||
{{ with .File }}
|
||||
{{ $currentDir = .Dir }}
|
||||
{{ end }}
|
||||
|
||||
<div class="print0">{{ partial "printsinglebody.html" $p }}</div>
|
||||
<div class="content">{{ $p.Content }}</div>
|
||||
|
||||
{{ range $scratch.has_children }}
|
||||
<div class="crustpage">
|
||||
{{ $addS := 0 }}
|
||||
{{ with .Params.authors }}
|
||||
{{ $addS = len . }}
|
||||
{{ end }}
|
||||
|
||||
{{ with .Params.editors }}
|
||||
{{ range $n, $editorFile := . }}
|
||||
{{ $editor := $.GetPage (printf "/editor/%s" $editorFile) }}
|
||||
{{ $editorsPages = (uniq $editorsPages) | append $editor }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
||||
{{ range $n, $authorFile := .Params.authors }}
|
||||
{{ $author := $.GetPage (printf "/author/%s" $authorFile) }}
|
||||
{{ $authorsPages = (uniq $authorsPages) | append $author }}
|
||||
{{ if eq $n 0 }}
|
||||
<div class="runningAuthors"><span class="sup">author{{ with (gt $addS 1) }}s{{ end }}⁄</span><a href="#ph-{{ $author.File.UniqueID }}">{{ $author.Title }}</a>
|
||||
{{ else }}
|
||||
, <a href="#ph-{{ $author.File.UniqueID }}">{{ $author.Title }}</a>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ with .Params.authors }}</div>{{ end }}
|
||||
|
||||
{{ $tit := .Title }}
|
||||
{{ if gt (len .Title) 54 }}
|
||||
{{ $tit = printf "%s…" (substr .Title 0 50) }}
|
||||
{{ end }}
|
||||
<div class="runningTitle"><span class="sup">{{ index $scratch.crust 0 }}⁄</span><a href="#ph-{{ .File.UniqueID }}">{{ $tit }}</a></div>
|
||||
{{ partial "printsinglebody.html" . }}
|
||||
{{ .Content }}
|
||||
{{ $kid := $s.Get (printf "/%s" .File) }}
|
||||
{{ range $kid.has_children }}
|
||||
<div class="crustpage">
|
||||
{{ $addS := 0 }}
|
||||
{{ with .Params.authors }}
|
||||
{{ $addS = len . }}
|
||||
{{ end }}
|
||||
{{ range $n, $authorFile := .Params.authors }}
|
||||
{{ $author := $.GetPage (printf "/author/%s" $authorFile) }}
|
||||
{{ if eq $n 0 }}
|
||||
<div class="runningAuthors"><span class="sup">author{{ with (gt $addS 1) }}s{{ end }}⁄</span><a href="#ph-{{ $author.File.UniqueID }}">{{ $author.Title }}</a>
|
||||
{{ else }}
|
||||
, <a href="#ph-{{ $author.File.UniqueID }}">{{ $author.Title }}</a>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ with .Params.authors }}</div>{{ end }}
|
||||
|
||||
{{ $tit := .Title }}
|
||||
{{ if gt (len .Title) 54 }}
|
||||
{{ $tit = printf "%s…" (substr .Title 0 50) }}
|
||||
{{ end }}
|
||||
<div class="runningTitle"><span class="sup">{{ index $scratch.crust 0 }}⁄</span><a href="#ph-{{ .File.UniqueID }}">{{ $tit }}</a></div>
|
||||
{{ partial "printsinglebody.html" . }}
|
||||
{{ .Content }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
||||
{{ range union (uniq $editorsPages) (uniq $authorsPages) }}
|
||||
<div class="authorpage">
|
||||
<div class="runningTitle runningAuthors"><span class="sup">{{ index $scratch.mantle 0 }}⁄</span><a href="#ph-{{ $p.File.UniqueID }}">{{ $p.Title }}</a></div>
|
||||
<div id="ph-{{ .File.UniqueID }}" class="{{ $scratch.depth | default "crust" }}title"><span class="supt">{{ substr .File.Dir 0 -1 }}⁄</span>{{ .Title }}</div>
|
||||
{{ .Content }}
|
||||
|
||||
{{ if in .Page.Site.Params.sandpointsMentionedIn (substr .File.Dir 0 -1) }}
|
||||
{{ $ss := $s.Get (printf "/%s" .File) }}
|
||||
<div class="has hasmentionedin">
|
||||
{{ with $ss }}
|
||||
<div class="hassup">mentioned in⁄</div>
|
||||
{{ end }}
|
||||
<div class="afterhas">
|
||||
{{ range $ss.backlinks }}
|
||||
<div class="{{ $ss.child_depth }}">
|
||||
<a href="#ph-{{ .File.UniqueID }}">{{ .Title }}</a>
|
||||
</div>
|
||||
{{ end }}
|
||||
</div></div>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{- end -}}
|
|
@ -1,25 +0,0 @@
|
|||
{{ $inn := .Inner | $.Page.RenderString }}
|
||||
<div class="glosscontainer">
|
||||
<div class="gloss">
|
||||
{{- range $g := (split $inn "\n") -}}
|
||||
{{- if hasPrefix $g "{r}" -}}
|
||||
<div class="glossregular">
|
||||
{{- substr $g 3 | htmlUnescape | safeHTML -}}
|
||||
</div>
|
||||
{{- else if hasPrefix $g "{g}" -}}
|
||||
<div class="glossline">
|
||||
{{- range (split (substr $g 3) "|") -}}
|
||||
{{- with . -}}
|
||||
<div class="glosswords">
|
||||
{{- range (split . "," ) -}}
|
||||
<div class="glossword">{{- . | htmlUnescape | safeHTML -}}</div>
|
||||
{{- end -}}
|
||||
</div>
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
</div>
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
</div>
|
||||
<div class="glossnumber {{ with $.Page.Params.glossnumberAuto }}glossnumberAuto{{ end }}">{{ with .Get 0 }}{{ . }}{{ end}}</div>
|
||||
</div>
|
|
@ -1 +0,0 @@
|
|||
<span class="nosup{{ with .Get 0}} {{.}}{{ end }}">{{ with .Inner }} {{ $.Page.RenderString . }} {{ end }}</span>
|
|
@ -1,10 +0,0 @@
|
|||
{{ $id := index .Params 0 }}
|
||||
{{ $type := index .Params 1 | default "track" }}
|
||||
<iframe
|
||||
width="100%"
|
||||
height="300"
|
||||
scrolling="no"
|
||||
frameborder="no"
|
||||
allow="autoplay"
|
||||
src="https://w.soundcloud.com/player/?url=https%3A//api.soundcloud.com/{{ $type }}s/{{ $id }}&color=%23ff5500&auto_play=false&hide_related=false&show_comments=true&show_user=true&show_reposts=false&show_teaser=true&visual=true">
|
||||
</iframe>
|
|
@ -1,12 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="{{ with .Site.LanguageCode }}{{ . }}{{ else }}en-us{{ end }}">
|
||||
<head>
|
||||
{{- partialCached "head.html" . -}}
|
||||
<title>{{- .Title }} - {{ .Site.Title -}}</title>
|
||||
{{- partialCached "sandpointjs.html" . .RelPermalink -}}
|
||||
</head>
|
||||
<body>
|
||||
{{- block "keywords" . -}}{{- end -}}
|
||||
{{- partialCached "footer.html" . -}}
|
||||
</body>
|
||||
</html>
|
|
@ -1,23 +0,0 @@
|
|||
{{ define "keywords" }}
|
||||
{{ $p := split (trim .RelPermalink "/") "/" }}
|
||||
{{ if eq (len $p) 1 }}
|
||||
<div class="coretitle"><span class="supt">{{ index $p 0 }}⁄</span>All</div>
|
||||
{{ range $taxonomyname, $taxonomy := .Site.Taxonomies }}
|
||||
{{ if eq (index $p 0) $taxonomyname }}
|
||||
{{ range $key, $value := $taxonomy }}
|
||||
<span> <a href="/{{ index $p 0 }}/{{ $key }}/{{ if eq hugo.Environment "offline" }}index.html{{ end }}">{{ $key }}</a>({{ len (index (index $.Site.Taxonomies $taxonomyname) $key) }})</span>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ else }}
|
||||
<div class="coretitle"><span class="supt">{{ index $p 0 }}⁄</span>{{ index $p 1 }}</div>
|
||||
{{ range .Pages.ByDate.Reverse }}
|
||||
<div class="blog-date">{{ .Date.Format "Jan 2, 2006" }}</div>
|
||||
<div class="blog-title"><a href="{{ .RelPermalink }}{{ if eq hugo.Environment "offline" }}index.html{{ end }}">{{ .Title }}</a></div>
|
||||
{{ range $n, $authorFile := .Params.authors }}
|
||||
{{ $author := $.GetPage (printf "/author/%s" $authorFile) }}
|
||||
<span class="blog-author"><a href="{{ $author.RelPermalink }}">{{ $author.Title }}</a></span>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ end }}
|
|
@ -1,12 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="{{ with .Site.LanguageCode }}{{ . }}{{ else }}en-us{{ end }}">
|
||||
<head>
|
||||
{{- partialCached "head.html" . -}}
|
||||
<title>{{- .Title }} - {{ .Site.Title -}}</title>
|
||||
{{- partialCached "sandpointjs.html" . .RelPermalink -}}
|
||||
</head>
|
||||
<body>
|
||||
{{ block "urls" . }}{{ end }}
|
||||
{{- partialCached "footer.html" . -}}
|
||||
</body>
|
||||
</html>
|
|
@ -1,104 +0,0 @@
|
|||
{{ define "urls" }}
|
||||
<h2>Backlinks, outgoing URLs, bibliographic references and internal links:</h2>
|
||||
{{ $s := partialCached "scratch.html" . }}
|
||||
|
||||
<div id="toggleAllLinks" onclick="toggleAllLinks()">[toggle expand/collapse]</div>
|
||||
<p></p>
|
||||
{{ range $p := .Site.RegularPages }}
|
||||
<details><summary>{{ with $p.File }}<span class="sup">{{- substr .Dir 0 -1 -}}⁄</span>{{ end }}<a href="{{ $p.RelPermalink }}{{ if eq hugo.Environment "offline" }}index.html{{ end }}">{{ $p.Title }}</a></summary>
|
||||
|
||||
{{ $pPath := printf "/%s" $p.File }}
|
||||
{{ with $ss := $s.Get $pPath }}
|
||||
{{ with $ss.backlinks }}
|
||||
{{ range $i, $_ := $ss.backlinks }}
|
||||
{{ if eq $i 0 }}
|
||||
<details><summary>Mentioned in other Sandpoints pages ({{ len $ss.backlinks }}):</summary><ul>
|
||||
{{ end }}
|
||||
<li>{{ with $_.File }}<span class="sup">{{ substr .Dir 0 -1 }}⁄</span>{{ end }}<a href="{{ $_.RelPermalink }}">{{ $_.Title }}</a></li>
|
||||
{{ end }}
|
||||
</ul></details>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
||||
{{ with ($p.Scratch.Get "links") }}
|
||||
{{ range $i, $_ := uniq ($p.Scratch.Get "links") }}
|
||||
{{ if eq $i 0 }}
|
||||
<details><summary>Internal links to other Sandpoint pages ({{ len (uniq ($p.Scratch.Get "links")) }}):</summary><ul>
|
||||
{{ end }}
|
||||
<li>{{ with $_.File }}<span class="sup">{{ substr .Dir 0 -1 }}⁄</span>{{ end }}<a href="{{ $_.RelPermalink }}">{{ $_.Title }}</a></li>
|
||||
{{ end }}
|
||||
</ul></details>
|
||||
{{ end }}
|
||||
|
||||
{{ $http_links := (slice) }}
|
||||
{{ $library_links := (slice) }}
|
||||
{{ $anchor_links := (slice) }}
|
||||
{{ $other_links := (slice) }}
|
||||
|
||||
{{ with ($p.Scratch.Get "urls") }}
|
||||
{{- $c_prefix := $p.Site.Params.sandpointsCatalogPrefix | default "/library/" -}}
|
||||
{{ range $i, $_ := ($p.Scratch.Get "urls") }}
|
||||
{{ if strings.HasPrefix $_ "http" }}
|
||||
{{ $http_links = $http_links | append $_ }}
|
||||
{{ else if strings.HasPrefix $_ $c_prefix }}
|
||||
{{ $library_links = $library_links | append $_ }}
|
||||
{{ else}}
|
||||
{{ $other_links = $other_links | append $_ }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
||||
{{ with $http_links }}
|
||||
{{ range $i, $_ := $http_links }}
|
||||
{{ if eq $i 0 }}
|
||||
<details><summary>Outgoing links to other pages on Internet ({{ len $http_links }}):</summary><ul>
|
||||
{{ end }}
|
||||
<li><span class="sup">www⁄</span><a href="{{ $_ }}" target="_blank">{{ $_ }}</a></li>
|
||||
{{ end }}
|
||||
</ul></details>
|
||||
{{ end }}
|
||||
|
||||
{{ with $library_links }}
|
||||
{{ range $i, $_ := $library_links }}
|
||||
{{ if eq $i 0 }}
|
||||
<details><summary>Links to Sandpoint's library ({{ len $library_links }}):</summary><ul>
|
||||
{{ end }}
|
||||
<li><span class="sup">lib⁄</span><a href="{{ $_ }}" target="_blank">{{ $_ }}</a></li>
|
||||
{{ end }}
|
||||
</ul></details>
|
||||
{{ end }}
|
||||
|
||||
{{ with ($p.Scratch.Get "bibs") }}
|
||||
{{ range $i, $_ := ($p.Scratch.Get "bibs") }}
|
||||
{{ if eq $i 0 }}
|
||||
<details><summary>Bibliographic references ({{ len ($p.Scratch.Get "bibs") }}):</summary><ul>
|
||||
{{ end }}
|
||||
<li><span class="sup">bib⁄</span><a href="{{ index $_ 0 }}" target="_blank">{{ index $_ 1 }}</a></li>
|
||||
{{ end }}
|
||||
</ul></details>
|
||||
{{ end }}
|
||||
|
||||
{{ with $other_links }}
|
||||
{{ $formattingN := 0 }}
|
||||
{{ $anchorN := 0 }}
|
||||
{{ range $i, $_ := $other_links }}
|
||||
{{ if eq $i 0 }}
|
||||
<details><summary>Anchor, formatting and other links ({{ len $other_links }}):</summary><ul>
|
||||
{{ end }}
|
||||
{{ if strings.HasPrefix $_ "#" }}
|
||||
{{ $anchorN = add $anchorN 1 }}
|
||||
{{ else if strings.HasPrefix $_ "{"}}
|
||||
{{ $formattingN = add $formattingN 1 }}
|
||||
{{ else }}
|
||||
<li><span class="sup">other⁄</span><a href="{{ $_ }}" target="_blank">{{ $_ }}</a></li>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ with $formattingN }}<li>{{ $formattingN }} formatting links.</a></li>{{ end }}
|
||||
{{ with $anchorN }}<li>{{ $anchorN }} anchor links.</a></li>{{ end }}
|
||||
</ul></details>
|
||||
{{ end }}
|
||||
|
||||
</details>
|
||||
|
||||
{{ end }}
|
||||
{{ end }}
|
Loading…
Add table
Reference in a new issue