Add hot tempalte reloading, WIP pos

This commit is contained in:
Elnu 2023-07-21 10:34:56 -07:00
parent e00df6aac6
commit 442f727d8a
4 changed files with 73 additions and 15 deletions

View file

@ -0,0 +1,3 @@
{{ define "definition" }}
{{ if .PartOfSpeech }}<chip>{{ .PartOfSpeech }}</chip> {{ end }}{{ .Definition -}}
{{ end }}

View file

@ -9,11 +9,11 @@
{{- end -}}
</h3>
{{ if le (len .Definitions) 2 -}}
<p>{{- index .Definitions 0 -}}</p>
<p>{{- template "definition" (index .Definitions 0) -}}</p>
{{- else -}}
<ol>
{{- range .Definitions }}
<li>{{- . -}}</li>
<li>{{- template "definition" . -}}</li>
{{- end }}
</ol>
{{- end }}