A simple, no-frills boilerplate for creating delightful Single Page Applications (SPAs) in Elm. Everything you need to get started with no extra clutter. Just clone, compile, and get right to coding!
Some highlights of this boilerplate:
- Client-side routing that uses pushState navigation and the forward slash `/` as the path separator.
- Search Engine Optimization (SEO) friendly - unique Title for each page.
- Support for localStorage, with the necessary ports and JS handlers already initalized.
- Support for responsive site design by listening for window size changes and always storing window size in the model.
- Built with webpack.
- Well-commented code!
Here's some links to try out the client-side routing. Be sure to try using your browser's Back and Forward buttons, and refresh the page anytime!
You can handle 404 errors however you'd like - for example, rendering a static page, or routing to the home page. I chose to show a static 404 page - Here's a bunch of links that route there:
The required ports, decoder and JS handlers for using localStorage is initalized for you. Check it out:
Current value in localStorage is: Nothing