diff options
author | Matthias Andreas Benkard <code@mail.matthias.benkard.de> | 2020-09-16 17:57:24 +0200 |
---|---|---|
committer | Matthias Andreas Benkard <code@mail.matthias.benkard.de> | 2020-09-17 11:03:14 +0200 |
commit | 8563a3c03538600ae148b75debd31af16047e2d5 (patch) | |
tree | 7ac292f7213bb6118552b94442533e9e685b11e1 /src/main/resources/templates/benki/posts/postList.html | |
parent | b1192ac9ed515927642215dd3a1717fc13c9679c (diff) |
KB73 Add full text search to post lists.
Change-Id: Ib8333b39cef1d7035ab7fac0ff8a03b400adcb40
Diffstat (limited to 'src/main/resources/templates/benki/posts/postList.html')
-rw-r--r-- | src/main/resources/templates/benki/posts/postList.html | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/src/main/resources/templates/benki/posts/postList.html b/src/main/resources/templates/benki/posts/postList.html index deccfcd..89cea69 100644 --- a/src/main/resources/templates/benki/posts/postList.html +++ b/src/main/resources/templates/benki/posts/postList.html @@ -6,6 +6,7 @@ {@java.lang.Integer previousCursor} {@java.lang.Integer nextCursor} {@java.lang.Integer pageSize} +{@java.lang.String searchQuery} {#include base.html} @@ -43,9 +44,12 @@ {/if} <div class="paging"> - {#if hasPreviousPage}<a href="?i={previousCursor}&n={pageSize}" class="pure-button">⇠ previous page</a>{/if} - <span class="filler"></span> - {#if hasNextPage}<a href="?i={nextCursor}&n={pageSize}" class="pure-button">next page ⇢</a>{/if} + <form id="post-search-bar" method="get" class="pure-form"> + <input placeholder="Search..." value="{searchQuery}" aria-label="Search" id="post-search-query" name="search-query" type="search"/> + <input type="submit" aria-label="Submit search query" class="pure-button pure-button-primary" value="🔎"/> + </form> + {#if hasPreviousPage}<a href="?i={previousCursor}&n={pageSize}&search-query={searchQuery}" class="pure-button">⇠ previous page</a>{/if} + {#if hasNextPage}<a href="?i={nextCursor}&n={pageSize}&search-query={searchQuery}" class="pure-button">next page ⇢</a>{/if} </div> <section id="main-content"> @@ -127,9 +131,9 @@ </section> <div class="paging"> - {#if hasPreviousPage}<a href="?i={previousCursor}&n={pageSize}" class="pure-button">⇠ previous page</a>{/if} + {#if hasPreviousPage}<a href="?i={previousCursor}&n={pageSize}&search-query={searchQuery}" class="pure-button">⇠ previous page</a>{/if} <span class="filler"></span> - {#if hasNextPage}<a href="?i={nextCursor}&n={pageSize}" class="pure-button">next page ⇢</a>{/if} + {#if hasNextPage}<a href="?i={nextCursor}&n={pageSize}&search-query={searchQuery}" class="pure-button">next page ⇢</a>{/if} </div> {/body} |