diff --git a/nitter.nimble b/nitter.nimble index ed1e4a7..6cfb30f 100644 --- a/nitter.nimble +++ b/nitter.nimble @@ -17,7 +17,7 @@ requires "jester >= 0.4.3" requires "regex >= 0.11.2" requires "q >= 0.0.7" requires "nimcrypto >= 0.3.9" -requires "karax#b99a543" +requires "karax#f6bda9a" requires "sass" requires "markdown" diff --git a/src/views/renderutils.nim b/src/views/renderutils.nim index dc2194a..c9070b0 100644 --- a/src/views/renderutils.nim +++ b/src/views/renderutils.nim @@ -1,5 +1,5 @@ -import strutils, strformat, xmltree -import karax/[karaxdsl, vdom] +import strutils, xmltree +import karax/[karaxdsl, vdom, vstyles] import ../types, ../utils @@ -37,7 +37,7 @@ proc linkText*(text: string; class=""): VNode = proc hiddenField*(name, value: string): VNode = buildHtml(): - verbatim "" % [name, value] + input(name=name, style={display: "none"}, value=value) proc refererField*(path: string): VNode = hiddenField("referer", path) @@ -68,7 +68,7 @@ proc genInput*(pref, label, state, placeholder: string; class=""; autofocus=fals 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): text a proc genSelect*(pref, label, state: string; options: seq[string]): VNode = buildHtml(tdiv(class="pref-group pref-input")): @@ -82,10 +82,7 @@ proc genSelect*(pref, label, state: string; options: seq[string]): VNode = proc genDate*(pref, state: string): VNode = buildHtml(span(class="date-input")): - if state.len > 0: - verbatim &"" - else: - verbatim &"" + input(name=pref, `type`="date", value=state) icon "calendar" proc genImg*(url: string; class=""): VNode = diff --git a/src/views/tweet.nim b/src/views/tweet.nim index 124b0c8..8b3daa7 100644 --- a/src/views/tweet.nim +++ b/src/views/tweet.nim @@ -100,8 +100,8 @@ proc renderVideo(video: Video; prefs: Prefs; path: string): VNode = of m3u8, vmap: video(poster=thumb, data-url=source, data-autoload="false") verbatim "
" - verbatim "
" - verbatim "
" + tdiv(class="overlay-circle"): span(class="overlay-triangle") + verbatim "" if container.len > 0: tdiv(class="card-content"): h2(class="card-title"): text video.title