mirror of
https://github.com/zedeus/nitter
synced 2026-09-05 22:59:31 +00:00
Add location field to search panel
This commit is contained in:
parent
8324508b2c
commit
62df60be78
7 changed files with 73 additions and 22 deletions
|
|
@ -85,6 +85,6 @@ proc genSelect*(pref, label, state: string; options: seq[string]): VNode =
|
|||
option(value=opt): text opt
|
||||
|
||||
proc genDate*(pref, state: string): VNode =
|
||||
buildHtml(span):
|
||||
buildHtml(span(class="date-input")):
|
||||
verbatim &"<input name={pref} type=\"date\" value=\"{state}\"/>"
|
||||
icon "calendar"
|
||||
|
|
|
|||
|
|
@ -76,11 +76,16 @@ proc renderSearchPanel*(query: Query): VNode =
|
|||
else: k in query.excludes
|
||||
genCheckbox(&"{f[0]}-{k}", v, state)
|
||||
|
||||
span(class="search-title"): text "Time range"
|
||||
tdiv(class="date-range"):
|
||||
genDate("since", query.since)
|
||||
span(class="search-title"): text "-"
|
||||
genDate("until", query.until)
|
||||
tdiv(class="search-row"):
|
||||
tdiv:
|
||||
span(class="search-title"): text "Time range"
|
||||
tdiv(class="date-range"):
|
||||
genDate("since", query.since)
|
||||
span(class="search-title"): text "-"
|
||||
genDate("until", query.until)
|
||||
tdiv:
|
||||
span(class="search-title"): text "Near"
|
||||
genInput("near", "", query.near, placeholder="Location...")
|
||||
|
||||
proc renderTweetSearch*(tweets: Result[Tweet]; prefs: Prefs; path: string): VNode =
|
||||
let query = tweets.query
|
||||
|
|
|
|||
Loading…
Reference in a new issue