Rebuilding the Machine Listening Curriculum beginning in 2024
Non puoi selezionare più di 25 argomenti Gli argomenti devono iniziare con una lettera o un numero, possono includere trattini ('-') e possono essere lunghi fino a 35 caratteri.

97 righe
3.9 KiB

  1. {{ $s := partialCached "scratch.html" . }}
  2. {{ $currentNode := . }}
  3. {{ $currentDir := "" }}
  4. {{ with .File }}
  5. {{ $currentDir = .Dir }}
  6. {{ end }}
  7. {{ $currentFile := (printf "/%s" .File) }}
  8. {{ $scratch := $s.Get $currentFile }}
  9. {{ $longestTitle := "" }}
  10. <div id="ph-{{ .File.UniqueID }}" class="{{ $scratch.depth | default "crust" }}title"><span class="supt">{{ substr $currentDir 0 -1 }}⁄</span>{{ .Title }}</div>
  11. <div class="grid">
  12. <div class="leftcolumn">
  13. {{ if ne (trim .Page.TableOfContents "\n") "<nav id=\"TableOfContents\"></nav>" }}
  14. {{ .Page.TableOfContents }}
  15. {{ end }}
  16. </div>
  17. <div class="rightcolumn">
  18. {{ $closeDivs := false }}
  19. {{ $sandnamePlural := (slice) }}
  20. {{ range $k, $v := $.Site.Data.sandpointsnamegraph }}
  21. {{ $sandnamePlural = $sandnamePlural | append $v }}
  22. {{ end }}
  23. {{ $paramsKeys := (slice) }}
  24. {{ range $k, $v := $currentNode.Params }}
  25. {{ $paramsKeys = $paramsKeys | append $k }}
  26. {{ end }}
  27. {{ $mentions := intersect $paramsKeys $sandnamePlural }}
  28. {{ range $mention := $mentions }}
  29. {{ range $k, $m := index $currentNode.Params $mention }}
  30. {{ $mentionLink := printf "/%s/%s" (substr $mention 0 -1) $m }}
  31. {{- with $.GetPage $mentionLink -}}
  32. {{ with not $k }}
  33. {{ $closeDivs = true }}
  34. <div class="has hasauthors">
  35. <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>
  36. <div class="afterhas">
  37. {{ end }}
  38. <div class="crust">
  39. <a href="#ph-{{ .File.UniqueID }}">{{ .Title }}</a>
  40. </div>
  41. {{ end }}
  42. {{ end }}
  43. {{ end }}
  44. {{- with $closeDivs -}}</div></div>{{ end }}
  45. {{ if and (not (eq $scratch.depth "crust")) $scratch.has_children }}
  46. <div class="has hashas">
  47. {{ with $scratch.has }}
  48. <div class="hassup">has {{ $scratch.has }}⁄</div>
  49. {{ end }}
  50. <div class="afterhas">
  51. {{ range $scratch.has_children }}
  52. {{ $authors := "" }}
  53. {{ range $k, $authorLink := .Params.authors }}
  54. {{ $authorPage := $.GetPage (printf "/author/%s" $authorLink) }}
  55. {{ $prefix := ", " }}
  56. {{ with not $k }}
  57. {{ $prefix = "" }}
  58. {{ end }}
  59. {{ $authors = printf "%s%s" $prefix $authorPage.Title }}
  60. {{ end }}
  61. <div class="{{ $scratch.child_depth }} crustoc">
  62. <a class="toc" href="#ph-{{ .File.UniqueID }}"><span><span class="back">{{ .Title }} {{with $authors}}({{ $authors }}){{ end }}</span></span></a>
  63. </div>
  64. {{ if gt (len .Title) (len $longestTitle) }}
  65. {{ $longestTitle = .Title }}
  66. {{ end }}
  67. {{ end }}
  68. <div class="{{ $scratch.child_depth }} crustoc longesttitle">
  69. <a class="toc" href="javascript:;"><span><span class="back">{{ $longestTitle }}.....</span></span></a>
  70. </div>
  71. </div></div>
  72. {{ end }}
  73. {{ if eq $scratch.depth "crust" }}
  74. <div class="has hasin">
  75. <div class="hassup">in {{ index $scratch.in 1 }}⁄</div>
  76. <div class="afterhas">
  77. {{ range $scratch.is_in }}
  78. <div class="{{ substr $currentDir 0 -1 }}">
  79. <a href="{{ .RelPermalink }}{{ if eq hugo.Environment "offline" }}index.html{{ end }}">{{ .Title }}</a>
  80. </div>
  81. {{ end }}
  82. </div></div>
  83. {{ end }}
  84. </div>
  85. </div>
  86. {{ with .Page.Params.abstract }}<div class="abstract"><span class="supt">abstract⁄</span>{{ . | $.Page.RenderString | htmlUnescape | safeHTML }}</div>{{ end }}
  87. {{- $vld := false -}}{{- range $k, $v := .Page.Params.keywords -}}{{- if eq $k 0 -}}{{- $vld = true -}}<div class="keywords"><span class="sup">keywords⁄</span>{{- $v -}}{{- else -}},&nbsp;{{- $v -}}{{- end -}}{{- end -}}{{- with $vld -}}</div>{{- end -}}