This repository has been archived on 2023-08-08. You can view files and clone it, but cannot push or open issues or pull requests.
jichan.org-go/dict/templates/search.html
2023-07-20 19:31:26 -07:00

21 lines
No EOL
588 B
HTML

<p><i>{{ $count := (len .) }}{{ if eq $count 0 }}No results{{ else }}{{ $count }} result{{ if ne $count 1}}s{{ end }}{{ end }}.</i></p>
{{- range . -}}
<div class="box">
<h3>
{{- if .Kanji -}}
<ruby>{{- .Kanji -}}<rp>(</rp><rt>{{- .Reading -}}</rt><rp>)</rp></ruby>
{{- else -}}
{{- .Reading -}}
{{- end -}}
</h3>
{{ if le (len .Definitions) 2 -}}
<p>{{- index .Definitions 0 -}}</p>
{{- else -}}
<ol>
{{- range .Definitions }}
<li>{{- . -}}</li>
{{- end }}
</ol>
{{- end }}
</div>
{{ end -}}