Add search button and fix unset timeline beginning

This commit is contained in:
Zed
2019-09-19 04:51:17 +02:00
parent 19659de410
commit 70c42dd05a
6 changed files with 11 additions and 7 deletions

View File

@@ -65,13 +65,14 @@ proc genCheckbox*(pref, label: string; state: bool): VNode =
else: input(name=pref, `type`="checkbox")
span(class="checkbox")
proc genInput*(pref, label, state, placeholder: string; class=""): VNode =
proc genInput*(pref, label, state, placeholder: string; class=""; autofocus=false): VNode =
let s = xmltree.escape(state)
let p = xmltree.escape(placeholder)
let a = if autofocus: "autofocus" else: ""
buildHtml(tdiv(class=("pref-group pref-input " & class))):
if label.len > 0:
label(`for`=pref): text label
verbatim &"<input name={pref} type=\"text\" placeholder=\"{p}\" value=\"{s}\"/>"
verbatim &"<input name={pref} type=\"text\" placeholder=\"{p}\" value=\"{s}\" {a}/>"
proc genSelect*(pref, label, state: string; options: seq[string]): VNode =
buildHtml(tdiv(class="pref-group")):