JASONETTE-iOS haskell 渲染库

2016-11-10 15:21:23 +08:00
 lupino

造了一个 JASONETTE JSON 渲染库,再也不用写蛋疼的 JSON 了

app :: Jason
app = jason $ do
  head $ do
    title "Hello World"
    description "This app displays 'Hello World' on the screen"
    styles $
      styleRow "styled_row" $ do
        font "HelveticaNeue"
        size "20"
        color "#ff0000"
        padding "10"
  body $
    sections $
      items $ do
        vertical $
          components $ do
            label "This is row 1" $ class_ "styled_row"
            label "This is row 2" $ class_ "styled_row"
            label "This is row 3" $ class_ "styled_row"
        horizontal $
          components $ do
            button "Button 1" $ class_ "styled_row"
            button "Button 2" $ class_ "styled_row"
            button "Button 3" $ do
              class_ "styled_row"
              action $ do
                type_ "$util.banner"
                options $ do
                  title "Hello"
                  description "World"
                  

https://github.com/Lupino/jason

2034 次点击
所在节点   科技
0 条回复

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/319566

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX