lupino
V2EX  ›  科技

JASONETTE-iOS haskell 渲染库

  •  1
     
  •   lupino · Nov 10, 2016 · 2888 views
    This topic created in 3498 days ago, the information mentioned may be changed or developed.

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

    No Comments Yet
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   5949 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 40ms · UTC 02:47 · PVG 10:47 · LAX 19:47 · JFK 22:47
    ♥ Do have faith in what you're doing.