You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Current lucid-xstatic depends on lucid. It would be nice to have a lucid2-xstatic package depending on lucid2 (or maybe a cabal flag). The only difference with respect using lucid or lucid2 is that lucid2 doesn't have with function, but it can be solved easily.
--| Adds 'script_' and 'link_' for javascript and css files.xstaticScripts:: [XStaticFile] ->Html()
xstaticScripts = traverse_ xrender
wherexrender::XStaticFile->Html()
xrender xf =let src ="/xstatic"<> decodeUtf8 (xfPath xf)
incase xfType xf of-- "application/javascript" -> with (script_ mempty) [src_ src] -- implementation with lucid"application/javascript"->Lucid.script_ [Lucid.src_ src] (""::Html()) -- implementation with lucid2"text/css"->Lucid.link_ [Lucid.href_ src, Lucid.rel_ "stylesheet"]
_ ->pure()
The text was updated successfully, but these errors were encountered:
@lsmor thank you for the suggestion, I agree it would be nice, a new lucid2-xstatic package sounds good to me. Though I'm still blocked by haskell-servant/servant-lucid#26
Current
lucid-xstatic
depends onlucid
. It would be nice to have alucid2-xstatic
package depending onlucid2
(or maybe acabal
flag). The only difference with respect usinglucid
orlucid2
is thatlucid2
doesn't havewith
function, but it can be solved easily.The text was updated successfully, but these errors were encountered: