1
0
Fork 0
mirror of https://git.sr.ht/~seirdy/seirdy.one synced 2024-11-23 21:02:09 +00:00
seirdy.one/dynamic/search-results.html
Rohan Kumar acfffd3754
Fix some markup
- Put headings outside of links in SERP
- fix a <div> wrapping issue in the about page
- Mark up the result excerpts with a <q> element.
2022-06-08 17:14:39 -07:00

28 lines
491 B
HTML

<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>