Make footer content-dependent

This commit is contained in:
Chris Done 2014-05-28 22:59:14 +02:00
parent d97bde0703
commit b6edb5b7a5
2 changed files with 37 additions and 3 deletions

View file

@ -59,9 +59,7 @@ skeleton ptitle innerhead innerbody mroute url =
bodyinner =
do div [class_ "wrap"]
(innerbody mroute url)
div [class_ "footer"]
(div [class_ "container"]
(p [] (do "Copyright © 2014 haskell-lang.org")))
footer mroute
scripts url
[js_jquery_js
,js_bootstrap_min_js]
@ -183,3 +181,31 @@ routeToSlug r =
background :: (Route App -> AttributeValue) -> Route Static -> Attribute
background url route =
style ("background-image: url(" <> url (StaticR route) <> ")")
-- | Footer across the whole site.
footer :: Maybe (Route App) -> Senza
footer r =
div [class_ "footer"]
(div [class_ "container"]
(p [] (do case r of
Just (WikiR page) -> wikiLicense (Just page)
Just (WikiHomeR{}) -> wikiLicense (Nothing :: Maybe Text)
_ -> "Copyright © 2014 haskell-lang.org"
"")))
where
wikiLicense page =
do span [class_ "item"]
wikiLink
span [class_ "item"]
(do "Wiki content is available under "
a [href "http://www.haskell.org/haskellwiki/HaskellWiki:Copyrights"]
"a simple permissive license.")
where
wikiLink =
case page of
Nothing ->
a [href "http://www.haskell.org/haskellwiki/"]
"Go to haskell.org wiki"
Just page ->
a [href (toValue ("http://www.haskell.org/haskellwiki/index.php?title=" <> page <> "&action=edit"))]
"Edit this page"

View file

@ -49,6 +49,14 @@ h2 {
font-size:13px;
}
.footer a {
color: #fff;
}
.footer .item + .item {
margin-left: 2em;
}
.logo {
font-family:haskell;
font-weight:400;