Browse Source

Prefill search input with current query

master
Perception 3 months ago
parent
commit
6158f9b703
1 changed files with 2 additions and 1 deletions
  1. +2
    -1
      templates/_search.ejs

+ 2
- 1
templates/_search.ejs View File

@ -8,7 +8,8 @@
<div class="row" >
<form method="GET" action="/search" >
<div class="eight columns" >
<input type="text" name="q" value="" class="u-full-width" />
<% let search = typeof q == 'undefined' ? '' : q %>
<input type="text" name="q" value="<%= search %>" class="u-full-width" />
</div>
<div class="four columns" >
<input type="submit" class="button-primary" value="Search" />


Loading…
Cancel
Save