Commit 6aca1759 authored by Emmanuel Raviart's avatar Emmanuel Raviart

Add about menu, a page about the project and improve contacts.

parent 588f2d41
......@@ -3,6 +3,7 @@ module About exposing (..)
import Html exposing (..)
import Html.Attributes exposing (..)
import I18n
import I18nHtml
view : I18n.Language -> Html msg
......@@ -12,44 +13,14 @@ view language =
[ div [ class "container" ]
[ div [ class "intro-text" ]
[ div [ class "intro-heading" ]
[ text (I18n.translate language (I18n.About)) ]
, div [ class "intro-lead-in" ]
[ text (I18n.translate language (I18n.AboutLead)) ]
[ text (I18n.translate language I18n.TheProject) ]
]
]
]
, section [ id "mentions" ]
, section []
[ div [ class "container" ]
[ div [ class "row" ]
[ div [ class "col-lg-12 text-center" ]
[ h2 [ class "section-heading" ]
[ text (I18n.translate language (I18n.AboutLegal)) ]
]
]
, div [ class "row" ]
[ div [ class "col-md-12 text-center" ]
[ p []
[ text (I18n.translate language (I18n.AboutLegalContent)) ]
]
]
]
]
, section [ id "mentions" ]
[ div [ class "container" ]
[ div [ class "row" ]
[ div [ class "col-lg-12 text-center" ]
[ h2 [ class "section-heading" ]
[ text (I18n.translate language (I18n.AboutCredits)) ]
]
]
, div [ class "row" ]
[ div [ class "col-md-12 text-center" ]
[ p []
[ text (I18n.translate language (I18n.AboutCreditsContent))
, a [ href "https://github.com/WengerK/d3bubbles", target "_blank" ]
[ text "D3bubbles de Kevin Wenger." ]
]
]
[ I18nHtml.translate language I18nHtml.TheProjectPresentationParagraphs
]
]
]
......
......@@ -161,6 +161,7 @@ type TranslationId
| FindCard
| FindPropertyKey
| FooterAbout
| FooterContact
| FooterDiscover
| GenericError
| HaveAnAccount
......@@ -278,6 +279,7 @@ type TranslationId
| Software
| Tags
| TextField
| TheProject
| TimeoutExplanation
| Tool GrammaticalNumber
| ToolId
......@@ -329,8 +331,8 @@ getTranslationSet translationId =
, croatian = todo
, czech = todo
, danish = todo
, dutch = s "Algemeen"
, english = s "General"
, dutch = todo
, english = s "About"
, estonian = todo
, finnish = todo
, french = s "À propos"
......@@ -4731,6 +4733,33 @@ getTranslationSet translationId =
, swedish = todo
}
FooterContact ->
{ bulgarian = todo
, croatian = todo
, czech = todo
, danish = todo
, dutch = todo
, english = s "Contact"
, estonian = todo
, finnish = todo
, french = s "Contact"
, german = todo
, greek = todo
, hungarian = todo
, irish = todo
, italian = todo
, latvian = todo
, lithuanian = todo
, maltese = todo
, polish = todo
, portuguese = todo
, romanian = todo
, slovak = todo
, slovenian = todo
, spanish = todo
, swedish = todo
}
FooterDiscover ->
{ bulgarian = todo
, croatian = todo
......@@ -8521,6 +8550,33 @@ to strengthen governance.
, swedish = todo
}
TheProject ->
{ bulgarian = todo
, croatian = todo
, czech = todo
, danish = todo
, dutch = todo
, english = s "The Project"
, estonian = todo
, finnish = todo
, french = s "Le projet"
, german = todo
, greek = todo
, hungarian = todo
, irish = todo
, italian = todo
, latvian = todo
, lithuanian = todo
, maltese = todo
, polish = todo
, portuguese = todo
, romanian = todo
, slovak = todo
, slovenian = todo
, spanish = todo
, swedish = todo
}
TimeoutExplanation ->
{ bulgarian = todo
, croatian = todo
......
This diff is collapsed.
......@@ -488,7 +488,7 @@ viewFooter model language =
language
"/about"
[]
[ text (I18n.translate language I18n.About) ]
[ text (I18n.translate language I18n.TheProject) ]
]
, li []
[ aForPath
......@@ -506,9 +506,24 @@ viewFooter model language =
[]
[ text (I18n.translate language I18n.Press) ]
]
, li []
]
, br [] []
, h4 []
[ text (I18n.translate language I18n.FooterContact) ]
, ul [ class "footer-menu" ]
[ li []
[ a [ href "mailto:info@ogptpoolbox.org" ]
[ text (I18n.translate language I18n.Email) ]
[ i [ attribute "aria-hidden" "true", class "fa fa-envelope" ] []
, text " "
, text (I18n.translate language I18n.Email)
]
]
, li []
[ a [ href "https://twitter.com/ogptoolbox", target "_blank" ]
[ i [ attribute "aria-hidden" "true", class "fa fa-twitter" ] []
, text " "
, text "Twitter"
]
]
]
]
......@@ -525,6 +540,81 @@ viewFooter model language =
viewHeader : Model -> I18n.Language -> String -> Html Msg
viewHeader model language containerClass =
let
aboutDropdown =
let
-- A variant of aForPath with stopPropagation = False, to close menu after click
aForPath navigate language path attributes children =
let
pathWithLanguage =
Urls.languagePath language path
in
a
([ href pathWithLanguage
, onWithOptions
"click"
{ stopPropagation = False, preventDefault = True }
(Json.Decode.succeed (navigate pathWithLanguage))
]
++ attributes
)
children
in
li [ class "dropdown" ]
[ a
[ attribute "aria-expanded" "false"
, attribute "aria-haspopup" "true"
, attribute "data-toggle" "dropdown"
, class "dropdown-toggle"
, href "#"
, role "button"
]
[ text (I18n.translate language I18n.About)
, text " "
, span [ class "caret" ] []
]
, ul [ class "dropdown-menu" ]
[ li []
[ aForPath
Navigate
language
"/about"
[]
[ text (I18n.translate language I18n.TheProject) ]
]
, li []
[ aForPath
Navigate
language
"/faq"
[]
[ text (I18n.translate language I18n.Help) ]
]
, li []
[ aForPath
Navigate
language
"/press"
[]
[ text (I18n.translate language I18n.Press) ]
]
, li [ class "divider", role "separator" ] []
, li []
[ a [ href "mailto:info@ogptpoolbox.org" ]
[ i [ attribute "aria-hidden" "true", class "fa fa-envelope" ] []
, text " "
, text (I18n.translate language I18n.Email)
]
]
, li []
[ a [ href "https://twitter.com/ogptoolbox", target "_blank" ]
[ i [ attribute "aria-hidden" "true", class "fa fa-twitter" ] []
, text " "
, text "Twitter"
]
]
]
]
profileNavItem =
case model.authentication of
Just authentication ->
......@@ -665,14 +755,7 @@ viewHeader model language containerClass =
[]
[ text (I18n.translate language (I18n.Collection I18n.Plural)) ]
]
, li []
[ aForPath
Navigate
language
"/faq"
[]
[ text (I18n.translate language I18n.Help) ]
]
, aboutDropdown
]
, Html.form
[ class "navbar-form navbar-right"
......@@ -732,14 +815,7 @@ viewHeader model language containerClass =
[]
[ text (I18n.translate language (I18n.Collection I18n.Plural)) ]
]
, li []
[ aForPath
Navigate
language
"/faq"
[]
[ text (I18n.translate language I18n.Help) ]
]
, aboutDropdown
, profileNavItem
, signInOrOutNavItem
]
......
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