~seirdy/seirdy.one

seirdy.one/dynamic/search-results.html -rw-r--r-- 525 bytes
cf0a6a03Rohan Kumar Join a11y webring 2 days ago
                                                                                
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
29
30
<p>
{{ .TotalResults }} results
</p>
<ol>
{{- range .Results }}
	<li>
		<h2>
			<a href="{{ .URL }}">
				{{ if .Title -}}
					{{- .Title }}
				{{ else -}}
					{{- .URL }}
				{{- end }}
			</a>
		</h2>
		<p>{{ printf "%.200s" .Desc }}</p>
		<p>
			<q cite="{{ .URL }}">
				{{- $isMatch := false -}}
				{{- range .Frag -}}
				{{- if $isMatch }}<strong>{{ end -}}
				{{- printf . -}}
				{{- if $isMatch }}</strong>{{ end -}}
				{{- $isMatch = (not $isMatch) -}}
				{{- end -}}
			</q>
		</p>
	</li>
{{- end }}
</ol>