Commit edb4ff57 authored by Fabien Manière's avatar Fabien Manière

page node corpus: add icon (from type)

parent 4a302ff2
// Main Gargantext scripts
$(function () {
$('[data-toggle="tooltip"]').tooltip()
console.log("Gargantext is ready.");
})
\ No newline at end of file
This diff is collapsed.
...@@ -6696,6 +6696,10 @@ a:hover { ...@@ -6696,6 +6696,10 @@ a:hover {
font-family: ForkAwesome, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; font-family: ForkAwesome, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
} }
.node-layout__title {
font-size: 1.75em;
}
.nav.nav-tabs .nav-link { .nav.nav-tabs .nav-link {
cursor: pointer; cursor: pointer;
} }
......
...@@ -6507,6 +6507,10 @@ a:hover { ...@@ -6507,6 +6507,10 @@ a:hover {
font-family: ForkAwesome, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; font-family: ForkAwesome, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
} }
.node-layout__title {
font-size: 1.75em;
}
.nav.nav-tabs .nav-link { .nav.nav-tabs .nav-link {
cursor: pointer; cursor: pointer;
} }
......
...@@ -6350,6 +6350,10 @@ a:hover { ...@@ -6350,6 +6350,10 @@ a:hover {
font-family: ForkAwesome, "Mulish"; font-family: ForkAwesome, "Mulish";
} }
.node-layout__title {
font-size: 1.75em;
}
.nav.nav-tabs .nav-link { .nav.nav-tabs .nav-link {
cursor: pointer; cursor: pointer;
} }
......
...@@ -6571,6 +6571,10 @@ a:hover { ...@@ -6571,6 +6571,10 @@ a:hover {
font-family: ForkAwesome, "Nunito"; font-family: ForkAwesome, "Nunito";
} }
.node-layout__title {
font-size: 1.75em;
}
.nav.nav-tabs .nav-link { .nav.nav-tabs .nav-link {
cursor: pointer; cursor: pointer;
} }
......
...@@ -6644,6 +6644,10 @@ a:hover { ...@@ -6644,6 +6644,10 @@ a:hover {
font-family: ForkAwesome, "Montserrat"; font-family: ForkAwesome, "Montserrat";
} }
.node-layout__title {
font-size: 1.75em;
}
.nav.nav-tabs .nav-link { .nav.nav-tabs .nav-link {
cursor: pointer; cursor: pointer;
} }
......
...@@ -16,12 +16,14 @@ import Gargantext.Hooks.Session (useSession) ...@@ -16,12 +16,14 @@ import Gargantext.Hooks.Session (useSession)
import Gargantext.Routes as GR import Gargantext.Routes as GR
import Gargantext.Sessions (sessionId) import Gargantext.Sessions (sessionId)
import Gargantext.Types (ID, defaultCacheParams) import Gargantext.Types (ID, defaultCacheParams)
import Gargantext.Types as GT
import Gargantext.Utils (setter, (?)) import Gargantext.Utils (setter, (?))
import Gargantext.Utils.Reactix as R2 import Gargantext.Utils.Reactix as R2
import Reactix as R import Reactix as R
import Reactix.DOM.HTML as H import Reactix.DOM.HTML as H
import Toestand as T import Toestand as T
type Props = type Props =
( nodeId :: ID ( nodeId :: ID
, nodeData :: Node , nodeData :: Node
...@@ -34,7 +36,7 @@ layout :: R2.Leaf Props ...@@ -34,7 +36,7 @@ layout :: R2.Leaf Props
layout = R2.leaf layoutCpt layout = R2.leaf layoutCpt
layoutCpt :: R.Component Props layoutCpt :: R.Component Props
layoutCpt = here.component "layout" cpt where layoutCpt = here.component "layout" cpt where
cpt { nodeId, nodeData: { name } } _ = do cpt { nodeId, nodeData: { name, node_type } } _ = do
-- | Hooks -- | Hooks
-- | -- |
boxes@{ boxes@{
...@@ -69,24 +71,37 @@ layoutCpt = here.component "layout" cpt where ...@@ -69,24 +71,37 @@ layoutCpt = here.component "layout" cpt where
pure $ pure $
H.div H.div
{ className: "corpus-layout" } { className: "node-layout corpus-layout" }
[ [
-- FV.backButtonSmart { nodeId, session } [] -- FV.backButtonSmart { nodeId, session } []
H.div H.div
{ className: "corpus-layout__title" } { className: "node-layout__title corpus-layout__title" }
[ [
B.div' H.div
{ className: "corpus-layout__title__text" } { className: "node-layout__title__content text-primary" }
name [
B.icon
{ className: "node-layout__title__icon"
, name: GT.getIcon node_type true
}
,
H.span
{ className: "node-layout__title__text mx-1" }
[ H.text name ]
]
, ,
-- B.div'
-- { className: "corpus-layout__title__text" }
-- name
-- ,
H.hr H.hr
{ className: "corpus-layout__title__line"} { className: "node-layout__title__line corpus-layout__title__line"}
, ,
B.iconButton B.iconButton
{ name: expandTableEdition' ? { name: expandTableEdition' ?
"caret-up" $ "caret-up" $
"caret-down" "caret-down"
, className: "corpos-layout__title__expand" , className: "node-layout__title__expand corpus-layout__title__expand"
, callback: onExpandClick , callback: onExpandClick
} }
] ]
...@@ -94,14 +109,14 @@ layoutCpt = here.component "layout" cpt where ...@@ -94,14 +109,14 @@ layoutCpt = here.component "layout" cpt where
R2.when expandTableEdition' $ R2.when expandTableEdition' $
H.div H.div
{ className: "corpus-layout__edition-block" } { className: "node-layout__edition-block corpus-layout__edition-block" }
[ [
editionBlock editionBlock
{ nodeId } { nodeId }
] ]
, ,
H.div H.div
{ className: "corpus-layout__code-section" } { className: "node-layout__code-section corpus-layout__code-section" }
[ [
tileMenu tileMenu
{ boxes { boxes
...@@ -129,7 +144,7 @@ layoutCpt = here.component "layout" cpt where ...@@ -129,7 +144,7 @@ layoutCpt = here.component "layout" cpt where
] ]
, ,
H.div H.div
{ className: "corpus-layout__folders" } { className: "node-layout__folders corpus-layout__folders" }
[ [
FV.folderView FV.folderView
{ nodeId { nodeId
......
module Gargantext.Components.GraphQL.Node where module Gargantext.Components.GraphQL.Node where
import Gargantext.Prelude import Gargantext.Prelude
import Gargantext.Types (NodeType)
import Gargantext.Utils.GraphQL as GGQL import Gargantext.Utils.GraphQL as GGQL
import Gargantext.Types (NodeType) import Gargantext.Types (NodeType)
import GraphQL.Client.Args (Args, (=>>)) import GraphQL.Client.Args (Args, (=>>))
...@@ -12,13 +13,15 @@ type Corpus ...@@ -12,13 +13,15 @@ type Corpus
= { id :: Int = { id :: Int
, name :: String , name :: String
, parent_id :: Int , parent_id :: Int
, type_id :: Int } , type_id :: Int
, node_type :: NodeType }
type Node type Node
= { id :: Int = { id :: Int
, name :: String , name :: String
, parent_id :: Int , parent_id :: Int
, type_id :: Int } , type_id :: Int
, node_type :: NodeType }
type NodesCorpusQuery = type NodesCorpusQuery =
{ nodes_corpus :: Args { nodes_corpus :: Args
...@@ -26,7 +29,8 @@ type NodesCorpusQuery = ...@@ -26,7 +29,8 @@ type NodesCorpusQuery =
{ id :: Unit { id :: Unit
, name :: Unit , name :: Unit
, parent_id :: Unit , parent_id :: Unit
, type_id :: Unit } } , type_id :: Unit
, node_type :: Unit } }
type NodesQuery = type NodesQuery =
{ nodes :: Args { nodes :: Args
...@@ -34,7 +38,8 @@ type NodesQuery = ...@@ -34,7 +38,8 @@ type NodesQuery =
{ id :: Unit { id :: Unit
, name :: Unit , name :: Unit
, parent_id :: Unit , parent_id :: Unit
, type_id :: Unit } } , type_id :: Unit
, node_type :: Unit } }
nodesQuery :: NodesQuery nodesQuery :: NodesQuery
nodesQuery = { nodes: { node_id: Var :: _ "id" Int } =>> nodesQuery = { nodes: { node_id: Var :: _ "id" Int } =>>
......
.with-icon-font { .with-icon-font {
font-family: ForkAwesome, $font-family-base; font-family: ForkAwesome, $font-family-base;
} }
.node-layout {
&__title {
font-size: 1.75em;
}
}
\ No newline at end of file
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