Add current search query to form and render search on index if q= is non-nil

This commit is contained in:
James Mills
2021-02-02 15:32:23 +10:00
parent 93cab4c1bc
commit 383e6837ac
4 changed files with 11 additions and 3 deletions

View File

@@ -1,7 +1,7 @@
{{define "content"}}
<div class="container">
<form action="/search" method="GET">
<input type="text" id="search" name="q" placeholder="{{ $.SearchPrompt }}">
<input type="text" id="search" name="q" placeholder="{{ $.SearchPrompt }}" value="{{ $.SearchQuery }}">
<button id="go" type="submit">
<i class="icss-search"></i>
Go!