aboutsummaryrefslogtreecommitdiff
path: root/src/views/search.pug
diff options
context:
space:
mode:
Diffstat (limited to 'src/views/search.pug')
-rw-r--r--src/views/search.pug54
1 files changed, 54 insertions, 0 deletions
diff --git a/src/views/search.pug b/src/views/search.pug
new file mode 100644
index 0000000..216875f
--- /dev/null
+++ b/src/views/search.pug
@@ -0,0 +1,54 @@
1include ../mixins/header
2include ../mixins/head
3
4doctype html
5html
6 +head("search subreddits")
7 include ../mixins/subUtils
8 body
9 main#content
10 +header(user)
11 div.hero
12 h1 search subreddits
13
14 form(action="/sub-search" method="get").search-bar
15 - var prefill = original_query ?? "";
16 input(type="text" name="q" placeholder="search subreddits" value=prefill required).search-input
17 button(type="submit").search-button go
18
19 h1 search posts
20
21 form(action="/post-search" method="get").search-bar
22 - var prefill = original_query ?? "";
23 input(type="text" name="q" placeholder="search posts" value=prefill required).search-input
24 button(type="submit").search-button go
25
26 hr
27
28 h3 tips
29 p
30 | you can narrow search results using filters:
31 br
32 -
33 var triples = [
34 ["subreddit", "ohio", "find submissions in 'r/ohio'"],
35 ["author", "spez", "find submissions by 'u/spez'"],
36 ["site", "x.com", "find submissions from 'x.com'"],
37 ["url", "text", "search for 'text' in url"],
38 ["selftext", "text", "search for 'text' in post contents"],
39 ["self", "yes/no", "include/exclude selftext posts"],
40 ["nsfw", "yes/no", "include/exclude over-18 posts"],
41 ]
42
43 ul
44 each triple in triples
45 li
46 strong
47 | #{triple[0]}:
48 em #{triple[1]}
49 |     #{triple[2]}
50 | example:
51 br
52 |    
53 code subreddit:iowa site:x.com elections
54