elm-mdl/README.md

49 lines
1.7 KiB
Markdown
Raw Normal View History

2016-03-13 22:11:20 +00:00
# Material Design Components in Elm
2016-03-26 11:16:40 +00:00
[![Build Status](https://travis-ci.org/debois/elm-mdl.svg?branch=master)](https://travis-ci.org/debois/elm-mdl)
2016-03-13 22:11:20 +00:00
Port of Google's
[Material Design Lite](https://www.getmdl.io/)
CSS/JS implementation of the
[Material Design Specification](https://www.google.com/design/spec/material-design/introduction.html).
2016-03-15 16:46:04 +00:00
Live demo
[here](https://debois.github.io/elm-mdl/).
2016-03-13 22:11:20 +00:00
MDL is implemented primarily through CSS, with a little bit of Javascript
adding and removing CSS classes in response to DOM events. This port
re-implements the CSS parts in Elm, but relies on the CSS of MDL verbatim.
2016-03-21 22:29:29 +00:00
**CAUTION**! This is an early and incomplete prototype. Use at your own risk.
2016-03-13 22:11:20 +00:00
### Get Started
Build the demo:
2016-03-14 10:00:31 +00:00
> elm-make examples/Demo.elm
2016-03-13 22:11:20 +00:00
This will construct a file `index.html`; open that in your browser.
### Embedding in your own HTML.
Initial page load of the demo will produce a flicker, which can only be
avoided if you set up the MDL css to load before elm does. Use the file
`page.html` as a template. To build the demo in this mode, comment out
2016-03-15 16:53:41 +00:00
[line 154 in `examples/Demo.elm`](https://github.com/debois/elm-mdl/blob/master/examples/Demo.elm#L154)
and build the demo like this:
> elm-make examples/Demo.elm --output elm.js
This will produce a file `elm.js`. Open the file
[`page.html`](https://raw.githubusercontent.com/debois/elm-mdl/master/page.html) in your
browser; this file will set up MDL css and load `elm.js`.
2016-03-13 22:11:20 +00:00
### Contribute
2016-03-21 22:29:29 +00:00
Contributions are warmly encouraged! Whether you are a newcomer to Elm or
an accomplished expert, the MDL port presents interesting challenges. Refer
to [this page](https://github.com/debois/elm-mdl/blob/master/CONTRIBUTING.md)
for a detailed list of possible contributions.
2016-03-13 22:11:20 +00:00