Pagination widget: Use just links, no <ul> and <li>

This commit is contained in:
fr33domlover 2016-06-07 13:07:34 +00:00
parent d500b85c57
commit 574b47a72a

View file

@ -79,32 +79,25 @@ pageNavWidget nm nws mklink =
<a href=@{route}#{suffix}>#{label} <a href=@{route}#{suffix}>#{label}
|] |]
in [whamlet| in [whamlet|
<ul> $if nmFirst nm
$if nmFirst nm ^{link 1 $ nwsFirst nws}
<li>
^{link 1 $ nwsFirst nws}
$#--------- TODO prev jumps -------- $#--------- TODO prev jumps --------
$maybe (ps, p) <- nmPrev nm $maybe (ps, p) <- nmPrev nm
$forall m <- ps $forall m <- ps
<li> ^{link m (T.pack $ show m)}
^{link m (T.pack $ show m)} ^{link p (nwsPrev nws p)}
<li>
^{link p (nwsPrev nws p)}
<li>#{nwsCurrent nws (nmCurrent nm) (nmTotal nm)} #{nwsCurrent nws (nmCurrent nm) (nmTotal nm)} #
$maybe (n, ns) <- nmNext nm $maybe (n, ns) <- nmNext nm
<li> ^{link n (nwsNext nws n)}
^{link n (nwsNext nws n)} $forall m <- ns
$forall m <- ns ^{link m (T.pack $ show m)}
<li>
^{link m (T.pack $ show m)}
$#--------- TODO next jumps -------- $#--------- TODO next jumps --------
$if nmLast nm $if nmLast nm
<li> ^{link (nmTotal nm) (nwsLast nws $ nmTotal nm)}
^{link (nmTotal nm) (nwsLast nws $ nmTotal nm)}
|] |]