forked from TrueCloudLab/frostfs.info
28 lines
972 B
HTML
28 lines
972 B
HTML
{{ .Page.Scratch.Set "needPopper" true }}
|
|
|
|
{{- $styles := resources.Get "sass/term.scss" | resources.ToCSS | resources.Minify | resources.Fingerprint -}}
|
|
<link rel="stylesheet" href="{{ $styles.Permalink }}" integrity="{{ $styles.Data.Integrity }}" media="screen">
|
|
|
|
{{- $position := .Position }}
|
|
{{- $term := .Inner -}}
|
|
{{- $gloss_entry := $term -}}
|
|
{{- if .Get 0 -}}
|
|
{{- $gloss_entry = .Get 0 -}}
|
|
{{- end -}}
|
|
|
|
{{- $glossary := .Site.GetPage "/concepts/glossary" -}}
|
|
{{- $words := $glossary.Resources.ByType "page" -}}
|
|
{{- $dfn := "" -}}
|
|
{{- $title := $term -}}
|
|
{{- range $w := $words -}}
|
|
{{- if (eq (upper $w.Title) (upper $gloss_entry)) -}}
|
|
{{- $dfn = $w.Content -}}
|
|
{{- $title = $w.Title -}}
|
|
{{- end -}}
|
|
{{- end -}}
|
|
|
|
{{- if (eq $dfn "") -}}
|
|
{{- errorf "Could not find glossary entry for '%s' (%s)" $gloss_entry $position -}}
|
|
{{- end -}}
|
|
|
|
<span class="term" data-title="{{- $title }}" data-body="{{- $dfn | string -}}">{{ $term }}</span>
|