generated from ElnuDev/go-project
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
23 lines
597 B
23 lines
597 B
2 years ago
|
{{ define "entry" }}
|
||
|
<div class="box">
|
||
|
<h3>
|
||
|
{{- if .Kanji -}}
|
||
|
<a href="/word/{{ .Kanji }}"><ruby>{{- .Kanji -}}<rp>(</rp><rt>{{- .Reading -}}</rt><rp>)</rp></ruby></a>
|
||
|
{{- else -}}
|
||
|
{{- .Reading -}}
|
||
|
{{- 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 }}
|