|
|
|
@ -47,13 +47,16 @@
|
|
|
|
|
{{- end -}}
|
|
|
|
|
{{- end -}}
|
|
|
|
|
{{- end -}}
|
|
|
|
|
{{- if .dictionary -}}
|
|
|
|
|
{{ if .dictionary }}
|
|
|
|
|
{{- $.Scratch.Set "dictionary" .dictionary -}}
|
|
|
|
|
{{ end }}
|
|
|
|
|
{{- if not (and .dictionary (hasPrefix .dictionary "http")) -}}
|
|
|
|
|
{{- $.Scratch.Set "dictionary" (printf "%s" ($.Scratch.Get "dictionary") | printf "%s%s" "https://jisho.org/word/" | printf "%s") -}}
|
|
|
|
|
{{- end -}}
|
|
|
|
|
{{- if and (not .dictionary) (not .pos) -}}
|
|
|
|
|
{{- $.Scratch.Get "html" | safeHTML -}}
|
|
|
|
|
{{- else -}}
|
|
|
|
|
<a href="https://jisho.org/word/{{- $.Scratch.Get "dictionary" -}}" class="{{- .pos -}}" title="{{- .pos -}}" target="_blank">{{- $.Scratch.Get "html" | safeHTML -}}</a>
|
|
|
|
|
<a href="{{- $.Scratch.Get "dictionary" -}}" class="{{- .pos -}}" title="{{- .pos -}}" target="_blank">{{- $.Scratch.Get "html" | safeHTML -}}</a>
|
|
|
|
|
{{- end -}}
|
|
|
|
|
{{- end -}}</p>
|
|
|
|
|
{{- end -}}
|
|
|
|
|