mozhi/views/yandex_extras.html
Arya Kiran a17c3b527e
Some checks failed
mozhi pipeline / Push Docker image to Codeberg docker registry (push) Successful in 31m48s
mozhi pipeline / Build and publish artifacts (push) Failing after 12m16s
remove sample data
2024-05-23 11:12:01 +05:30

42 lines
1.4 KiB
HTML

{{ if .Translation.WordChoices }}
<div id="definitions_and_translations">
<div class="translations">
{{ if or .Translation.TargetSynonyms .Translation.SourceSynonyms }}
<span class="def_type">Synonyms</span>
<ul>
{{ if .Translation.TargetSynonyms }}
<li>
<span class="syn_type">{{.Translation.OutputText}}</span>
<span class="syn">{{ range $index, $key := .Translation.TargetSynonyms }}{{ if eq $key "" }}{{ else }}{{ if eq $index 0 }}{{ else }}, {{ end }}{{.}}{{ end }}{{ end }}</span>
</li>
<br>
{{ end }}
{{ if .Translation.SourceSynonyms }}
<li>
<span class="syn_type">{{.OriginalText}}</span>
<span class="syn">{{ range $index, $key := .Translation.SourceSynonyms }}{{ if eq $key "" }}{{ else }}{{ if eq $index 0 }}{{ else }}, {{ end }}{{.}}{{ end }}{{ end }}</span>
</li>
<br>
{{ end }}
</ul>
{{ end }}
</div>
<div class="definitions">
{{ range $key := .Translation.WordChoices }}
<span class="def_type">{{ $key.Word }}</span>
<ol>
{{ range $index, $key2 := $key.ExamplesSource }}
<li>
<br>
<span class="use_in_sentence">{{ index $key.ExamplesSource $index }}</span>
<br>
<span class="use_in_sentence">{{ index $key.ExamplesTarget $index }}</span>
<br>
</li>
{{ end }}
</ol>
{{ end }}
</div>
</div>
{{ end }}