Commit 36a472e4 authored by Przemyslaw Kaminski's avatar Przemyslaw Kaminski

[bootstrap v4] ngrams table work

parent 9b3764b0
This diff is collapsed.
...@@ -38,17 +38,21 @@ searchInputCpt :: R.Component SearchInputProps ...@@ -38,17 +38,21 @@ searchInputCpt :: R.Component SearchInputProps
searchInputCpt = R.hooksComponentWithModule thisModule "searchInput" cpt searchInputCpt = R.hooksComponentWithModule thisModule "searchInput" cpt
where where
cpt { onSearch, searchQuery } _ = cpt { onSearch, searchQuery } _ =
pure $ H.div { className: "input-group" } pure $ R2.row [
[ searchButton H.div { className: "col-12" } [
, fieldInput H.div { className: "input-group" } [
] searchButton
, fieldInput
]
]
]
where where
searchButton = searchButton =
H.div { className: "input-group-addon" } H.div { className: "input-group-prepend" }
[ [
if searchQuery /= "" if searchQuery /= ""
then removeButton then removeButton
else H.span { className: "fa fa-search" } [] else H.span { className: "fa fa-search input-group-text" } []
] ]
removeButton = removeButton =
H.button { className: "btn btn-danger" H.button { className: "btn btn-danger"
......
...@@ -155,7 +155,7 @@ ngramsViewCpt = R.hooksComponentWithModule thisModule "ngramsView" cpt ...@@ -155,7 +155,7 @@ ngramsViewCpt = R.hooksComponentWithModule thisModule "ngramsView" cpt
charts params CTabTerms (chartType /\ setChartType) _ = [ charts params CTabTerms (chartType /\ setChartType) _ = [
H.div {className: "row"} H.div {className: "row"}
[ H.div {className: "col-md-offset-5 col-md-6 content"} [ H.div {className: "col-6 ml-auto mr-auto"}
[ H.img { src: "images/Gargantextuel-212x300.jpg" [ H.img { src: "images/Gargantextuel-212x300.jpg"
, id: "funnyimg" , id: "funnyimg"
} }
......
...@@ -168,9 +168,11 @@ defaultContainer {title} props = R.fragment $ props.syncResetButton <> controls ...@@ -168,9 +168,11 @@ defaultContainer {title} props = R.fragment $ props.syncResetButton <> controls
, H.div {className: "col-md-4"} [ props.paginationLinks ] , H.div {className: "col-md-4"} [ props.paginationLinks ]
, H.div {className: "col-md-4"} [ props.pageSizeControl ] , H.div {className: "col-md-4"} [ props.pageSizeControl ]
] ]
, H.table {className: "table"} , R2.row [
[ H.thead {className: "thead-dark"} [ props.tableHead ] H.table {className: "col-md-12 table"}
, H.tbody {} props.tableBody [ H.thead {className: "thead-dark"} [ props.tableHead ]
, H.tbody {} props.tableBody
]
] ]
] ]
......
...@@ -203,7 +203,7 @@ appendChildToParentId ps c = delay unit $ \_ -> do ...@@ -203,7 +203,7 @@ appendChildToParentId ps c = delay unit $ \_ -> do
Just el -> appendChild el c Just el -> appendChild el c
effectLink :: Effect Unit -> String -> R.Element effectLink :: Effect Unit -> String -> R.Element
effectLink eff msg = H.a {on: {click: const eff}} [H.text msg] effectLink eff msg = H.a { on: {click: const eff} } [H.text msg]
useCache :: forall i o. Eq i => i -> (i -> R.Hooks o) -> R.Hooks o useCache :: forall i o. Eq i => i -> (i -> R.Hooks o) -> R.Hooks o
useCache i f = do useCache i f = do
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment