Commit 8ccbd884 authored by Przemyslaw Kaminski's avatar Przemyslaw Kaminski

[bootstrap v4] fix hidden, fix code editor btn group

parent c81645ff
...@@ -147,11 +147,11 @@ codeEditorCpt = R.hooksComponentWithModule thisModule "codeEditor" cpt ...@@ -147,11 +147,11 @@ codeEditorCpt = R.hooksComponentWithModule thisModule "codeEditor" cpt
codeHidden :: ViewType -> String codeHidden :: ViewType -> String
codeHidden Code = "" codeHidden Code = ""
codeHidden Both = "" codeHidden Both = ""
codeHidden _ = " hidden" codeHidden _ = " d-none"
dividerHidden :: ViewType -> String dividerHidden :: ViewType -> String
dividerHidden Both = "" dividerHidden Both = ""
dividerHidden _ = " hidden" dividerHidden _ = " d-none"
langClass :: CodeType -> String langClass :: CodeType -> String
langClass Haskell = " language-haskell" langClass Haskell = " language-haskell"
...@@ -162,7 +162,7 @@ codeEditorCpt = R.hooksComponentWithModule thisModule "codeEditor" cpt ...@@ -162,7 +162,7 @@ codeEditorCpt = R.hooksComponentWithModule thisModule "codeEditor" cpt
previewHidden :: ViewType -> String previewHidden :: ViewType -> String
previewHidden Preview = "" previewHidden Preview = ""
previewHidden Both = "" previewHidden Both = ""
previewHidden _ = " hidden" previewHidden _ = " d-none"
onEditChange :: forall e. Record Controls -> (CodeType -> Code -> Effect Unit) -> e -> Effect Unit onEditChange :: forall e. Record Controls -> (CodeType -> Code -> Effect Unit) -> e -> Effect Unit
onEditChange controls@{codeElRef, codeOverlayElRef, codeType: (codeType /\ _), codeS} onChange e = do onEditChange controls@{codeElRef, codeOverlayElRef, codeType: (codeType /\ _), codeS} onChange e = do
...@@ -289,18 +289,19 @@ viewTypeSelectorCpt :: R.Component ViewTypeSelectorProps ...@@ -289,18 +289,19 @@ viewTypeSelectorCpt :: R.Component ViewTypeSelectorProps
viewTypeSelectorCpt = R.hooksComponentWithModule thisModule "viewTypeSelector" cpt viewTypeSelectorCpt = R.hooksComponentWithModule thisModule "viewTypeSelector" cpt
where where
cpt {state} _ = cpt {state} _ =
pure $ H.div { className: "btn-group" } [ pure $ H.div { className: "btn-group"
, role: "group" } [
viewTypeButton Code state viewTypeButton Code state
, viewTypeButton Both state , viewTypeButton Both state
, viewTypeButton Preview state , viewTypeButton Preview state
] ]
viewTypeButton viewType (state /\ setState) = viewTypeButton viewType (state /\ setState) =
H.label { H.button { className: "btn btn-secondary" <> active
className: "btn btn-default" <> active
, on: { click: onClick } , on: { click: onClick }
, type: "button"
} [ } [
H.i { className: "glyphicon " <> (icon viewType) } [] H.i { className: "fa " <> (icon viewType) } []
] ]
where where
active = if viewType == state then " active" else "" active = if viewType == state then " active" else ""
...@@ -308,9 +309,9 @@ viewTypeSelectorCpt = R.hooksComponentWithModule thisModule "viewTypeSelector" c ...@@ -308,9 +309,9 @@ viewTypeSelectorCpt = R.hooksComponentWithModule thisModule "viewTypeSelector" c
onClick _ = do onClick _ = do
setState $ const viewType setState $ const viewType
icon Preview = "glyphicon-eye-open" icon Preview = "fa-eye"
icon Both = "glyphicon-transfer" icon Both = "fa-columns"
icon Code = "glyphicon-pencil" icon Code = "fa-pencil"
type Controls = type Controls =
( (
......
...@@ -89,7 +89,7 @@ inputWithAutocompleteCpt = R.hooksComponentWithModule thisModule "inputWithAutoc ...@@ -89,7 +89,7 @@ inputWithAutocompleteCpt = R.hooksComponentWithModule thisModule "inputWithAutoc
H.div { className: "list-group" } (cCpt <$> completions) H.div { className: "list-group" } (cCpt <$> completions)
] ]
where where
className = "completions " <> (if completions == [] then "hidden" else "") className = "completions " <> (if completions == [] then "d-none" else "")
cCpt c = cCpt c =
H.button { type: "button" H.button { type: "button"
......
...@@ -6,7 +6,7 @@ import Reactix.DOM.HTML as H ...@@ -6,7 +6,7 @@ import Reactix.DOM.HTML as H
license :: R.Element license :: R.Element
license = H.p {} license = H.p {}
[ H.text "Gargantext " [ H.text "Gargantext "
, H.span { className: "glyphicon glyphicon-registration-mark"} [] , H.span { className: "fa fa-registered"} []
, H.text " is made by " , H.text " is made by "
, H.a { href: "https://iscpif.fr" , H.a { href: "https://iscpif.fr"
, target: "blank" , target: "blank"
...@@ -16,7 +16,7 @@ license = H.p {} ...@@ -16,7 +16,7 @@ license = H.p {}
, title: "Legal instructions of the project." , title: "Legal instructions of the project."
} }
[ H.text ", with licences aGPLV3 and CECILL variant Affero compliant, " ] [ H.text ", with licences aGPLV3 and CECILL variant Affero compliant, " ]
, H.span { className: "glyphicon glyphicon-copyright-mark" } [] , H.span { className: "fa fa-copyright" } []
, H.a { href: "https://cnrs.fr", target:"blank"} [H.text " CNRS 2017-Present "] , H.a { href: "https://cnrs.fr", target:"blank"} [H.text " CNRS 2017-Present "]
, H.text "." , H.text "."
] ]
......
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