如何在Yesod中使用CSS框架? [英] How to use a CSS Framework with Yesod?

查看:125
本文介绍了如何在Yesod中使用CSS框架?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在Yesod上使用Blueprint CSS框架。是否有最佳做法?



由于Yesod使用CSS模板,它在我看来我不能直接使用.css文件?我需要将它们重命名为.lucius-files?



如何将CSS添加到defaultLayout?

解决方案一种方法是将它们重命名为.lucius文件,该文件应该完美地工作。 (如果没有,这是Lucius中的一个错误,你应该报告它。)但是,你也可以将CSS存储在静态文件夹中,并用addStylesheet调用引用它;例如,这是我与Yesod Wiki合作的方法。


I want to use the Blueprint CSS Framework with Yesod. Are there any best practices?

Because Yesod uses templates for CSS, it looks to me that I cannot use the .css-files directly? Do I have to rename them to .lucius-files?

How do I add the CSS to the defaultLayout?

解决方案

One approach would be to rename them to .lucius files, which should work perfectly. (If it doesn't, it's a bug in Lucius and you should report it.) But you could also store the CSS in the static folder and reference it with an addStylesheet call; this is the approach I took with the Yesod Wiki, for instance.

这篇关于如何在Yesod中使用CSS框架?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆