2015-01-09 11:02:25 +00:00
|
|
|
-- (C) Copyright Collin J. Doering 2015
|
|
|
|
--
|
|
|
|
-- This program is free software: you can redistribute it and/or modify
|
|
|
|
-- it under the terms of the GNU General Public License as published by
|
|
|
|
-- the Free Software Foundation, either version 3 of the License, or
|
|
|
|
-- (at your option) any later version.
|
|
|
|
--
|
|
|
|
-- This program is distributed in the hope that it will be useful,
|
|
|
|
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
-- GNU General Public License for more details.
|
|
|
|
--
|
|
|
|
-- You should have received a copy of the GNU General Public License
|
|
|
|
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
|
|
|
|
-- File: Header.hs
|
|
|
|
-- Author: Collin J. Doering <collin.doering@rekahsoft.ca>
|
|
|
|
-- Date: Jan 9, 2015
|
|
|
|
|
|
|
|
{-# LANGUAGE OverloadedStrings #-}
|
|
|
|
|
|
|
|
module Header
|
|
|
|
( logoHeader
|
|
|
|
, navigation
|
|
|
|
, theHeader
|
|
|
|
) where
|
|
|
|
|
|
|
|
import Clay hiding (i, s, id)
|
|
|
|
import Prelude hiding (div, span, (**))
|
|
|
|
|
|
|
|
theHeader :: Css
|
|
|
|
theHeader = do
|
|
|
|
logoHeader
|
|
|
|
navigation
|
2015-01-10 21:36:56 +00:00
|
|
|
statusMessage
|
2015-01-09 11:02:25 +00:00
|
|
|
|
|
|
|
logoHeader :: Css
|
|
|
|
logoHeader = do
|
|
|
|
"#logo-background" ? do
|
2015-01-10 21:36:56 +00:00
|
|
|
backgroundColor "#cef" -- fallback background color
|
|
|
|
backgroundImage $ vGradient "#cef" "#cff"
|
2015-01-09 11:02:25 +00:00
|
|
|
sym2 padding (em 0.75) nil
|
|
|
|
|
|
|
|
"#logo" ? do
|
|
|
|
backgroundImage $ url "/images/logo-banner.svg"
|
|
|
|
backgroundRepeat noRepeat
|
|
|
|
backgroundPosition $ positioned (pct 50) (pct 50)
|
|
|
|
backgroundSize contain
|
|
|
|
height (px 175)
|
|
|
|
|
|
|
|
navigation :: Css
|
|
|
|
navigation = do
|
2015-01-10 21:36:56 +00:00
|
|
|
keyframesFromTo "nav-slide"
|
|
|
|
(backgroundPosition $ positioned nil nil)
|
|
|
|
(backgroundPosition $ positioned (px 304) nil)
|
|
|
|
|
2015-01-09 11:02:25 +00:00
|
|
|
"#nav" ? do
|
|
|
|
border solid (px 2) black
|
|
|
|
borderRightWidth 0
|
|
|
|
borderLeftWidth 0
|
|
|
|
backgroundImage $ url "/images/diagonal-stripes.png"
|
2015-01-10 21:36:56 +00:00
|
|
|
animation "nav-slide" (sec 5) linear (sec 0) infinite normal none
|
|
|
|
animationPlayState paused
|
2015-01-09 11:02:25 +00:00
|
|
|
|
2015-01-10 21:36:56 +00:00
|
|
|
"#nav" # ".loading" ?
|
|
|
|
animationPlayState running
|
2015-01-09 11:02:25 +00:00
|
|
|
|
|
|
|
"#nav-menu" ? do
|
|
|
|
textAlign $ alignSide sideCenter
|
|
|
|
marginBottom nil
|
|
|
|
|
|
|
|
li ? do
|
|
|
|
display inlineBlock
|
|
|
|
sym margin nil
|
|
|
|
sym2 padding (px 10) (em 3)
|
|
|
|
|
|
|
|
".menuitem" ? do
|
|
|
|
display block
|
|
|
|
color "#eee"
|
|
|
|
fontSize (em 1.5)
|
|
|
|
fontWeight bold
|
|
|
|
textDecoration none
|
|
|
|
textShadow (px 1) (px 1) nil black
|
2015-01-10 21:36:56 +00:00
|
|
|
transitionProperty "transform"
|
|
|
|
transitionDuration (ms 20)
|
2015-01-09 11:02:25 +00:00
|
|
|
|
|
|
|
".menuitem" # ":hover" ? do
|
|
|
|
color "#ddd"
|
2015-01-10 21:36:56 +00:00
|
|
|
transform $ scale 1.1 1.1
|
2015-01-09 11:02:25 +00:00
|
|
|
|
2015-01-10 21:36:56 +00:00
|
|
|
".menuitem" # ":active" ? do
|
|
|
|
transform $ scale 0.95 0.95
|
2015-01-09 11:02:25 +00:00
|
|
|
|
|
|
|
li # ".active" ? do
|
|
|
|
".menuitem" ? do
|
|
|
|
color "#fff"
|
|
|
|
textShadow (px 2) (px 2) nil black
|
2015-01-10 21:36:56 +00:00
|
|
|
transform $ scale 1.2 1.2
|
2015-01-09 11:02:25 +00:00
|
|
|
|
|
|
|
-- ".menuitem" # ":hover" ? do
|
2015-01-10 21:36:56 +00:00
|
|
|
-- transitionProperty "none" -- WHY? this doesn't seem to be needed.
|
2015-01-09 11:02:25 +00:00
|
|
|
|
2015-01-10 21:36:56 +00:00
|
|
|
".menuitem" # ":active" ? do
|
|
|
|
-- transitionProperty "none" -- WHY? this doesn't seem to be needed.
|
|
|
|
transform $ scale 1.1 1.1
|
2015-01-09 11:02:25 +00:00
|
|
|
|
|
|
|
a # ".rss-icon" ? do
|
|
|
|
display inlineBlock
|
|
|
|
position absolute
|
|
|
|
backgroundImage $ url "/images/rss-icon.png"
|
|
|
|
backgroundSize contain
|
|
|
|
sym borderRadius (px 5)
|
|
|
|
minHeight (px 25)
|
|
|
|
minWidth (px 25)
|
|
|
|
sym margin nil
|
|
|
|
top (px 7)
|
|
|
|
right (px 10)
|
|
|
|
|
2015-01-10 21:36:56 +00:00
|
|
|
a # ".rss-icon" # ":hover" ? do
|
|
|
|
transform $ scale 1.1 1.1
|
2015-01-09 11:02:25 +00:00
|
|
|
|
2015-01-10 21:36:56 +00:00
|
|
|
a # ".rss-icon" # ":active" ? do
|
|
|
|
transform $ scale 0.9 0.9
|
2015-01-09 11:02:25 +00:00
|
|
|
|
2015-01-10 21:36:56 +00:00
|
|
|
statusMessage :: Css
|
|
|
|
statusMessage = do
|
2015-01-09 11:02:25 +00:00
|
|
|
"#status" ? do
|
|
|
|
display none
|
|
|
|
border solid (px 1) black
|
|
|
|
borderTop solid nil black
|
|
|
|
borderBottomRightRadius (px 5) (px 5)
|
|
|
|
borderBottomLeftRadius (px 5) (px 5)
|
|
|
|
backgroundColor $ rgb 146 208 240
|
|
|
|
-- boxShadow (px 2) (px 5) (px 5) (px 2) "#888888"
|
|
|
|
boxShadow (px 2) (px 5) (px 5) "#888888"
|
|
|
|
sym padding (px 8)
|
|
|
|
marginBottom (em 1.25)
|
|
|
|
|
|
|
|
"#status" # ".error" ?
|
|
|
|
backgroundColor "#FD6F6F"
|
|
|
|
|
|
|
|
"#status" # ".success" ? do
|
|
|
|
backgroundColor $ rgb 136 211 136
|