V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
lupino
V2EX  ›  科技

JASONETTE-iOS haskell 渲染库

  •  1
     
  •   lupino · 2016-11-10 15:21:23 +08:00 · 1921 次点击
    这是一个创建于 2716 天前的主题,其中的信息可能已经有所发展或是发生改变。

    造了一个 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

    目前尚无回复
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   5553 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 31ms · UTC 06:30 · PVG 14:30 · LAX 23:30 · JFK 02:30
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.