【问题标题】:Cassius and Hamlet卡修斯和哈姆雷特
【发布时间】:2012-05-04 10:33:04
【问题描述】:

我习惯于 hamlet 生成如下内部样式表:

style = [hamlet|<style type=text/css> h3 {margin-bottom: 0} |]

如何重写以使用 Cassius/Lucius 而不是纯文本?

【问题讨论】:

    标签: haskell web hamlet


    【解决方案1】:
    toWidget [lucius|
    h3 {
        margin-bottom: 0;
    }
    |]
    

    将生成一个 Yesod 小部件,其中包含您的 CSS。 Yesod 的书 http://www.yesodweb.com/book 有一些非常有启发性的例子。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2019-06-05
      • 1970-01-01
      • 2016-08-02
      • 1970-01-01
      • 1970-01-01
      • 2017-06-27
      • 2016-03-31
      相关资源
      最近更新 更多