mirror of
https://github.com/zedeus/nitter
synced 2026-09-06 07:09:31 +00:00
Style number input field
This commit is contained in:
parent
12bbddf204
commit
78101df2cc
7 changed files with 44 additions and 13 deletions
|
|
@ -89,6 +89,13 @@ proc genDate*(pref, state: string): VNode =
|
|||
input(name=pref, `type`="date", value=state)
|
||||
icon "calendar"
|
||||
|
||||
proc genNumberInput*(pref, label, state, placeholder: string; class=""; autofocus=true; min="0"): VNode =
|
||||
let p = placeholder
|
||||
buildHtml(tdiv(class=("pref-group pref-input " & class))):
|
||||
if label.len > 0:
|
||||
label(`for`=pref): text label
|
||||
input(name=pref, `type`="number", placeholder=p, value=state, autofocus=(autofocus and state.len == 0), min=min, step="1")
|
||||
|
||||
proc genImg*(url: string; class=""): VNode =
|
||||
buildHtml():
|
||||
img(src=getPicUrl(url), class=class, alt="", loading="lazy")
|
||||
|
|
|
|||
Loading…
Reference in a new issue