-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy pathresults.html
28 lines (27 loc) · 986 Bytes
/
results.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
{{ define "results" }}
<ol class="entries">
{{ range $k, $r := .Entries }}
<li class="entry" data-guid="{{ $r.GUID }}">
<header class="head">
<h3 class="title">{{ $r.Content }}</h3>
<span class="pronun">♪ {{ JoinStrings $r.Phones "," }}</span>
</header>
<ol class="defs">
{{ $prevTypes := "" }}
{{ range $k, $d := $r.Relations }}
{{ $types := (JoinStrings $d.RelationTypes ", ") }}
{{ if ne $prevTypes $types }}
<div class="types">
<span>{{ $types }}</span>
</div>
{{ end }}
<li>
<div data-guid="{{ $d.GUID }}" class="d">{{ $d.Content }}</div>
</li>
{{ $prevTypes = $types }}
{{ end }}
</ol>
</li>
{{ end }}
</ol>
{{ end }}