aboutsummaryrefslogtreecommitdiff
path: root/src/views/post-search.pug
diff options
context:
space:
mode:
Diffstat (limited to 'src/views/post-search.pug')
-rw-r--r--src/views/post-search.pug4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/views/post-search.pug b/src/views/post-search.pug
index b80f9f6..8f93798 100644
--- a/src/views/post-search.pug
+++ b/src/views/post-search.pug
@@ -2,6 +2,8 @@ include ../mixins/post
2include ../mixins/header 2include ../mixins/header
3include ../mixins/head 3include ../mixins/head
4 4
5- var viewQuery = query && query.view ? query.view : 'compact'
6- var sortQuery = query && query.sort ? query.sort + (query.t ? '&t=' + query.t : '') : 'hot'
5doctype html 7doctype html
6html 8html
7 +head("search posts") 9 +head("search posts")
@@ -14,6 +16,8 @@ html
14 form(action="/post-search" method="get").search-bar 16 form(action="/post-search" method="get").search-bar
15 - var prefill = original_query ?? ""; 17 - var prefill = original_query ?? "";
16 input(type="text" name="q" placeholder="type in a search term..." value=prefill required).search-input 18 input(type="text" name="q" placeholder="type in a search term..." value=prefill required).search-input
19 input(type="hidden" name="sort" value=sortQuery)
20 input(type="hidden" name="view" value=viewQuery)
17 button(type="submit").search-button go 21 button(type="submit").search-button go
18 if message 22 if message
19 div.search-message 23 div.search-message