Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
purescript-gargantext
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Grégoire Locqueville
purescript-gargantext
Commits
2dd13953
Commit
2dd13953
authored
Mar 12, 2018
by
Alexandre Delanoë
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[TREE] adding realistic example of Tree (structure of the UI).
parent
3db3dd30
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
14 deletions
+23
-14
DocView.purs
src/DocView.purs
+23
-14
No files found.
src/DocView.purs
View file @
2dd13953
...
...
@@ -168,26 +168,35 @@ spec = simpleSpec performAction render
]
------------------------------------------------------------------------
-- Realistic Tree for the UI
urlFacetDoc :: String
urlFacetDoc = "http://localhost:8009/index.html#/docView"
myCorpus :: Int -> String -> NTree (Tuple String String)
myCorpus n name = NNode n false name
[ NLeaf (Tuple "Facets" urlFacetDoc)
, NLeaf (Tuple "Graph" urlFacetDoc)
, NLeaf (Tuple "Dashboard" urlFacetDoc)
]
urlFacetAuth :: String
urlFacetAuth = urlFacetDoc
exampleTree :: NTree (Tuple String String)
exampleTree =
NNode 1 true "Web Sites"
[ NNode 2 true "Google"
[ NLeaf (Tuple "Search" "http://google.com/")
, NLeaf (Tuple "Maps" "http://maps.google.com/")
]
, NNode 3 false "Social Media"
[ NLeaf (Tuple "Google +" "http://plus.google.com/")
, NLeaf (Tuple "Twitter" "http://twitter.com/")
, NLeaf (Tuple "Facebook" "http://facebook.com/")
, NNode 4 true "Others"
[ NLeaf (Tuple "Instagram" "https://www.instagram.com/")
, NLeaf (Tuple "WhatsApp" "https://web.whatsapp.com")
]
]
NNode 1 true "My gargantext"
[ myCorpus 2 "My publications"
, myCorpus 3 "My community"
, NNode 4 false "My researchs" [ myCorpus 5 "Subject A"
, myCorpus 6 "Subject B"
, myCorpus 7 "Subject C"
]
]
------------------------------------------------------------------------
toHtml :: _ -> FTree -> ReactElement
toHtml d (NLeaf (Tuple name link)) =
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment