Files
opds-proxy/html/feed.html
Evan Buss 5b68923ba9 refactor: simplify template by using a view model
Convert the raw OPDS format to a view model that
is easier to work with. Biggest change is that
we construct a single "Link" from an entry with
an array of Links with different "TypeLinks" and "Rel"
attributes.
2024-07-05 00:57:50 -04:00

27 lines
654 B
HTML

{{define "title"}}{{.Title}}{{end}}
{{define "content"}}
<ul>
{{if .Search }}
<li><a href="{{.Search}}">Search</a></li>
{{end}}
{{range .Navigation}}
<li><a href="{{.Href}}">{{.Label}}</a></li>
{{end}}
{{range .Links}}
<li class="link">
{{if .ImageURL}}
<img src="/acquisition{{.ImageURL}}" alt="{{.Title}}" height="40">
{{end}}
{{if .IsDownload}}
<a href="/acquisition{{.Href}}" download>{{.Title}}</a>
{{else}}
<a href="{{.Href}}">{{.Title}}</a>
{{end}}
</li>
{{end}}
</ul>
{{end}}