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
746b9dab
Commit
746b9dab
authored
Dec 18, 2020
by
Alexandre Delanoë
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[ERGO] Home Page
parent
9a81a46c
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
60 additions
and
32 deletions
+60
-32
Forest.purs
src/Gargantext/Components/Forest.purs
+1
-1
Home.purs
src/Gargantext/Components/Nodes/Home.purs
+41
-20
Public.purs
src/Gargantext/Components/Nodes/Home/Public.purs
+15
-11
Types.purs
src/Gargantext/Types.purs
+3
-0
No files found.
src/Gargantext/Components/Forest.purs
View file @
746b9dab
...
...
@@ -96,7 +96,7 @@ plus handed showLogin backend = H.div { className: handedClass } [
}
[ H.div { "type": ""
, className: "fa fa-universal-access fa-lg"
} [H.text " Log "]
} [H.text " Log
in/out
"]
, H.div {} [H.text " "]
--, H.div { "type": "", className: "fa fa-plus-circle fa-lg"} []
--, H.div { "type": "", className: "fa fa-minus-circle fa-lg"} []
...
...
src/Gargantext/Components/Nodes/Home.purs
View file @
746b9dab
module Gargantext.Components.Nodes.Home where
import DOM.Simple.Console (log)
import Data.Tuple (snd)
import Data.Maybe (Maybe(..))
import Data.Newtype (class Newtype)
import Effect (Effect)
import Reactix as R
import Reactix.DOM.HTML as H
import Routing.Hash (setHash)
import Gargantext.Ends (Backend(..))
import Gargantext.Sessions (Sessions(..))
import Gargantext.Sessions as Sessions
import Gargantext.Components.Data.Landing (BlockText(..), BlockTexts(..), Button(..), LandingData(..))
import Gargantext.Components.Lang (LandingLang(..))
import Gargantext.Components.Lang.Landing.EnUS as En
import Gargantext.Components.Lang.Landing.FrFR as Fr
import Gargantext.Components.Nodes.Home.Public (renderPublic)
import Gargantext.Ends (Backend(..))
import Gargantext.License (license)
import Gargantext.Prelude (Unit, map, pure, unit, void, ($), (<>))
import Gargantext.Prelude -- (Unit, map, pure, unit, void, ($), (<>), (*>))
import Gargantext.Sessions (Sessions(..))
import Gargantext.Sessions as Sessions
import Gargantext.Utils.Reactix as R2
import Reactix as R
import Reactix.DOM.HTML as H
import Routing.Hash (setHash)
thisModule = "Gargantext.Components.Nodes.Home"
...
...
@@ -70,15 +70,36 @@ homeLayoutCpt = R.hooksComponentWithModule thisModule "homeLayout" cpt
pure $ H.span {}
[ H.div { className: "home-title container1" } [ jumboTitle landingData false ]
, H.div { className: "home-research-form container1" } [] -- TODO put research form
, H.div { className: "home-landing-data container1" } [ blocksRandomText' landingData ]
, H.div { className: "home-public container1" } [ renderPublic { backend
, publicBackend
, sessions
, visible
}
]
, H.div {className:"center"}
[ H.h1 {} [ -- H.span {className: "fa fa-star-o"} []
H.text ""
]
]
, H.div { className: "home-landing-data container1" } [ blocksRandomText' landingData ]
, joinButton
, license
]
where
joinButton = H.div { className:"flex-space-around center"
, paddingTop: "100px"
, paddingBottom: "100px"
}
[ H.button { className: "btn btn-primary my-2"
, on : {click}
, title: "Connect to the server"
} [ H.text "Join"
]
]
click _ = log "click!" *> (snd backend) (const $ Just publicBackend)
*> (snd visible) (const true)
------------------------------------------------------------------------
...
...
@@ -116,18 +137,18 @@ docButton (Button b) =
jumboTitle :: LandingData -> Boolean -> R.Element
jumboTitle (LandingData hd) b =
H.div {className: jumbo}
[ H.div { className: "row" }
[ H.div { className: "col-md-12 content" }
[ H.div { className: "center" }
[ H.div { id: "logo-designed" }
[ H.img { src: "images/logo.png"
, title: hd.logoTitle
}
[ H.div { className: "row" }
[ H.div { className: "col-md-12 content" }
[ H.div { className: "center" }
[ H.div { id: "logo-designed" }
[ H.img { src: "images/logo.png"
, title: hd.logoTitle
}
]
]
]
]
]
]
]
]
where
jumbo = case b of
true -> "jumbotron"
...
...
src/Gargantext/Components/Nodes/Home/Public.purs
View file @
746b9dab
...
...
@@ -112,22 +112,17 @@ publicLayoutCpt = R.hooksComponentWithModule thisModule "publicLayout" cpt
where
cpt {publicDatas, visible, backend, publicBackend, sessions} _ = do
pure $ H.span {}
[ H.div { className: "text-center" }
[ joinButton
, H.div { className: "text-center" }
[ H.div { className:"container1"
, style: { marginBottom : "15px"}
}
[ H.h2 {} [H.text "
Public Maps"]
, H.p { className: "lead text-muted"}
[ H.text "
Discover maps
made with "
[ H.h2 {} [H.text "
Discover maps"
, H.p { className: "lead text-muted
center
"}
[ H.text "made with "
, H.span {className: "fa fa-heart"} []
]
, H.div { className:"flex-space-around" }
[ H.button { className: "btn btn-primary my-2"
, on : { click }
, title: "Connect to the server"
} [ H.text "Join"
]
]
]
]
]
-- | TODO browse maps
...
...
@@ -138,6 +133,15 @@ publicLayoutCpt = R.hooksComponentWithModule thisModule "publicLayout" cpt
click _ = log "click!" *> (snd backend) (const $ Just publicBackend)
*> (snd visible) (const true)
joinButton = H.div { className:"flex-space-around center" }
[ H.button { className: "btn btn-primary my-2"
, on : { click }
, title: "Connect to the server"
} [ H.text "Login"
]
]
album :: Array PublicData -> R.Element
album pds = H.div {className: "album py-5 bg-light"}
[ H.div { className: "container" }
...
...
src/Gargantext/Types.purs
View file @
746b9dab
...
...
@@ -23,6 +23,9 @@ derive instance genericHanded :: Generic Handed _
instance eqHanded :: Eq Handed where
eq = genericEq
reverseHanded :: Handed -> Handed
reverseHanded LeftHanded = RightHanded
reverseHanded RightHanded = LeftHanded
-------------------------------------------------------------------------
type ID = Int
...
...
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