avh4/elm-beautiful-example/1.0.0

NOTE: this package is not compatible with Elm 0.19.1

BeautifulExample

Create beautiful examples to show off your Elm packages and projects.

type alias Config =
{ title : String
, details : Maybe String
, color : Maybe Color
, maxWidth : Int
, githubUrl : Maybe String
, documentationUrl : Maybe String
}

Configuration for BeautifulExample.view

  • title: The title of the example
  • details: An optional explanatory paragraph about the example
  • color: The the color to use to theme the example (grey will be used if you give Nothing)
  • maxWidth: The maximum width of the container for the example (This allows the example to be nicely centered.)
  • githubUrl: If given, show a github icon with a link to this URL
  • documentationUrl: If given, show an Elm icon with a link to this URL
view : Config -> Html msg -> Html msg

Turn arbitrary Html into a beautiful example