diff --git a/src/query.nim b/src/query.nim
index 14ad5c9..46be5cf 100644
--- a/src/query.nim
+++ b/src/query.nim
@@ -1,4 +1,4 @@
-import strutils, strformat, sequtils, tables
+import strutils, strformat, sequtils, tables, uri
import types
@@ -97,7 +97,7 @@ proc genQueryUrl*(query: Query): string =
var params = @[&"kind={query.kind}"]
if query.text.len > 0:
- params.add "text=" & query.text
+ params.add "text=" & encodeUrl(query.text)
for f in query.filters:
params.add "f-" & f & "=on"
for e in query.excludes:
diff --git a/src/sass/inputs.scss b/src/sass/inputs.scss
index 2f84b44..0cea64b 100644
--- a/src/sass/inputs.scss
+++ b/src/sass/inputs.scss
@@ -24,9 +24,13 @@ input[type="date"] {
}
input[type="date"]::-webkit-inner-spin-button {
- opacity: 0;
- margin: 0;
- padding: 0;
+ display: none;
+}
+
+input[type="date"]::-webkit-clear-button {
+ margin-left: 17px;
+ filter: grayscale(100%);
+ filter: hue-rotate(120deg);
}
input::-webkit-calendar-picker-indicator {
diff --git a/src/views/renderutils.nim b/src/views/renderutils.nim
index 2951d6d..60445dd 100644
--- a/src/views/renderutils.nim
+++ b/src/views/renderutils.nim
@@ -86,5 +86,8 @@ proc genSelect*(pref, label, state: string; options: seq[string]): VNode =
proc genDate*(pref, state: string): VNode =
buildHtml(span(class="date-input")):
- verbatim &""
+ if state.len > 0:
+ verbatim &""
+ else:
+ verbatim &""
icon "calendar"