| Safe Haskell | None |
|---|---|
| Language | GHC2021 |
Web.View.Layout
Synopsis
- layout :: Mod c -> View c () -> View c ()
- root :: Mod c
- col :: Mod c -> View c () -> View c ()
- row :: Mod c -> View c () -> View c ()
- grow :: Mod c
- space :: View c ()
- scroll :: Mod c
- nav :: Mod c -> View c () -> View c ()
- stack :: Mod c -> Layer c () -> View c ()
- newtype Layer c a = Layer (View c a)
- layer :: View c () -> Layer c ()
- popout :: Mod c -> View c () -> Layer c ()
- hide :: Mod c
- flexRow :: Mod c
- flexCol :: Mod c
- truncate :: Mod c
Documentation
layout :: Mod c -> View c () -> View c () Source #
We can intuitively create layouts with combinations of row, col, stack, grow, and space
Wrap main content in layout to allow the view to consume vertical screen space
holygrail ::Viewc () holygrail =layoutid $ dorowsection "Top Bar"rowgrow$ docolsection "Left Sidebar"col(section .grow) "Main Content"colsection "Right Sidebar"rowsection "Bottom Bar" where section =border1
col :: Mod c -> View c () -> View c () Source #
Lay out children in a column.
col grow $ do el_ "Top" space el_ "Bottom"
row :: Mod c -> View c () -> View c () Source #
Lay out children in a row
row id $ do el_ "Left" space el_ "Right"
stack :: Mod c -> Layer c () -> View c () Source #
Stack children on top of each other. Each child has the full width. See popout
stack id $ do row id "Background" row (bg Black . opacity 0.5) "Overlay"
A popout does not