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/partials/entryfull.html
2023-07-23 13:43:30 -07:00

25 lines
No EOL
660 B
HTML

{{ define "entryfull" }}
<div class="box">
<h3 lang="ja">
{{- range .Furigana -}}
{{- if .Furigana -}}
<ruby>{{- .Kanji -}}<rp>(</rp><rt>{{- .Furigana -}}</rt><rp>)</rp></ruby>
{{- else -}}
{{- .Kanji -}}
{{- end -}}
{{- end -}}
</h3>
{{- $count := len .Definitions -}}
{{ if eq $count 1 -}}
<p>{{- template "definition" (index .Definitions 0) -}}</p>
{{- else if ne $count 0 -}}
<ol>
{{- range .Definitions }}
<li>
{{ template "definition" . }}
</li>
{{- end }}
</ol>
{{- end }}
</div>
{{ end }}