elm-beautiful-example
This package makes it easy to create beautiful examples for your Elm projects and packages.
Usage
Start with your not-so-pretty Elm example:
-
Install elm-beautiful-example
elm-package install avh4/elm-beautiful-example
-
Replace
Html.program
orHtml.beginnerProgram
withBeautifulExample.program
orBeautifulExample.beginnerProgram
and add the beautiful example config, filling in the fields as appropriate for your example:+import BeautifulExample main : Program Never Model Msg main = - Html.program + BeautifulExample.program + { title = "Counter" + , details = + Just """This shows how elm-beautiful-example can be used to + wrap the view of any other program (in this case, the Counter example + from the Elm Guide).""" + , color = Just Color.blue + , maxWidth = 400 + , githubUrl = Just "https://github.com/avh4/elm-beautiful-example" + , documentationUrl = Just "http://package.elm-lang.org/packages/avh4/elm-beautiful-example/latest" + } { init = ( model, Cmd.none ) , update = update , subscriptions = \_ -> Sub.none , view = view }
Now your example will look like this: