How to use CSS scheme with Yesod?

I want to use Blueprint CSS with Yesod. Are there any better methods?

Since Yesod uses CSS templates, it seems to me that I cannot directly use .css files? Do I need to rename them to .lucius files?

How to add CSS to defaultLayout?

+4
source share
2 answers

One approach is to rename them to .lucius files, which should work fine. (If this is not the case, this is a bug in Lucius, and you should report it.) But you can also save CSS in a static folder and link to it by calling addStylesheet; this is the approach I used with the Yesod Wiki, for example.

+6
source

wiki . , , ( templates/default-layout-wrapper.hamlet, ^{pageHead pc}):

<link rel=stylesheet media=screen href=@{StaticR blueprint_screen_css}>
<link rel=stylesheet media=print href=@{StaticR blueprint_print_css}>
+4

All Articles