Elegant elm single pages composition. Aims at removing boilerplate code generated as byproduct of pages composition in SPAs.
Update function type
View function type
Simple type used for better readability of tuple
Both a b == ( a, b )Flags type. Should be as much generic as possible so anything can be passed by it and each modules parses the flags alone.
Params is record that router passes to each Page on initialization.
Parses url and returns list of strings. This is again the most generic approach. In every Page, parser can be defined and exposed along with the function to transform list of strings to required data type.
Predefined function that takes one string and returns parser that parses this one path and returns empty list.
Predefined parser that parses "/" path and returns empty list.
Type for widet that represents page. Contains all basic elm architecture functions that need to be implemented in respective page modules.
Page composition in progress. Is created by join function.
Combines first two pages and creates PageWidgetComposition. Is followed by add function.
Adds another PageWidget to PageWidgetComposition.
Header type. Function that returns view of header.
Simplest empty header
State that navbar expects. When implementing custom navbar, this state can be accessed. Contains window to determine the shape of navbar and information whether it is collapsed or not.
This function takes PageWidgetComposition and another information about aplications. It attaches router to composition and creates suitable output for application.
Subscription function type