Skip to content

Commit 217ad97

Browse files
committed
wip
1 parent f807a7e commit 217ad97

File tree

3 files changed

+22
-97
lines changed

3 files changed

+22
-97
lines changed

ghcjs/miso-capa/miso-capa.cabal

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,6 @@ test-suite miso-capa-test
140140
Functora.Miso.Capa.FieldPairs
141141
Functora.Miso.Capa.Flex
142142
Functora.Miso.Capa.Grid
143-
Functora.Miso.Capa.Header
144143
Functora.Miso.Capa.Money
145144
Functora.Miso.Capa.Qr
146145
Functora.Miso.Capa.Switch

ghcjs/miso-capa/src/Functora/Miso/Capa/Grid.hs

Lines changed: 22 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -8,52 +8,35 @@ module Functora.Miso.Capa.Grid
88
where
99

1010
import Functora.Miso.Prelude
11-
import qualified Material.LayoutGrid as LayoutGrid
1211

1312
grid :: [Attribute action] -> [View action] -> View action
14-
grid attrs cells =
15-
LayoutGrid.layoutGrid
16-
[ LayoutGrid.alignMiddle
17-
]
18-
[ LayoutGrid.inner attrs cells
19-
]
13+
grid attrs =
14+
div_
15+
$ style_
16+
[ ("gap", "1rem"),
17+
("display", "grid"),
18+
("margin", "0 auto"),
19+
("grid-template-columns", "repeat(auto-fit, minmax(300px, 1fr))")
20+
]
21+
: attrs
22+
23+
cell :: [View action] -> View action
24+
cell =
25+
div_
26+
$ [ style_
27+
[ ("height", "4rem"),
28+
("padding", "1rem")
29+
]
30+
]
2031

2132
bigCell :: [View action] -> View action
22-
bigCell =
23-
LayoutGrid.cell
24-
[ LayoutGrid.span12Desktop,
25-
LayoutGrid.span8Tablet,
26-
LayoutGrid.span4Phone,
27-
LayoutGrid.alignMiddle,
28-
style_ [("align-content", "center")]
29-
]
33+
bigCell = cell
3034

3135
mediumCell :: [View action] -> View action
32-
mediumCell =
33-
LayoutGrid.cell
34-
[ LayoutGrid.span6Desktop,
35-
LayoutGrid.span4Tablet,
36-
LayoutGrid.span4Phone,
37-
LayoutGrid.alignMiddle,
38-
style_ [("align-content", "center")]
39-
]
36+
mediumCell = cell
4037

4138
smallCell :: [View action] -> View action
42-
smallCell =
43-
LayoutGrid.cell
44-
[ LayoutGrid.span3Desktop,
45-
LayoutGrid.span2Tablet,
46-
LayoutGrid.span2Phone,
47-
LayoutGrid.alignMiddle,
48-
style_ [("align-content", "center")]
49-
]
39+
smallCell = cell
5040

5141
microCell :: [View action] -> View action
52-
microCell =
53-
LayoutGrid.cell
54-
[ LayoutGrid.span3Desktop,
55-
LayoutGrid.span2Tablet,
56-
LayoutGrid.span1Phone,
57-
LayoutGrid.alignMiddle,
58-
style_ [("align-content", "center")]
59-
]
42+
microCell = cell

ghcjs/miso-capa/src/Functora/Miso/Capa/Header.hs

Lines changed: 0 additions & 57 deletions
This file was deleted.

0 commit comments

Comments
 (0)