Commit 64de94eb authored by Alexandre Delanoë's avatar Alexandre Delanoë

[CSS] fix side panel (needs more work).

parent a097bd1a
...@@ -53,7 +53,7 @@ instance decodeJsonGraphData :: DecodeJson GraphData where ...@@ -53,7 +53,7 @@ instance decodeJsonGraphData :: DecodeJson GraphData where
-- TODO: sides -- TODO: sides
metadata <- obj .? "metadata" metadata <- obj .? "metadata"
corpusIds <- metadata .? "corpusId" corpusIds <- metadata .? "corpusId"
let side x = GraphSideCorpus { corpusId: x, corpusLabel: "Patents" } let side x = GraphSideCorpus { corpusId: x, corpusLabel: "Pubs / Patents" }
let sides = side <$> corpusIds let sides = side <$> corpusIds
pure $ GraphData { nodes, edges, sides } pure $ GraphData { nodes, edges, sides }
......
...@@ -323,7 +323,7 @@ specOld = fold [treespec treeSpec, graphspec $ simpleSpec performAction render'] ...@@ -323,7 +323,7 @@ specOld = fold [treespec treeSpec, graphspec $ simpleSpec performAction render']
where where
treespec = over _render \frender d p (State s) c -> treespec = over _render \frender d p (State s) c ->
[ div [ className "col-md-2", _id "graph-tree", style {marginTop:"104px"}] $ [ div [ className "col-md-1", _id "graph-tree", style {marginTop:"104px"}] $
[ [
button [className "btn btn-primary" , onClick \_ -> d ToggleTree] button [className "btn btn-primary" , onClick \_ -> d ToggleTree]
[text $ if s.showTree then "Hide Tree" else "Show Tree"] [text $ if s.showTree then "Hide Tree" else "Show Tree"]
...@@ -335,7 +335,7 @@ specOld = fold [treespec treeSpec, graphspec $ simpleSpec performAction render'] ...@@ -335,7 +335,7 @@ specOld = fold [treespec treeSpec, graphspec $ simpleSpec performAction render']
graphspec = over _render \frender d p s c -> [ graphspec = over _render \frender d p s c -> [
div [ className "col-md-10"] (frender d p s c) div [ className "col-md-9"] (frender d p s c)
] ]
treeSpec :: Spec State {} Action treeSpec :: Spec State {} Action
treeSpec = withState \(State st) -> treeSpec = withState \(State st) ->
...@@ -471,16 +471,16 @@ specOld = fold [treespec treeSpec, graphspec $ simpleSpec performAction render'] ...@@ -471,16 +471,16 @@ specOld = fold [treespec treeSpec, graphspec $ simpleSpec performAction render']
] ]
--, button [onClick \_ -> d ShowSidePanel, className "btn btn-primary", style {right:"39px",position : "relative",zIndex:"1000", top: "-59px"}] [text "Show SidePanel"] --, button [onClick \_ -> d ShowSidePanel, className "btn btn-primary", style {right:"39px",position : "relative",zIndex:"1000", top: "-59px"}] [text "Show SidePanel"]
, if (st.showSidePanel) then , if (st.showSidePanel) then
div [_id "sp-container", className "col-md-2", style {border : "1px black solid", backgroundColor : "beige"}] div [_id "sp-container", className "col-md-2", style {border : "1px white solid", backgroundColor : "white"}]
[ div [className "row"] [ div [className "row"]
[ div [_id "sidepanel" , style {borderBottom : "1px solid black"}] [ div [_id "sidepanel" , style {borderBottom : "1px solid white"}]
[ case st.selectedNode of [ case st.selectedNode of
Nothing -> span [] [ text "dummy text"] Nothing -> span [] [ text "Empty text"]
Just selectedNode -> p [] [ text $ "selected Node : " <> getter _.label selectedNode Just selectedNode -> p [] [ text $ "Nodes : " <> getter _.label selectedNode
, text $ (joinWith ", " ( getTitle st.nodeResults)) , text $ (joinWith ", " ( getTitle st.nodeResults))
, text $ (joinWith ", " (getAuthors st.nodeResults)) , text $ (joinWith ", " (getAuthors st.nodeResults))
, br' --, br'
, p [] [button [className "btn btn-primary", style {marginBottom : "18px"}] [text "Remove"]] --, p [] [button [className "btn btn-primary", style {marginBottom : "18px"}] [text "Remove"]]
] ]
] ]
-- , div [className "col-md-12"] -- , div [className "col-md-12"]
...@@ -517,7 +517,7 @@ specOld = fold [treespec treeSpec, graphspec $ simpleSpec performAction render'] ...@@ -517,7 +517,7 @@ specOld = fold [treespec treeSpec, graphspec $ simpleSpec performAction render']
-- ] -- ]
-- ] -- ]
-- ] -- ]
, div [className "col-md-12", _id "horizontal-checkbox"] {-, div [className "col-md-12", _id "horizontal-checkbox"]
[ ul [ style {display: "inline",float : "left" }] [ ul [ style {display: "inline",float : "left" }]
[ li [] [ li []
[ span [] [text "Pubs"] [ span [] [text "Pubs"]
...@@ -558,7 +558,8 @@ specOld = fold [treespec treeSpec, graphspec $ simpleSpec performAction render'] ...@@ -558,7 +558,8 @@ specOld = fold [treespec treeSpec, graphspec $ simpleSpec performAction render']
] ]
] ]
] ] --}
, div [] , div []
[ p [] [] [ p [] []
, div [className "col-md-12"] , div [className "col-md-12"]
...@@ -612,7 +613,6 @@ getUrl = back.baseUrl <> back.prePath ...@@ -612,7 +613,6 @@ getUrl = back.baseUrl <> back.prePath
back = Config.endConfig.back back = Config.endConfig.back
getAuthData :: Effect (Maybe AuthData) getAuthData :: Effect (Maybe AuthData)
getAuthData = do getAuthData = do
w <- window w <- window
......
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