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
142
Issues
142
List
Board
Labels
Milestones
Merge Requests
4
Merge Requests
4
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
gargantext
purescript-gargantext
Commits
a67cfce8
Commit
a67cfce8
authored
Mar 21, 2018
by
Alexandre Delanoë
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[NAVBAR] facto menu title.
parent
6669b263
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
47 additions
and
25 deletions
+47
-25
Navigation.purs
src/Navigation.purs
+47
-25
No files found.
src/Navigation.purs
View file @
a67cfce8
...
...
@@ -237,28 +237,42 @@ divLogo = a [ className "navbar-brand logoSmall"
] []
]
divDropdownLeft :: ReactElement
divDropdownLeft = ul [className "nav navbar-nav"]
[ ul [className "nav navbar-nav pull-left"]
[ li [className "dropdown"]
[ a [ className "dropdown-toggle navbar-text"
, _data {toggle: "dropdown"}
, href "#", role "button"
, title "About Gargantext"
][ span [ aria {hidden : true}
, className "glyphicon glyphicon-info-sign"
] []
, text " Info"
]
, ul [className "dropdown-menu"] divLeftdropdownElements
divDropdownLeft = divDropdownLeft' (LiNav { title : "About Gargantext"
, href : "#"
, icon : "glyphicon glyphicon-info-sign"
, text : "Info"
}
)
divDropdownLeft' :: LiNav -> ReactElement
divDropdownLeft' (LiNav { title: title'
, href : href'
, icon : icon'
, text : text'
}
) = ul [className "nav navbar-nav"]
[ ul [className "nav navbar-nav pull-left"]
[ li [className "dropdown"]
[ a [ className "dropdown-toggle navbar-text"
, _data {toggle: "dropdown"}
, href href', role "button"
, title title'
][ span [ aria {hidden : true}
, className icon'
] []
, text (" " <> text')
]
, ul [className "dropdown-menu"] divLeftdropdownElements
]
]
]
]
]
-- | WYSIWYG example in Pure React ?
divLeftdropdownElements :: Array ReactElement
divLeftdropdownElements = menu
divLeftdropdownElements = menu
-- title, icon, text
[ -- ===========================================================
[ LiNav { title : "Quick start, tutorials and methodology"
, href : "https://iscpif.fr/gargantext/your-first-map/"
...
...
@@ -285,7 +299,7 @@ divLeftdropdownElements = menu
]
,------------------------------------------------------------
[ LiNav { title : "More about us (you)"
, href : "http://iscpif.fr"
, href : "http
s
://iscpif.fr"
, icon : "fas fa-question-circle"
, text : "About"
}
...
...
@@ -299,6 +313,14 @@ menu ns = intercalate divider $ map (map liNav) ns
divider :: Array ReactElement
divider = [li [className "divider"] []]
-- | surgar for target : "blank"
data LiNav_ = LiNav_ { title :: String
, href :: String
, icon :: String
, text :: String
, target :: String
}
data LiNav = LiNav { title :: String
, href :: String
...
...
@@ -307,17 +329,17 @@ data LiNav = LiNav { title :: String
}
liNav :: LiNav -> ReactElement
liNav (LiNav { title
:tit
, href
:h
, icon
:i
, text
: txt
liNav (LiNav { title
: title'
, href
: href'
, icon
: icon'
, text
: text'
}
) = li [] [ a [ tabIndex (-1)
, target "blank"
, title tit
, href h
] [ span [ className i ] []
, text $ " " <> t
xt
, title tit
le'
, href h
ref'
] [ span [ className i
con'
] []
, text $ " " <> t
ext'
]
]
...
...
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