Rebuilding the Machine Listening Curriculum beginning in 2024
Nie możesz wybrać więcej, niż 25 tematów Tematy muszą się zaczynać od litery lub cyfry, mogą zawierać myślniki ('-') i mogą mieć do 35 znaków.

61 wiersze
4.2 KiB

  1. {{- $text_link := .Text -}}
  2. {{ $_ := newScratch }}
  3. {{- range $k, $v := .Page.Site.Data.sandpointsnamegraph -}}
  4. {{ $_.Add "triads" $k }}
  5. {{- end -}}
  6. {{- if strings.HasPrefix .Destination "img:" -}}
  7. {{- $img_params := (substr .Destination 4) -}}
  8. {{- $img_src := index (split $img_params " ") 0 -}}
  9. {{- $img_attr := index (split $img_params $img_src) 1 -}}
  10. <img class="sandpoints-img" src="{{ $img_src }}" {{ $img_attr | safeHTMLAttr }} />
  11. {{- else if strings.HasPrefix .Destination "vid:" -}}
  12. {{- $vid_params := (substr .Destination 4) -}}
  13. {{- $vid_src := index (split $vid_params " ") 0 -}}
  14. {{- $vid_attr := index (split $vid_params $vid_src) 1 -}}
  15. <video class="sandpoints-vid" controls src="{{ $vid_src }}" {{ $vid_attr | safeHTMLAttr }}></video>
  16. {{- else if strings.HasPrefix .Destination "bib:" -}}
  17. {{- $destination := (substr .Destination 4) -}}
  18. {{- $c_prefix := .Page.Site.Params.sandpointsCatalogPrefix | default "/library/" -}}
  19. {{- if index $.Page.Site.Data.books.catalog $destination -}}
  20. {{- $b := index $.Page.Site.Data.books.catalog $destination -}}
  21. {{- $bibhref := printf "%sBROWSE_LIBRARY.html#/book/%s" (safeURL ($c_prefix)) $destination }}
  22. {{ $bibtitle := "" }}
  23. {{ with $b.title }}
  24. {{- $bibtitle = printf "%s" $b.title }}
  25. {{ end }}
  26. {{ .Page.Scratch.Add "bibs" (slice (slice $bibhref $bibtitle)) }}
  27. {{- if not $text_link -}}
  28. <span>{{- delimit $b.authors ", " " & " -}}{{- with $b.pubdate -}},&nbsp;{{- substr . 0 4}}{{- end -}}.&nbsp;<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>.&nbsp;{{- with $b.publisher -}}{{- . -}}.{{- end -}}</span>
  29. {{- else -}}
  30. <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>
  31. {{- end -}}
  32. {{- else -}}
  33. <a href="{{- $c_prefix | safeURL -}}BROWSE_LIBRARY.html#/book/{{- $destination -}}"{{- with .Title}} title="{{- . -}}"{{- end -}}>{{- $text_link -}}⦚<span>bib:{{- $destination -}} not found</span></a>
  34. {{- end -}}
  35. {{- else if in ($_.Get "triads") (index (split .Destination ":") 0) -}}
  36. {{- if $.Page.Site.GetPage (printf "/%s" (replace .Destination ":" "/")) -}}
  37. {{- $session := $.Page.Site.GetPage (printf "/%s" (replace .Destination ":" "/")) -}}
  38. {{ .Page.Scratch.Add "links" (slice $session) }}
  39. {{- if not $text_link -}}
  40. <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>
  41. {{- else -}}
  42. <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>
  43. {{- end -}}
  44. {{- else -}}
  45. <a href="{{- .Destination -}}/{{- if eq hugo.Environment "offline" -}}index.html{{- end -}}">{{- $text_link -}}⦚<span>{{- .Destination -}} not found</span></a>
  46. {{- end -}}
  47. {{- else if strings.HasPrefix .Destination "audio:" -}}
  48. {{- $a_destination := (substr .Destination 6) -}}
  49. {{- if findRE "^.*static" $a_destination -}}
  50. <span class="soundcite" data-url="{{- (replaceRE "^.*static" "" $a_destination ) | safeURL -}}">{{ .Text }}</span>
  51. {{- else -}}
  52. <span class="soundcite" data-url="{{- $a_destination | safeURL -}}">{{ .Text }}</span>
  53. {{- end -}}
  54. {{- else if findRE "^.*static" .Destination -}}
  55. <img src="{{- (replaceRE "^.*static" "" .Destination ) | safeURL -}}" alt="{{- .Text -}}" {{- with .Title}} title="{{- . -}}"{{- end -}} />
  56. {{- else -}}
  57. <img src="{{- .Destination | safeURL -}}" alt="{{- .Text -}}" {{- with .Title}} title="{{- . -}}"{{- end -}} />
  58. {{- end -}}