Rebuilding the Machine Listening Curriculum beginning in 2024
No puede seleccionar más de 25 temas Los temas deben comenzar con una letra o número, pueden incluir guiones ('-') y pueden tener hasta 35 caracteres de largo.

106 líneas
4.4 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. {{ $sandnamePlural := (slice) }}
  10. {{ $sandnameSingular := "" }}
  11. {{ $mentionLink := "" }}
  12. <div class="{{ $scratch.depth | default "crust" }}title"><span class="supt">{{ substr $currentDir 0 -1 }}⁄{{ substr .Title 0 1 }}</span>{{ substr .Title 1 }}</div></div>
  13. <div class="grid">
  14. <div class="leftcolumn">
  15. {{ if ne (trim .Page.TableOfContents "\n") "<nav id=\"TableOfContents\"></nav>" }}
  16. {{ .Page.TableOfContents }}
  17. {{ end }}
  18. </div>
  19. <div class="rightcolumn">
  20. {{ $closeDivs := false }}
  21. {{ range $k, $v := $.Site.Data.sandpointsnamegraph }}
  22. {{ $sandnamePlural = $sandnamePlural | append $v }}
  23. {{ end }}
  24. {{ $paramsKeys := (slice) }}
  25. {{ range $k, $v := $currentNode.Params }}
  26. {{ $paramsKeys = $paramsKeys | append $k }}
  27. {{ end }}
  28. {{ $mentions := intersect $paramsKeys $sandnamePlural }}
  29. {{ range $mention := $mentions }}
  30. {{ range $k, $m := index $currentNode.Params $mention }}
  31. {{ range $k, $v := $.Site.Data.sandpointsnamegraph }}
  32. {{ if eq $v $mention }}
  33. {{ $mentionLink = printf "/%s/%s" $k $m }}
  34. {{ $sandnameSingular = $k }}
  35. {{ end }}
  36. {{ end }}
  37. {{- with $.GetPage $mentionLink -}}
  38. {{- with not $k -}}
  39. {{ $closeDivs = true }}
  40. <div class="has hasauthors">
  41. <div class="hassup">{{ with (index $currentNode.Params $mention) }}{{ if gt (len (index $currentNode.Params $mention)) 1 }}{{ $mention }}{{ else }}{{ $sandnameSingular }}{{ end }}{{ end }}⁄</div>
  42. <div class="afterhas">
  43. {{- end -}}
  44. <div class="crust">
  45. <a href="{{ .RelPermalink }}{{ if eq hugo.Environment "offline" }}index.html{{ end }}">{{ .Title }}</a>
  46. </div>
  47. {{- end -}}
  48. {{ end }}
  49. {{- with $closeDivs -}}</div></div>{{ end }}
  50. {{ end }}
  51. {{ if in .Page.Site.Params.sandpointsMentionedIn (substr $currentDir 0 -1) }}
  52. <div class="has hasmentionedin">
  53. {{ with $scratch.backlinks }}
  54. <div class="hassup">mentioned in⁄</div>
  55. {{ end }}
  56. <div class="afterhas">
  57. {{ range $scratch.backlinks }}
  58. <div class="{{ $scratch.child_depth }}">
  59. <a href="{{ .RelPermalink }}{{ if eq hugo.Environment "offline" }}index.html{{ end }}">{{ .Title }}</a>
  60. </div>
  61. {{ end }}
  62. </div></div>
  63. {{ end }}
  64. {{ if and (not (eq $scratch.depth "crust")) $scratch.has_children }}
  65. <div class="has hashas">
  66. {{ with $scratch.has }}
  67. <div class="hassup">has {{ $scratch.has }}⁄</div>
  68. {{ end }}
  69. <div class="afterhas">
  70. {{ range $scratch.has_children }}
  71. <div class="{{ $scratch.child_depth }}">
  72. <a href="{{ .RelPermalink }}{{ if eq hugo.Environment "offline" }}index.html{{ end }}">{{ .Title }}</a>
  73. </div>
  74. {{ end }}
  75. </div></div>
  76. {{ end }}
  77. {{ if eq $scratch.depth "crust" }}
  78. <div class="has hasin">
  79. <div class="hassup">in {{ index $scratch.in 1 }}⁄</div>
  80. <div class="afterhas">
  81. {{ range $scratch.is_in }}
  82. <div class="{{ substr $currentDir 0 -1 }}">
  83. <a href="{{ .RelPermalink }}{{ if eq hugo.Environment "offline" }}index.html{{ end }}">{{ .Title }}</a>
  84. </div>
  85. {{ end }}
  86. </div></div>
  87. {{ end }}
  88. </div>
  89. </div>
  90. {{ with .Page.Params.abstract }}<div class="abstract"><span class="supt">abstract⁄</span>{{ . | $.Page.RenderString | htmlUnescape | safeHTML }}</div>{{ end }}
  91. {{- $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 -}},&nbsp;<a href="/keywords/{{ urlize $v }}/{{ if eq hugo.Environment "offline" }}index.html{{ end }}">{{- $v -}}</a>{{- end -}}{{- end -}}{{- with $vld -}}</div>{{- end -}}
  92. {{ $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) }}
  93. {{ $dummy := $var.Permalink }}