mirror of
https://github.com/zedeus/nitter.git
synced 2024-12-13 03:26:30 +00:00
Minor search fixes
This commit is contained in:
parent
02e7b1dcab
commit
28a1544cc0
3 changed files with 13 additions and 6 deletions
|
@ -1,4 +1,4 @@
|
||||||
import strutils, strformat, sequtils, tables
|
import strutils, strformat, sequtils, tables, uri
|
||||||
|
|
||||||
import types
|
import types
|
||||||
|
|
||||||
|
@ -97,7 +97,7 @@ proc genQueryUrl*(query: Query): string =
|
||||||
|
|
||||||
var params = @[&"kind={query.kind}"]
|
var params = @[&"kind={query.kind}"]
|
||||||
if query.text.len > 0:
|
if query.text.len > 0:
|
||||||
params.add "text=" & query.text
|
params.add "text=" & encodeUrl(query.text)
|
||||||
for f in query.filters:
|
for f in query.filters:
|
||||||
params.add "f-" & f & "=on"
|
params.add "f-" & f & "=on"
|
||||||
for e in query.excludes:
|
for e in query.excludes:
|
||||||
|
|
|
@ -24,9 +24,13 @@ input[type="date"] {
|
||||||
}
|
}
|
||||||
|
|
||||||
input[type="date"]::-webkit-inner-spin-button {
|
input[type="date"]::-webkit-inner-spin-button {
|
||||||
opacity: 0;
|
display: none;
|
||||||
margin: 0;
|
}
|
||||||
padding: 0;
|
|
||||||
|
input[type="date"]::-webkit-clear-button {
|
||||||
|
margin-left: 17px;
|
||||||
|
filter: grayscale(100%);
|
||||||
|
filter: hue-rotate(120deg);
|
||||||
}
|
}
|
||||||
|
|
||||||
input::-webkit-calendar-picker-indicator {
|
input::-webkit-calendar-picker-indicator {
|
||||||
|
|
|
@ -86,5 +86,8 @@ proc genSelect*(pref, label, state: string; options: seq[string]): VNode =
|
||||||
|
|
||||||
proc genDate*(pref, state: string): VNode =
|
proc genDate*(pref, state: string): VNode =
|
||||||
buildHtml(span(class="date-input")):
|
buildHtml(span(class="date-input")):
|
||||||
verbatim &"<input name={pref} type=\"date\" value=\"{state}\"/>"
|
if state.len > 0:
|
||||||
|
verbatim &"<input name={pref} type=\"date\" value=\"{state}\"/>"
|
||||||
|
else:
|
||||||
|
verbatim &"<input name={pref} type=\"date\"/>"
|
||||||
icon "calendar"
|
icon "calendar"
|
||||||
|
|
Loading…
Reference in a new issue