Commit 65b21810 authored by Ali El Amrani's avatar Ali El Amrani

React-layout + some changes to phylo sass

parent 6218dcae
This diff is collapsed.
This diff is collapsed.
@charset "UTF-8";
/* color:#ffff00 */
/* variable pile */
.mèmiscape {
display: grid;
grid-template-columns: repeat(15, 1fr);
grid-template-rows: 2% 7% 7% auto 1%;
grid-gap: 10px;
height: calc(100vh - 20px);
background-color: #f800ec;
color: #000000;
}
.phyloCorpus {
grid-row: 1;
grid-column: 1/2;
font-size: 14px;
display: flex;
align-items: center;
justify-content: right;
background-color: #14e601;
}
.phyloInfos {
grid-row: 1;
grid-column: 3/4;
font-size: 14px;
display: flex;
align-items: center;
justify-content: right;
background-color: #db7602;
}
.phyloCorpus-info {
grid-row: 2;
grid-column: 2/4;
font-size: 14px;
display: flex;
flex-direction: column;
justify-content: center;
background-color: #00fae5;
}
.phyloInfos-info {
grid-row: 2;
grid-column: 2/4;
font-size: 14px;
display: flex;
flex-direction: column;
justify-content: center;
background-color: #14e601;
}
.phyloIsoline {
grid-row: 2/4;
grid-column: 1/15;
background-color: #fdf90b;
color: #000000;
}
.phyloGraph {
grid-row: 4;
grid-column: 1/15;
background-color: #14e601;
}
.phyloTimeline {
grid-row: 4;
grid-column: 1/2;
background-color: #e60101;
}
.phyloWordcloud {
grid-row: 4;
grid-column: 15/16;
background-color: #db7602;
}
/*# sourceMappingURL=index.de4e3291.css.map */
{"mappings":";AAAA;AAGA;AAWA;EACE;EACA;EACA;EACA;EACA;EACA,kBAfW;EAgBX,OAVM;;;AAYR;EACE;EACA;EACA;EACA;EACA;EACA;EACA,kBAvBW;;;AAyBb;EACE;EACA;EACA;EACA;EACA;EACA;EACA,kBA9BW;;;AAgCb;EACE;EACA;EACA;EACA;EACA;EACA;EACA,kBAxCW;;;AA0Cb;EACE;EACA;EACA;EACA;EACA;EACA;EACA,kBAlDW;;;AAoDb;EACE;EACA;EACA,kBAxDW;EAyDX,OApDM;;;AAsDR;EACE;EACA;EACA,kBA7DW;;;AA+Db;EACE;EACA;EACA,kBA/DW;;;AAiEb;EACE;EACA;EACA,kBArEW","sources":["src/sass/_phylo.sass"],"sourcesContent":[null],"names":[],"version":3,"file":"index.de4e3291.css.map","sourceRoot":"/__parcel_source_root/"}
\ No newline at end of file
...@@ -5,10 +5,10 @@ ...@@ -5,10 +5,10 @@
<meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Mémiscape Purescript</title> <title>Mémiscape Purescript</title>
<link href="/sass.e61a04af.css" rel="stylesheet" type="text/css"> <link href="/index.de4e3291.css" rel="stylesheet" type="text/css">
<script src="/sass.e61a04af.js"></script></head> </head>
<body> <body>
<div id="app"></div> <div id="app"></div>
<script type="module" src="/phylo-test.e31bb0bc.js"></script> <script src="/index.36efa996.js" defer=""></script>
</body> </body>
</html> </html>
...@@ -7,12 +7,12 @@ ...@@ -7,12 +7,12 @@
grid-template-rows: 2% 7% 7% auto 1%; grid-template-rows: 2% 7% 7% auto 1%;
grid-gap: 10px; grid-gap: 10px;
height: calc(100vh - 20px); height: calc(100vh - 20px);
background-color: #e601da; background-color: #f800ec;
color: #000000; color: #000000;
} }
.phyloCorpus { .phyloCorpus {
grid-row: 2/3; grid-row: 1;
grid-column: 1/2; grid-column: 1/2;
font-size: 14px; font-size: 14px;
display: flex; display: flex;
...@@ -22,8 +22,8 @@ ...@@ -22,8 +22,8 @@
} }
.phyloInfos { .phyloInfos {
grid-row: 3/4; grid-row: 1;
grid-column: 1/2; grid-column: 3/4;
font-size: 14px; font-size: 14px;
display: flex; display: flex;
align-items: center; align-items: center;
...@@ -32,7 +32,7 @@ ...@@ -32,7 +32,7 @@
} }
.phyloCorpus-info { .phyloCorpus-info {
grid-row: 2/3; grid-row: 2;
grid-column: 2/4; grid-column: 2/4;
font-size: 14px; font-size: 14px;
display: flex; display: flex;
...@@ -42,7 +42,7 @@ ...@@ -42,7 +42,7 @@
} }
.phyloInfos-info { .phyloInfos-info {
grid-row: 3/4; grid-row: 2;
grid-column: 2/4; grid-column: 2/4;
font-size: 14px; font-size: 14px;
display: flex; display: flex;
...@@ -53,7 +53,7 @@ ...@@ -53,7 +53,7 @@
.phyloIsoline { .phyloIsoline {
grid-row: 2/4; grid-row: 2/4;
grid-column: 3/15; grid-column: 1/15;
background-color: #fdf90b; background-color: #fdf90b;
color: #000000; color: #000000;
} }
......
{"version":3,"sources":["src/sass/_phylo.sass"],"names":[],"mappings":";AAAA;AAGA;AAWA;EACE;EACA;EACA;EACA;EACA;EACA,kBAfW;EAgBX,OAVM;;;AAYR;EACE;EACA;EACA;EACA;EACA;EACA;EACA,kBAvBW;;;AAyBb;EACE;EACA;EACA;EACA;EACA;EACA;EACA,kBA9BW;;;AAgCb;EACE;EACA;EACA;EACA;EACA;EACA;EACA,kBAxCW;;;AA0Cb;EACE;EACA;EACA;EACA;EACA;EACA;EACA,kBAlDW;;;AAoDb;EACE;EACA;EACA,kBAxDW;EAyDX,OApDM;;;AAsDR;EACE;EACA;EACA,kBA7DW;;;AA+Db;EACE;EACA;EACA,kBA/DW;;;AAiEb;EACE;EACA;EACA,kBArEW","file":"sass.e61a04af.css","sourceRoot":"..","sourcesContent":["/* color:#ffff00\n\n\n/* variable pile\n\n$testcolor1: #e601da\n$testcolor2: #fdf90b \n$testcolor3: #14e601\n$testcolor4: #00fae5 \n$testcolor5: #db7602\n$testcolor6: #e60101 \n$black: #000000\n$white: #ffffff \n\n.mèmiscape\n display: grid\n grid-template-columns: repeat(15, 1fr)\n grid-template-rows: 2% 7% 7% auto 1%\n grid-gap: 10px\n height: calc(100vh - 20px)\n background-color: $testcolor1\n color: $black\n\n.phyloCorpus\n grid-row: 2 / 3\n grid-column: 1 / 2\n font-size: 14px\n display: flex\n align-items: center\n justify-content: right\n background-color: $testcolor3\n\n.phyloInfos\n grid-row: 3 / 4\n grid-column: 1 / 2\n font-size: 14px\n display: flex\n align-items: center\n justify-content: right\n background-color: $testcolor5\n\n.phyloCorpus-info\n grid-row: 2 / 3\n grid-column: 2 / 4\n font-size: 14px\n display: flex\n flex-direction: column\n justify-content: center\n background-color: $testcolor4\n\n.phyloInfos-info\n grid-row: 3 / 4\n grid-column: 2 / 4\n font-size: 14px\n display: flex\n flex-direction: column\n justify-content: center\n background-color: $testcolor3 \n\n.phyloIsoline\n grid-row: 2 / 4\n grid-column: 3 / 15\n background-color: $testcolor2\n color: $black\n\n.phyloGraph\n grid-row: 4\n grid-column: 1 / 15\n background-color: $testcolor3 \n\n.phyloTimeline\n grid-row: 4\n grid-column: 1 / 2\n background-color: $testcolor6\n\n.phyloWordcloud\n grid-row: 4\n grid-column: 15 / 16 \n background-color: $testcolor5"]} {"version":3,"sources":["src/sass/_phylo.sass"],"names":[],"mappings":";AAAA;AAGA;AAWA;EACE;EACA;EACA;EACA;EACA;EACA,kBAfW;EAgBX,OAVM;;;AAYR;EACE;EACA;EACA;EACA;EACA;EACA;EACA,kBAvBW;;;AAyBb;EACE;EACA;EACA;EACA;EACA;EACA;EACA,kBA9BW;;;AAgCb;EACE;EACA;EACA;EACA;EACA;EACA;EACA,kBAxCW;;;AA0Cb;EACE;EACA;EACA;EACA;EACA;EACA;EACA,kBAlDW;;;AAoDb;EACE;EACA;EACA,kBAxDW;EAyDX,OApDM;;;AAsDR;EACE;EACA;EACA,kBA7DW;;;AA+Db;EACE;EACA;EACA,kBA/DW;;;AAiEb;EACE;EACA;EACA,kBArEW","file":"sass.e61a04af.css","sourceRoot":"..","sourcesContent":["/* color:#ffff00\n\n\n/* variable pile\n\n$testcolor1: #f800ec\n$testcolor2: #fdf90b \n$testcolor3: #14e601\n$testcolor4: #00fae5 \n$testcolor5: #db7602\n$testcolor6: #e60101 \n$black: #000000\n$white: #ffffff \n\n.mèmiscape\n display: grid\n grid-template-columns: repeat(15, 1fr)\n grid-template-rows: 2% 7% 7% auto 1%\n grid-gap: 10px\n height: calc(100vh - 20px)\n background-color: $testcolor1\n color: $black\n\n.phyloCorpus\n grid-row: 1\n grid-column: 1 / 2\n font-size: 14px\n display: flex\n align-items: center\n justify-content: right\n background-color: $testcolor3\n\n.phyloInfos\n grid-row: 1\n grid-column: 3 / 4\n font-size: 14px\n display: flex\n align-items: center\n justify-content: right\n background-color: $testcolor5\n\n.phyloCorpus-info\n grid-row: 2\n grid-column: 2 / 4\n font-size: 14px\n display: flex\n flex-direction: column\n justify-content: center\n background-color: $testcolor4\n\n.phyloInfos-info\n grid-row: 2\n grid-column: 2 / 4\n font-size: 14px\n display: flex\n flex-direction: column\n justify-content: center\n background-color: $testcolor3 \n\n.phyloIsoline\n grid-row: 2 / 4\n grid-column: 1 / 15\n background-color: $testcolor2\n color: $black\n\n.phyloGraph\n grid-row: 4\n grid-column: 1 / 15\n background-color: $testcolor3 \n\n.phyloTimeline\n grid-row: 4\n grid-column: 1 / 2\n background-color: $testcolor6\n\n.phyloWordcloud\n grid-row: 4\n grid-column: 15 / 16 \n background-color: $testcolor5"]}
\ No newline at end of file \ No newline at end of file
...@@ -7,12 +7,12 @@ ...@@ -7,12 +7,12 @@
grid-template-rows: 2% 7% 7% auto 1%; grid-template-rows: 2% 7% 7% auto 1%;
grid-gap: 10px; grid-gap: 10px;
height: calc(100vh - 20px); height: calc(100vh - 20px);
background-color: #e601da; background-color: #f800ec;
color: #000000; color: #000000;
} }
.phyloCorpus { .phyloCorpus {
grid-row: 2/3; grid-row: 1;
grid-column: 1/2; grid-column: 1/2;
font-size: 14px; font-size: 14px;
display: flex; display: flex;
...@@ -22,8 +22,8 @@ ...@@ -22,8 +22,8 @@
} }
.phyloInfos { .phyloInfos {
grid-row: 3/4; grid-row: 1;
grid-column: 1/2; grid-column: 3/4;
font-size: 14px; font-size: 14px;
display: flex; display: flex;
align-items: center; align-items: center;
...@@ -32,7 +32,7 @@ ...@@ -32,7 +32,7 @@
} }
.phyloCorpus-info { .phyloCorpus-info {
grid-row: 2/3; grid-row: 2;
grid-column: 2/4; grid-column: 2/4;
font-size: 14px; font-size: 14px;
display: flex; display: flex;
...@@ -42,7 +42,7 @@ ...@@ -42,7 +42,7 @@
} }
.phyloInfos-info { .phyloInfos-info {
grid-row: 3/4; grid-row: 2;
grid-column: 2/4; grid-column: 2/4;
font-size: 14px; font-size: 14px;
display: flex; display: flex;
...@@ -53,7 +53,7 @@ ...@@ -53,7 +53,7 @@
.phyloIsoline { .phyloIsoline {
grid-row: 2/4; grid-row: 2/4;
grid-column: 3/15; grid-column: 1/15;
background-color: #fdf90b; background-color: #fdf90b;
color: #000000; color: #000000;
} }
......
...@@ -1443,6 +1443,7 @@ var PS = {}; ...@@ -1443,6 +1443,7 @@ var PS = {};
exports["div"] = div; exports["div"] = div;
})(PS); })(PS);
(function($PS) { (function($PS) {
// Generated by purs version 0.14.3
"use strict"; "use strict";
$PS["Phylo.Graph"] = $PS["Phylo.Graph"] || {}; $PS["Phylo.Graph"] = $PS["Phylo.Graph"] || {};
var exports = $PS["Phylo.Graph"]; var exports = $PS["Phylo.Graph"];
...@@ -1536,7 +1537,7 @@ var PS = {}; ...@@ -1536,7 +1537,7 @@ var PS = {};
className: "phyloCorpus" className: "phyloCorpus"
})([ Reactix_DOM_HTML.text("Here lies Corpus-info"), Reactix_DOM_HTML.div({ })([ Reactix_DOM_HTML.text("Here lies Corpus-info"), Reactix_DOM_HTML.div({
className: "phyloCorpus-info" className: "phyloCorpus-info"
})([ Reactix_DOM_HTML.text("0") ]) ])); })([ Reactix_DOM_HTML.text("Infos") ]) ]));
}; };
}; };
return Reactix_React.hooksComponent("infoCorpus")(cpt); return Reactix_React.hooksComponent("infoCorpus")(cpt);
...@@ -1582,6 +1583,7 @@ var PS = {}; ...@@ -1582,6 +1583,7 @@ var PS = {};
exports["isolineR"] = isolineR; exports["isolineR"] = isolineR;
})(PS); })(PS);
(function($PS) { (function($PS) {
// Generated by purs version 0.14.3
"use strict"; "use strict";
$PS["App"] = $PS["App"] || {}; $PS["App"] = $PS["App"] || {};
var exports = $PS["App"]; var exports = $PS["App"];
......
...@@ -2,12 +2,13 @@ module Phylo.Infos where ...@@ -2,12 +2,13 @@ module Phylo.Infos where
import Prelude import Prelude
import DOM.Simple.Console (log) import DOM.Simple.Console (log, log2)
import Data.Array (length) import Data.Array (length)
import Data.Int (toNumber, round) import Data.Int (toNumber, round)
import Data.Maybe (Maybe(..), fromMaybe, maybe) import Data.Maybe (Maybe(..), fromMaybe, maybe)
import Data.Nullable (null, toMaybe) import Data.Nullable (null, toMaybe)
import Effect.Aff (Aff, launchAff_) import Effect.Aff (Aff, launchAff_)
import Effect.Class (liftEffect)
import FFI.Simple (delay) import FFI.Simple (delay)
import Graphics.D3.Base (D3Eff) import Graphics.D3.Base (D3Eff)
import Graphics.D3.Contour as Contour import Graphics.D3.Contour as Contour
...@@ -22,6 +23,17 @@ type InfoCorpus = ...@@ -22,6 +23,17 @@ type InfoCorpus =
, nbFondations :: Int , nbFondations :: Int
, nbPeriods :: Int , nbPeriods :: Int
) )
--getPhyloName =
-- launchAff_ $ do
-- mr <- PTE.fetchPhyloJSON
-- liftEffect $ do
-- case mr of
-- Nothing -> log "Nothing"
-- Just r -> log2 "r" r.name
-- pure $ maybe mr.name
intToString :: Int -> String
intToString x = show x
infoCorpusR :: R.Element infoCorpusR :: R.Element
infoCorpusR = infoCorpus {nbDocs : 0 infoCorpusR = infoCorpus {nbDocs : 0
...@@ -34,9 +46,13 @@ infoCorpus props = R.createElement infoCorpusCpt props [] ...@@ -34,9 +46,13 @@ infoCorpus props = R.createElement infoCorpusCpt props []
infoCorpusCpt :: R.Component InfoCorpus infoCorpusCpt :: R.Component InfoCorpus
infoCorpusCpt = R.hooksComponent "infoCorpus" cpt where infoCorpusCpt = R.hooksComponent "infoCorpus" cpt where
cpt { } _children = do cpt { } _children = do
-- R.useEffect'
-- launchAff_ $ do
-- mr <- PTE.fetchPhyloJSON
-- liftEffect $ do
pure $ H.div {className:"phyloCorpus"} [H.text "Here lies Corpus-info", pure $ H.div {className:"phyloCorpus"} [H.text "Here lies Corpus-info",
H.div {className:"phyloCorpus-info"}[H.text "0"]] -- H.div {className:"phyloCorpus-info"}[H.text "0"]]
H.div {className:"phyloCorpus-info"}[H.text "Infos"]]
type InfoPhylo = type InfoPhylo =
( nbTerms :: Int ( nbTerms :: Int
, nbGroups :: Int , nbGroups :: Int
......
...@@ -32,15 +32,18 @@ isoline props = R.createElement isolineCpt props [] ...@@ -32,15 +32,18 @@ isoline props = R.createElement isolineCpt props []
isolineCpt :: R.Component Isoline isolineCpt :: R.Component Isoline
isolineCpt = R.hooksComponent "isoline" cpt where isolineCpt = R.hooksComponent "isoline" cpt where
cpt {} _ = do cpt {} _ = do
-- containerRef <- R.useRef null
--
-- R.useEffect' $ do
-- delay unit $ \_ -> do -- delay unit $ \_ -> do
-- let mContainer = toMaybe $ R.readRef containerRef -- let mContainer = toMaybe $ R.readRef containerRef
-- case mContainer of -- case mContainer of
-- Nothing -> pure unit -- Nothing -> pure unit
-- Just cr -> do -- Just cr -> do
-- _ <- Selection.rootSelectEl cr -- _ <- Selection.rootSelectEl cr
-- >>= Selection.style "background-color" -- "#c96704" --
-- pure unit -- pure unit
-- pure $ H.div {id:"phyloIsoline", ref: containerRef}[H.text "I am iso"] -- pure $ H.div {id:"phyloIsoline", ref: containerRef}[]
pure $ H.div {className:"phyloIsoline"}[H.text "Here lies the isoline"] pure $ H.div {className:"phyloIsoline"}[H.text "Here lies the isoline"]
-- drawIsoline :: Array PhyloObject -> Effect Unit -- drawIsoline :: Array PhyloObject -> Effect Unit
......
...@@ -80,8 +80,6 @@ newtype DBranch = DBranch ...@@ -80,8 +80,6 @@ newtype DBranch = DBranch
--getBranches :: Array PhyloObject -> Array DBranch --getBranches :: Array PhyloObject -> Array DBranch
--getBranches objects = filter (objects.nodeType == "branch") objects --getBranches objects = filter (objects.nodeType == "branch") objects
instance JSON.ReadForeign PhyloObject where instance JSON.ReadForeign PhyloObject where
readImpl f = do readImpl f = do
{ _gvid, nodeType: mNodeType } :: { _gvid :: Int, nodeType :: Maybe String } <- JSON.readImpl f { _gvid, nodeType: mNodeType } :: { _gvid :: Int, nodeType :: Maybe String } <- JSON.readImpl f
...@@ -98,9 +96,6 @@ instance JSON.ReadForeign PhyloObject where ...@@ -98,9 +96,6 @@ instance JSON.ReadForeign PhyloObject where
"period" -> pure $ Period { _gvid, nodeType } "period" -> pure $ Period { _gvid, nodeType }
_ -> pure $ Default { _gvid } _ -> pure $ Default { _gvid }
data PhyloEdge = Link data PhyloEdge = Link
{ _gvid :: Int { _gvid :: Int
, bId :: String , bId :: String
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
/* variable pile /* variable pile
$testcolor1: #e601da $testcolor1: #f800ec
$testcolor2: #fdf90b $testcolor2: #fdf90b
$testcolor3: #14e601 $testcolor3: #14e601
$testcolor4: #00fae5 $testcolor4: #00fae5
...@@ -22,7 +22,7 @@ $white: #ffffff ...@@ -22,7 +22,7 @@ $white: #ffffff
color: $black color: $black
.phyloCorpus .phyloCorpus
grid-row: 2 / 3 grid-row: 1
grid-column: 1 / 2 grid-column: 1 / 2
font-size: 14px font-size: 14px
display: flex display: flex
...@@ -31,8 +31,8 @@ $white: #ffffff ...@@ -31,8 +31,8 @@ $white: #ffffff
background-color: $testcolor3 background-color: $testcolor3
.phyloInfos .phyloInfos
grid-row: 3 / 4 grid-row: 1
grid-column: 1 / 2 grid-column: 3 / 4
font-size: 14px font-size: 14px
display: flex display: flex
align-items: center align-items: center
...@@ -40,7 +40,7 @@ $white: #ffffff ...@@ -40,7 +40,7 @@ $white: #ffffff
background-color: $testcolor5 background-color: $testcolor5
.phyloCorpus-info .phyloCorpus-info
grid-row: 2 / 3 grid-row: 2
grid-column: 2 / 4 grid-column: 2 / 4
font-size: 14px font-size: 14px
display: flex display: flex
...@@ -49,7 +49,7 @@ $white: #ffffff ...@@ -49,7 +49,7 @@ $white: #ffffff
background-color: $testcolor4 background-color: $testcolor4
.phyloInfos-info .phyloInfos-info
grid-row: 3 / 4 grid-row: 2
grid-column: 2 / 4 grid-column: 2 / 4
font-size: 14px font-size: 14px
display: flex display: flex
...@@ -59,7 +59,7 @@ $white: #ffffff ...@@ -59,7 +59,7 @@ $white: #ffffff
.phyloIsoline .phyloIsoline
grid-row: 2 / 4 grid-row: 2 / 4
grid-column: 3 / 15 grid-column: 1 / 15
background-color: $testcolor2 background-color: $testcolor2
color: $black color: $black
......
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