Skip to content

Commit 4e8dd65

Browse files
committed
added Html.Tag
1 parent f997975 commit 4e8dd65

1 file changed

Lines changed: 59 additions & 0 deletions

File tree

src/Web/Atomic/Html/Tag.hs

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
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

0 commit comments

Comments
 (0)