Book has views.
Use intoBook or bookWithFrontCover.
Entry point of Bibliopola
main : Bibliopola.Program
main =
fromBook bookmain : Bibliopola.Program
main =
fromShelf shelfAdd first view to a book.
book : Book
book =
intoBook "HelloYou" identity view
|> addStory (Story.build "name" identity [ "spam", "egg", "ham" ])
|> buildBook
|> withFrontCover (view "Bibliopola")IntoBook is building Book type.
Use intoBook.
Story is options of view argument.
Story has label, argument name, and options that have value and label.
|> addStory
(Story "msg" [ ( "nothing", Nothing ), ( "click", Just "msg" ) ])To build Story, see Bibliopola.Story.
Build IntoBook
First argument, String, is book title.
Second, msg -> String, is for message logger.
Last, view, is your view function.
book : Book
book =
intoBook "HelloYou" identity view
|> addStory (Story.build "name" identity [ "spam", "egg", "ham" ])
|> buildBookAdd a story to IntoBook.
Turn IntoBook to Book.
To use intoBook and addStory, view function is filled up with arguments.
This is for elm-ui Element.
Turn IntoBook to Book
This is for Html.
Build a book that has a static view.
book : Book
book =
bookWithFrontCover "Hello" viewA Shelf has no books in itself.
shelf : Shelf
shelf =
emptyShelf "Hello"
|> addBook Hello.book
|> addBook HelloYou.bookA Shelf has one book in itself.
shelf : Shelf
shelf =
shelfWith ViewNum.book
|> addBook ViewFloat.book
|> addBook ViewInt.bookAdd a book to shelf.
This book becomes child of shelf.
Add a shelf to shelf.
This shelf becomes child of shelf.
shelf : Shelf
shelf =
emptyShelf "Bibliopola"
|> addShelf Atom.Index.shelf
|> addShelf Molecule.Index.shelf
|> addShelf Organism.Index.shelf
|> addShelf Page.Index.shelf
Type for type annotation.