Safe Haskell | None |
---|---|
Language | GHC2021 |
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 ::View
c () holygrail =layout
id $ dorow
section "Top Bar"row
grow
$ docol
section "Left Sidebar"col
(section .grow
) "Main Content"col
section "Right Sidebar"row
section "Bottom Bar" where section =border
1
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