From 1c8bf451efb96f9f0e2ca5d1758f06d0a2567b62 Mon Sep 17 00:00:00 2001 From: Marcell Mars Date: Tue, 15 Dec 2020 02:09:00 +0100 Subject: [PATCH] bunch of unifying formatting --- .../layouts/partials/header.html | 96 ----- layouts/_default/baseof.html | 18 +- layouts/_default/list.html | 1 - layouts/_default/single.html | 13 +- layouts/partials/backlinks.html | 1 - layouts/partials/head.html | 8 +- layouts/partials/header.html | 144 ++++---- layouts/partials/scratch.html | 340 +++++++++--------- layouts/partials/singlebody.html | 58 +-- layouts/print/baseof.html | 13 + layouts/print/single.html | 24 ++ layouts/shortcodes/gloss.html | 44 +-- layouts/shortcodes/soundcloud.html | 14 +- layouts/urls/baseof.html | 18 +- layouts/urls/list.html | 200 +++++------ 15 files changed, 464 insertions(+), 528 deletions(-) delete mode 100644 customizations/RaceCriticalTheories/layouts/partials/header.html delete mode 100644 layouts/partials/backlinks.html create mode 100644 layouts/print/baseof.html create mode 100644 layouts/print/single.html diff --git a/customizations/RaceCriticalTheories/layouts/partials/header.html b/customizations/RaceCriticalTheories/layouts/partials/header.html deleted file mode 100644 index 38c7689..0000000 --- a/customizations/RaceCriticalTheories/layouts/partials/header.html +++ /dev/null @@ -1,96 +0,0 @@ -{{ $s := partialCached "scratch.html" . }} - -{{ $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 "preview" }} - {{- $giteaUrl := .Site.Params.sandpointsGiteaUrl -}} -
- EDIT_THIS - ADD_{{ with $scratch.core }}{{ index . 0 | upper }}{{ end }} - ADD_{{ with $scratch.mantle }}{{ index . 0 | upper }}{{ end }} - ADD_{{ with $scratch.crust }}{{ index . 0 | upper }}{{ end }} - PUBLISH - ? -
-{{ end }} -

*****************************************************

-
- - - - -
diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html index d5a041f..4c09044 100644 --- a/layouts/_default/baseof.html +++ b/layouts/_default/baseof.html @@ -1,13 +1,13 @@ - - {{- partialCached "head.html" . -}} - {{- .Title }} - {{ .Site.Title -}} - {{- partialCached "sandpointjs.html" . .RelPermalink -}} - - - {{- block "singlebody" . }}{{- end }} - {{- partialCached "footer.html" . -}} - + + {{- partialCached "head.html" . -}} + {{- .Title }} - {{ .Site.Title -}} + {{- partialCached "sandpointjs.html" . .RelPermalink -}} + + + {{- block "singlebody" . }}{{- end }} + {{- partialCached "footer.html" . -}} + diff --git a/layouts/_default/list.html b/layouts/_default/list.html index b872a6e..b29646a 100644 --- a/layouts/_default/list.html +++ b/layouts/_default/list.html @@ -1,6 +1,5 @@ {{ define "singlebody" }} - {{ $currentNode := . }} {{ $currentDir := "" }} {{ with .File }} diff --git a/layouts/_default/single.html b/layouts/_default/single.html index 8793a11..7f12634 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -1,11 +1,6 @@ {{- define "singlebody" -}} - -{{- partialCached "header.html" . .RelPermalink -}} - -

{{ .Title }}

- -{{- partialCached "singlebody.html" . .RelPermalink -}} - -
{{ .Content }}
- + {{- partialCached "header.html" . .RelPermalink -}} +

{{ .Title }}

+ {{- partialCached "singlebody.html" . .RelPermalink -}} +
{{ .Content }}
{{- end -}} diff --git a/layouts/partials/backlinks.html b/layouts/partials/backlinks.html deleted file mode 100644 index e852645..0000000 --- a/layouts/partials/backlinks.html +++ /dev/null @@ -1 +0,0 @@ -{{ .Scratch }} diff --git a/layouts/partials/head.html b/layouts/partials/head.html index e180fec..0169016 100644 --- a/layouts/partials/head.html +++ b/layouts/partials/head.html @@ -4,13 +4,15 @@ {{ if .Description }} - + {{ end }} + {{ if .Keywords }} - + {{ end }} + {{ if .Params.Author }} - + {{ end }} {{ template "_internal/opengraph.html" . }} diff --git a/layouts/partials/header.html b/layouts/partials/header.html index 4eb37a3..33c7b42 100644 --- a/layouts/partials/header.html +++ b/layouts/partials/header.html @@ -10,15 +10,15 @@ {{ $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) }} + {{ 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 }} - {{ end }} {{ end }} {{ $is_in_is_in := (slice) }} @@ -27,75 +27,75 @@ {{ end }} {{ if eq hugo.Environment "preview" }} -
- EDIT_THIS - {{ with $scratch.core }}ADD_{{ index . 0 | upper }}{{ end }} - {{ with $scratch.mantle }}ADD_{{ index . 0 | upper }}{{ end }} - {{ with $scratch.crust }}ADD_{{ index . 0 | upper }}{{ end }} - {{ if not $scratch.core }}ADD_{{ substr $currentDir 0 -1 | upper }}{{ end }} - PUBLISH - ? -
+
+ EDIT_THIS + {{ with $scratch.core }}ADD_{{ index . 0 | upper }}{{ end }} + {{ with $scratch.mantle }}ADD_{{ index . 0 | upper }}{{ end }} + {{ with $scratch.crust }}ADD_{{ index . 0 | upper }}{{ end }} + {{ if not $scratch.core }}ADD_{{ substr $currentDir 0 -1 | upper }}{{ end }} + PUBLISH + ? +
{{ end }}
- - - -
diff --git a/layouts/partials/scratch.html b/layouts/partials/scratch.html index 3cbf6a8..beb3b0e 100644 --- a/layouts/partials/scratch.html +++ b/layouts/partials/scratch.html @@ -5,182 +5,182 @@ {{ $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 }} + {{ $pPath = printf "/%s" $p.File }} + {{ $pageDir := "" }} + {{ with $p.File }} + {{ $pageDir = (substr .Dir 0 -1)}} {{ end }} - {{ end }} - {{ with $authors := $p.Params.authors }} - {{ range $author := $authors }} - {{ $authorLink := printf "/author/%s" $author }} - {{ with ($_.Get $authorLink) }} - {{ $_.SetInMap $authorLink "backlinks" (uniq ((index ($_.Get $authorLink) "backlinks") | append $p)) }} - {{ else }} - {{ $_.SetInMap $authorLink "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 }} + {{ $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 }} - {{ end }} {{ end }} - {{ end }} -{{ $_.SetInMap $pPath "debug" (printf "%#v" $debug) }} + {{ with $authors := $p.Params.authors }} + {{ range $author := $authors }} + {{ $authorLink := printf "/author/%s" $author }} + {{ with ($_.Get $authorLink) }} + {{ $_.SetInMap $authorLink "backlinks" (uniq ((index ($_.Get $authorLink) "backlinks") | append $p)) }} + {{ else }} + {{ $_.SetInMap $authorLink "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 $_ }} diff --git a/layouts/partials/singlebody.html b/layouts/partials/singlebody.html index 6cfda2b..49a5aea 100644 --- a/layouts/partials/singlebody.html +++ b/layouts/partials/singlebody.html @@ -12,9 +12,9 @@
- {{ if ne (trim .Page.TableOfContents "\n") "" }} - {{ .Page.TableOfContents }} - {{ end }} + {{ if ne (trim .Page.TableOfContents "\n") "" }} + {{ .Page.TableOfContents }} + {{ end }}
{{- range $k, $v := .Page.Params.authors -}} @@ -22,7 +22,7 @@ {{- with not $k -}}
author{{ with $.Page.Params.authors }}{{ if gt (len .) 1 }}s{{ end }}{{ end }}⁄
-
+
{{- end -}}
{{ .Title }} @@ -36,39 +36,39 @@ {{ with $scratch.backlinks }}
mentioned in⁄
{{ end }} -
- {{ range $scratch.backlinks }} - - {{ end }} -
+
+ {{ range $scratch.backlinks }} + + {{ end }} +
{{ end }} {{ if and (not (eq $scratch.depth "crust")) $scratch.has_children }}
- {{ with $scratch.has }} -
has {{ $scratch.has }}⁄
- {{ end }} -
- {{ range $scratch.has_children }} - + {{ with $scratch.has }} +
has {{ $scratch.has }}⁄
{{ end }} -
+
+ {{ range $scratch.has_children }} + + {{ end }} +
{{ end }} {{ if eq $scratch.depth "crust" }}
-
in {{ index $scratch.in 1 }}⁄
-
- {{ range $scratch.is_in }} -
+
in {{ index $scratch.in 1 }}⁄
+
+ {{ range $scratch.is_in }} + - {{ end }} -
+
+ {{ end }} +
{{ end }}
@@ -77,5 +77,5 @@ {{ with .Page.Params.abstract }}
abstract⁄{{ . | markdownify }}
{{ end }} {{- $vld := false -}}{{- range $k, $v := .Page.Params.keywords -}}{{- if eq $k 0 -}}{{- $vld = true -}}
keywords⁄{{- $v -}}{{- else -}}, {{- $v -}}{{- end -}}{{- end -}}{{- with $vld -}}
{{- end -}} -{{ with .Page.Params.abstract }}{{ end }} \ No newline at end of file + class="keywords">keywords⁄{{- $v -}}{{- else -}}, {{- $v -}}{{- end -}}{{- end -}}{{- with $vld -}}{{- end -}} +{{ with .Page.Params.abstract }}{{ end }} diff --git a/layouts/print/baseof.html b/layouts/print/baseof.html new file mode 100644 index 0000000..f27eaaa --- /dev/null +++ b/layouts/print/baseof.html @@ -0,0 +1,13 @@ + + + + + {{- partialCached "head.html" . -}} + {{- partial "pagedjs.html" . -}} + + +
+ {{- block "singlebody" . -}}{{- end -}} +
+ + diff --git a/layouts/print/single.html b/layouts/print/single.html new file mode 100644 index 0000000..614dad4 --- /dev/null +++ b/layouts/print/single.html @@ -0,0 +1,24 @@ +{{- define "singlebody" -}} + {{ $s := partialCached "scratch.html" . }} + {{ $p := $.GetPage .Params.print }} + {{ $scratch := $s.Get (printf "/%s" $p.File) }} + + {{ $currentDir := "" }} + {{ with .File }} + {{ $currentDir = .Dir }} + {{ end }} + +
{{ partial "singlebody.html" $p }}
+
{{ $p.Content }} + {{ range $printPage := $scratch.has_cildren }} +
{{ partial "singlebody.html" $printPage }}
+
{{ $printPage.Content }} + {{ $printPageScratch := $s.Get (printf "/%s" $printPage.File) }} + {{ range $printPageKid := $printPageScratch.has_children }} +
{{ partial "singlebody.html" $printPageKid }}
+
{{ $printPageKid.Content }} + {{ . }} + {{ end }} +
+ {{ end }} +{{- end -}} diff --git a/layouts/shortcodes/gloss.html b/layouts/shortcodes/gloss.html index 0d23469..b90c4c3 100644 --- a/layouts/shortcodes/gloss.html +++ b/layouts/shortcodes/gloss.html @@ -1,25 +1,25 @@ {{ $inn := .Inner | $.Page.RenderString }}
-
- {{- range $g := (split $inn "\n") -}} - {{- if hasPrefix $g "{r}" -}} -
- {{- substr $g 3 | htmlUnescape | safeHTML -}} -
- {{- else if hasPrefix $g "{g}" -}} -
- {{- range (split (substr $g 3) "|") -}} - {{- with . -}} -
- {{- range (split . "," ) -}} -
{{- . | htmlUnescape | safeHTML -}}
- {{- end -}} -
- {{- end -}} - {{- end -}} -
+
+ {{- range $g := (split $inn "\n") -}} + {{- if hasPrefix $g "{r}" -}} +
+ {{- substr $g 3 | htmlUnescape | safeHTML -}} +
+ {{- else if hasPrefix $g "{g}" -}} +
+ {{- range (split (substr $g 3) "|") -}} + {{- with . -}} +
+ {{- range (split . "," ) -}} +
{{- . | htmlUnescape | safeHTML -}}
+ {{- end -}} +
{{- end -}} - {{- end -}} -
-
{{ with .Get 0 }}{{ . }}{{ end}}
-
\ No newline at end of file + {{- end -}} +
+ {{- end -}} + {{- end -}} +
+
{{ with .Get 0 }}{{ . }}{{ end}}
+
diff --git a/layouts/shortcodes/soundcloud.html b/layouts/shortcodes/soundcloud.html index 27a8229..a26db5b 100644 --- a/layouts/shortcodes/soundcloud.html +++ b/layouts/shortcodes/soundcloud.html @@ -1,10 +1,10 @@ {{ $id := index .Params 0 }} {{ $type := index .Params 1 | default "track" }} \ No newline at end of file + 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"> + diff --git a/layouts/urls/baseof.html b/layouts/urls/baseof.html index f47940f..85953ac 100644 --- a/layouts/urls/baseof.html +++ b/layouts/urls/baseof.html @@ -1,12 +1,12 @@ - - {{- partialCached "head.html" . -}} - {{- .Title }} - {{ .Site.Title -}} - {{- partialCached "sandpointjs.html" . .RelPermalink -}} - - - {{ block "urls" . }}{{ end }} - {{- partialCached "footer.html" . -}} - + + {{- partialCached "head.html" . -}} + {{- .Title }} - {{ .Site.Title -}} + {{- partialCached "sandpointjs.html" . .RelPermalink -}} + + + {{ block "urls" . }}{{ end }} + {{- partialCached "footer.html" . -}} + diff --git a/layouts/urls/list.html b/layouts/urls/list.html index 1896278..2e1eb98 100644 --- a/layouts/urls/list.html +++ b/layouts/urls/list.html @@ -1,106 +1,106 @@ {{ define "urls" }} -

Backlinks, outgoing URLs, bibliographic references and internal links:

- {{ $s := partialCached "scratch.html" . }} +

Backlinks, outgoing URLs, bibliographic references and internal links:

+ {{ $s := partialCached "scratch.html" . }} - -

- {{ range $p := .Site.RegularPages }} - {{ with or ($p.Scratch.Get "urls") ($p.Scratch.Get "bibs") ($p.Scratch.Get "links") ($p.Scratch.Get "backlinks" )}} -
{{ with $p.File }}{{- substr .Dir 0 -1 -}}⁄{{ end }}{{ $p.Title }} + +

+ {{ range $p := .Site.RegularPages }} + {{ with or ($p.Scratch.Get "urls") ($p.Scratch.Get "bibs") ($p.Scratch.Get "links") ($p.Scratch.Get "backlinks" )}} +
{{ with $p.File }}{{- substr .Dir 0 -1 -}}⁄{{ end }}{{ $p.Title }} + + {{ $pPath := printf "/%s" $p.File }} + {{ with $ss := $s.Get $pPath }} + {{ with $ss.backlinks }} + {{ range $i, $_ := $ss.backlinks }} + {{ if eq $i 0 }} +
Mentioned in other Sandpoints pages ({{ len $ss.backlinks }}):
    + {{ end }} +
  • {{ with $_.File }}{{ substr .Dir 0 -1 }}⁄{{ end }}{{ $_.Title }}
  • + {{ end }} +
+ {{ end }} + {{ end }} + + {{ with ($p.Scratch.Get "links") }} + {{ range $i, $_ := ($p.Scratch.Get "links") }} + {{ if eq $i 0 }} +
Internal links to other Sandpoint pages ({{ len ($p.Scratch.Get "links") }}):
    + {{ end }} +
  • {{ with $_.File }}{{ substr .Dir 0 -1 }}⁄{{ end }}{{ $_.Title }}
  • + {{ end }} +
+ {{ 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 }} +
Outgoing links to other pages on Internet ({{ len $http_links }}):
    + {{ end }} +
  • www⁄{{ $_ }}
  • + {{ end }} +
+ {{ end }} + + {{ with $library_links }} + {{ range $i, $_ := $library_links }} + {{ if eq $i 0 }} +
Links to Sandpoint's library ({{ len $library_links }}):
    + {{ end }} +
  • lib⁄{{ $_ }}
  • + {{ end }} +
+ {{ end }} + + {{ with ($p.Scratch.Get "bibs") }} + {{ range $i, $_ := ($p.Scratch.Get "bibs") }} + {{ if eq $i 0 }} +
Bibliographic references ({{ len ($p.Scratch.Get "bibs") }}):
+ {{ end }} + + {{ with $other_links }} + {{ $formattingN := 0 }} + {{ $anchorN := 0 }} + {{ range $i, $_ := $other_links }} + {{ if eq $i 0 }} +
Anchor, formatting and other links ({{ len $other_links }}):
    + {{ end }} + {{ if strings.HasPrefix $_ "#" }} + {{ $anchorN = add $anchorN 1 }} + {{ else if strings.HasPrefix $_ "{"}} + {{ $formattingN = add $formattingN 1 }} + {{ else }} +
  • other⁄{{ $_ }}
  • + {{ end }} + {{ end }} + {{ with $formattingN }}
  • {{ $formattingN }} formatting links.
  • {{ end }} + {{ with $anchorN }}
  • {{ $anchorN }} anchor links.
  • {{ end }} +
+ {{ end }} + +
- {{ $pPath := printf "/%s" $p.File }} - {{ with $ss := $s.Get $pPath }} - {{ with $ss.backlinks }} - {{ range $i, $_ := $ss.backlinks }} - {{ if eq $i 0 }} -
Mentioned in other Sandpoints pages ({{ len $ss.backlinks }}):
    - {{ end }} -
  • {{ with $_.File }}{{ substr .Dir 0 -1 }}⁄{{ end }}{{ $_.Title }}
  • - {{ end }} -
{{ end }} - {{ end }} - - {{ with ($p.Scratch.Get "links") }} - {{ range $i, $_ := ($p.Scratch.Get "links") }} - {{ if eq $i 0 }} -
Internal links to other Sandpoint pages ({{ len ($p.Scratch.Get "links") }}):
    - {{ end }} -
  • {{ with $_.File }}{{ substr .Dir 0 -1 }}⁄{{ end }}{{ $_.Title }}
  • - {{ end }} -
- {{ 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 }} -
Outgoing links to other pages on Internet ({{ len $http_links }}):
    - {{ end }} -
  • www⁄{{ $_ }}
  • - {{ end }} -
- {{ end }} - - {{ with $library_links }} - {{ range $i, $_ := $library_links }} - {{ if eq $i 0 }} -
Links to Sandpoint's library ({{ len $library_links }}):
    - {{ end }} -
  • lib⁄{{ $_ }}
  • - {{ end }} -
- {{ end }} - - {{ with ($p.Scratch.Get "bibs") }} - {{ range $i, $_ := ($p.Scratch.Get "bibs") }} - {{ if eq $i 0 }} -
Bibliographic references ({{ len ($p.Scratch.Get "bibs") }}):
- {{ end }} - - {{ with $other_links }} - {{ $formattingN := 0 }} - {{ $anchorN := 0 }} - {{ range $i, $_ := $other_links }} - {{ if eq $i 0 }} -
Anchor, formatting and other links ({{ len $other_links }}):
    - {{ end }} - {{ if strings.HasPrefix $_ "#" }} - {{ $anchorN = add $anchorN 1 }} - {{ else if strings.HasPrefix $_ "{"}} - {{ $formattingN = add $formattingN 1 }} - {{ else }} -
  • other⁄{{ $_ }}
  • - {{ end }} - {{ end }} - {{ with $formattingN }}
  • {{ $formattingN }} formatting links.
  • {{ end }} - {{ with $anchorN }}
  • {{ $anchorN }} anchor links.
  • {{ end }} -
- {{ end }} - -
- {{ end }} - {{ end }} {{ end }}