Commit 30c444cd authored by Abinaya Sudhir's avatar Abinaya Sudhir

Navbar added in both landing and corpus view page

parent 0399e1e4
...@@ -74,8 +74,6 @@ addcorpusviewSpec = simpleSpec performAction render ...@@ -74,8 +74,6 @@ addcorpusviewSpec = simpleSpec performAction render
] ]
, div [className "col align-self-center"] , div [className "col align-self-center"]
[ [
] ]
] ]
......
...@@ -52,87 +52,87 @@ loginSpec = simpleSpec performAction render ...@@ -52,87 +52,87 @@ loginSpec = simpleSpec performAction render
render :: Render State props Action render :: Render State props Action
render dispatch _ state _ = render dispatch _ state _ =
[ [
div [ _id "dafixedtop", className "navbar navbar-inverse navbar-fixed-top", role "navigation"] -- div [ _id "dafixedtop", className "navbar navbar-inverse navbar-fixed-top", role "navigation"]
[ div [className "container"] -- [ div [className "container"]
[ -- [
div [ className "navbar-inner" ] -- div [ className "navbar-inner" ]
[ a [ className "navbar-brand logoSmall", href "/" ] -- [ a [ className "navbar-brand logoSmall", href "/" ]
[ img [ src "images/logoSmall.png", title "Back to home." ] -- [ img [ src "images/logoSmall.png", title "Back to home." ]
[] -- []
] -- ]
] -- ]
, div [className "navbar-collapse collapse"] -- , div [className "navbar-collapse collapse"]
[ -- [
ul [className "nav navbar-nav"] -- ul [className "nav navbar-nav"]
[ -- [
ul [className "nav navbar-nav pull-left"] [ -- ul [className "nav navbar-nav pull-left"] [
li [className "dropdown"] -- li [className "dropdown"]
[ -- [
a [ -- a [
className "dropdown-toggle navbar-text", _data {toggle: "dropdown"}, href "#", role "button", title "Informations about Gargantext" ] -- className "dropdown-toggle navbar-text", _data {toggle: "dropdown"}, href "#", role "button", title "Informations about Gargantext" ]
[ span [ aria {hidden : true}, className "glyphicon glyphicon-info-sign" ] -- [ span [ aria {hidden : true}, className "glyphicon glyphicon-info-sign" ]
[] -- []
, text "Info" -- , text "Info"
, i [ className "caret" ] -- , i [ className "caret" ]
[] -- []
] -- ]
, ul [className "dropdown-menu"] -- , ul [className "dropdown-menu"]
[ li [] -- [ li []
[ a [tabIndex (-1), target "blank", title "Documentation and tutorials", href "https://iscpif.fr/gargantext/your-first-map/"] -- [ a [tabIndex (-1), target "blank", title "Documentation and tutorials", href "https://iscpif.fr/gargantext/your-first-map/"]
[text "Documentation"] -- [text "Documentation"]
] -- ]
, li [className "divider"] [] -- , li [className "divider"] []
, li [] -- , li []
[ -- [
a [ tabIndex (-1), target "blank", title "About", href "/about/", title "More informations about the project, its sponsors and its authors"] -- a [ tabIndex (-1), target "blank", title "About", href "/about/", title "More informations about the project, its sponsors and its authors"]
[ text "About"] -- [ text "About"]
] -- ]
] -- ]
] -- ]
] -- ]
] -- ]
, ul [className "nav navbar-nav pull-right"] -- , ul [className "nav navbar-nav pull-right"]
[ -- [
li [className "dropdown"] -- li [className "dropdown"]
[ -- [
a [ className "dropdown-toggle navbar-text", _data {toggle : "dropdown"}, href "#", role "button", title "That is your username" ] -- a [ className "dropdown-toggle navbar-text", _data {toggle : "dropdown"}, href "#", role "button", title "That is your username" ]
[ i [ className "" ] -- [ i [ className "" ]
[] -- []
, span [ aria {hidden : true}, className "glyphicon glyphicon-user", style {color:"white"} ] -- , span [ aria {hidden : true}, className "glyphicon glyphicon-user", style {color:"white"} ]
[] -- []
, i [ className "caret" ] -- , i [ className "caret" ]
[] -- []
] -- ]
, ul [className "dropdown-menu"] -- , ul [className "dropdown-menu"]
[ -- [
li [] -- li []
[ a [tabIndex (-1), target "blank", title "Send us a message (bug, thanks, congrats...)", href "https://www.iscpif.fr/gargantext/feedback-and-bug-reports/"] -- [ a [tabIndex (-1), target "blank", title "Send us a message (bug, thanks, congrats...)", href "https://www.iscpif.fr/gargantext/feedback-and-bug-reports/"]
[ -- [
span [ className "glyphicon glyphicon-bullhorn" ,aria {hidden : true}] [] -- span [ className "glyphicon glyphicon-bullhorn" ,aria {hidden : true}] []
, text "Report Feedback" -- , text "Report Feedback"
] -- ]
] -- ]
, li [ className"divider"] -- , li [ className"divider"]
[] -- []
, li [] -- , li []
[ a [tabIndex (-1), href "/auth/login" ] -- [ a [tabIndex (-1), href "/auth/login" ]
[ span [className "glyphicon glyphicon-log-in",aria {hidden : true}] [] -- [ span [className "glyphicon glyphicon-log-in",aria {hidden : true}] []
, text "login" -- , text "login"
] -- ]
] -- ]
] -- ]
] -- ]
] -- ]
] -- ]
] -- ]
] -- ]
, div [className "container"] div [className "container"]
[ [
div [className "jumbotron"] div [className "jumbotron"]
[ [
......
module Navigation where module Navigation where
import DOM
import AddCorpusview as AC
import Control.Monad.Eff.Console (CONSOLE) import Control.Monad.Eff.Console (CONSOLE)
import DOM (DOM)
import Data.Either (Either(..)) import Data.Either (Either(..))
import Data.Foldable (fold) import Data.Foldable (fold)
import Data.Lens (Lens', Prism', lens, over, prism) import Data.Lens (Lens', Prism', lens, over, prism)
import Data.Maybe (Maybe(Nothing, Just)) import Data.Maybe (Maybe, Maybe(Nothing, Just))
import Thermite (PerformAction, Render, Spec, _render, defaultRender, focus, modifyState, simpleSpec, withState)
import Prelude hiding (div)
import Network.HTTP.Affjax (AJAX)
import PageRouter (Routes(..))
import React.DOM (div)
import React.DOM.Props (_id, className)
import Landing as L import Landing as L
import Login as LN import Login as LN
import AddCorpusview as AC import Network.HTTP.Affjax (AJAX)
import PageRouter (Routes(..))
import Prelude hiding (div)
import React.DOM (a, div, i, img, li, span, text, ul)
import React.DOM.Props (_data, _id, aria, className, href, role, src, style, tabIndex, target, title)
import Thermite (PerformAction, Render, Spec, _render, defaultRender, focus, modifyState, simpleSpec, withState)
type E e = (dom :: DOM, ajax :: AJAX, console :: CONSOLE | e) type E e = (dom :: DOM, ajax :: AJAX, console :: CONSOLE | e)
...@@ -27,7 +28,7 @@ type AppState = ...@@ -27,7 +28,7 @@ type AppState =
initAppState :: AppState initAppState :: AppState
initAppState = initAppState =
{ currentRoute : Nothing { currentRoute : Just AddCorpus
, landingState : L.initialState , landingState : L.initialState
, loginState : LN.initialState , loginState : LN.initialState
, addCorpusState : AC.initialState , addCorpusState : AC.initialState
...@@ -97,8 +98,8 @@ pagesComponent s = ...@@ -97,8 +98,8 @@ pagesComponent s =
selectSpec Home selectSpec Home
where where
selectSpec :: Routes -> Spec (ajax :: AJAX, console :: CONSOLE, dom :: DOM | eff) AppState props Action selectSpec :: Routes -> Spec (ajax :: AJAX, console :: CONSOLE, dom :: DOM | eff) AppState props Action
selectSpec Home = focus _landingState _landingAction L.loginSpec selectSpec Home = wrap $ focus _landingState _landingAction L.loginSpec
selectSpec Login = wrap $ focus _loginState _loginAction LN.renderSpec selectSpec Login = focus _loginState _loginAction LN.renderSpec
selectSpec AddCorpus = wrap $ focus _addCorpusState _addCorpusAction AC.addcorpusviewSpec selectSpec AddCorpus = wrap $ focus _addCorpusState _addCorpusAction AC.addcorpusviewSpec
routingSpec :: forall props eff. Spec (dom :: DOM |eff) AppState props Action routingSpec :: forall props eff. Spec (dom :: DOM |eff) AppState props Action
...@@ -125,7 +126,88 @@ sidebarnavSpec = simpleSpec performAction render ...@@ -125,7 +126,88 @@ sidebarnavSpec = simpleSpec performAction render
where where
render :: Render AppState props Action render :: Render AppState props Action
render dispatch _ state _ = render dispatch _ state _ =
[ ] [
div [ _id "dafixedtop", className "navbar navbar-inverse navbar-fixed-top", role "navigation"]
[ div [className "container"]
[
div [ className "navbar-inner" ]
[ a [ className "navbar-brand logoSmall", href "/" ]
[ img [ src "images/logoSmall.png", title "Back to home." ]
[]
]
]
, div [className "navbar-collapse collapse"]
[
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 "Informations about Gargantext" ]
[ span [ aria {hidden : true}, className "glyphicon glyphicon-info-sign" ]
[]
, text "Info"
, i [ className "caret" ]
[]
]
, ul [className "dropdown-menu"]
[ li []
[ a [tabIndex (-1), target "blank", title "Documentation and tutorials", href "https://iscpif.fr/gargantext/your-first-map/"]
[text "Documentation"]
]
, li [className "divider"] []
, li []
[
a [ tabIndex (-1), target "blank", title "About", href "/about/", title "More informations about the project, its sponsors and its authors"]
[ text "About"]
]
]
]
]
]
, ul [className "nav navbar-nav pull-right"]
[
li [className "dropdown"]
[
a [ className "dropdown-toggle navbar-text", _data {toggle : "dropdown"}, href "#", role "button", title "That is your username" ]
[ i [ className "" ]
[]
, span [ aria {hidden : true}, className "glyphicon glyphicon-user", style {color:"white"} ]
[]
, i [ className "caret" ]
[]
]
, ul [className "dropdown-menu"]
[
li []
[ a [tabIndex (-1), target "blank", title "Send us a message (bug, thanks, congrats...)", href "https://www.iscpif.fr/gargantext/feedback-and-bug-reports/"]
[
span [ className "glyphicon glyphicon-bullhorn" ,aria {hidden : true}] []
, text "Report Feedback"
]
]
, li [ className"divider"]
[]
, li []
[ a [tabIndex (-1), href "/auth/login" ]
[ span [className "glyphicon glyphicon-log-in",aria {hidden : true}] []
, text "login"
]
]
]
]
]
]
]
]
]
layoutSpec :: forall eff props. Spec (E eff) AppState props Action layoutSpec :: forall eff props. Spec (E eff) AppState props Action
......
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