surwiki/templates/search.html
Magnus Hoff 1bdc21039b Refactor generation of links from slugs
This fixes a bug where the cancel-link on the front page would be to "" rather than "."
2017-10-30 12:42:53 +01:00

32 lines
757 B
HTML

<div class="container">
<header>
<h1>Search</h1>
</header>
<article>
{{#hits?}}
<p>Search results for the query <b>{{query}}</b>:</p>
{{#prev}}<nav><ul class="dense"
><li><a rel="prev" href="{{.}}">Previous page</a></li
></ul></nav>{{/prev}}
<ul class="search-results default-keyboard-focus-control">
{{#hits}}
<li class="search-result"><a data-focusindex="{{.0}}" class="link" href="{{.1.link()}}"><p class="title">{{.1.title}}</p><p class="snippet">{{.1.snippet}}</p></a></li>
{{/hits}}
</ul>
{{/hits}}
{{#next}}<nav><ul class="dense"
><li><a rel="next" href="{{.}}">Next page</a></li
></ul></nav>{{/next}}
{{^hits?}}
<p>Your search for <b>{{query}}</b> gave no results.</p>
{{/hits}}
</article>
</div>
{{>footer/default.html}}