File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ {- |
2+ Module: Web.Atomic.Html.Tag
3+ Copyright: (c) 2023 Sean Hess
4+ License: BSD3
5+ Maintainer: Sean Hess <seanhess@gmail.com>
6+ Stability: experimental
7+ Portability: portable
8+
9+ We can intuitively create layouts by combining of 'row', 'col', 'space', and 'stack'
10+
11+ @
12+ holygrail = do
13+ col ~ grow $ do
14+ row do
15+ el "Top Bar"
16+ space
17+ el "Login Button"
18+ row ~ grow $ do
19+ col "Left Sidebar"
20+ col ~ grow $ do
21+ el "Main Content"
22+ col "Right Sidebar"
23+ row "Bottom Bar"
24+ @
25+ -}
26+ module Web.Atomic.Html.Tag where
27+
28+ import Web.Atomic.CSS
29+ import Web.Atomic.Html
30+
31+
32+ {- |
33+
34+ @
35+ col = 'el' ~ 'flexCol'
36+ @
37+ -}
38+ col :: Html () -> Html ()
39+ col = el ~ flexCol
40+
41+
42+ {- |
43+
44+ @
45+ col = 'el' ~ 'flexRow'
46+ @
47+ -}
48+ row :: Html () -> Html ()
49+ row = el ~ flexRow
50+
51+
52+ {- |
53+
54+ @
55+ col = 'el' ~ 'grow'
56+ @
57+ -}
58+ space :: Html ()
59+ space = el ~ grow $ none
You can’t perform that action at this time.
0 commit comments