blog-rekahsoft-ca/clay/Util.hs
Collin J. Doering 7b08488815 Ported sass/_blog.sass to clay and modularized clay css files
* ported sass/_blog.sass to within clay/Header.hs (excluding use of
mixins - see comments in source)
* split up clay css into a few modules (Util, Header and Main)
* still missing any properties that were implemented as sass
  mixins (from sass/default.sass and sass/_blog.sass) as well as porting
  the following sass files (from sass/):
  * _home-page.sass
  * _contact-page.sass
  * _post-page.sass
  * _tag-page.sass
  * _src-highlight.sass

Signed-off-by: Collin J. Doering <collin.doering@rekahsoft.ca>
2015-01-14 04:50:29 -05:00

40 lines
1.3 KiB
Haskell

-- (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: Util.hs
-- Author: Collin J. Doering <collin.doering@rekahsoft.ca>
-- Date: Jan 9, 2015
{-# LANGUAGE OverloadedStrings #-}
module Util
( makeBorderBox
) where
import Clay hiding (i, s, id)
import Data.Maybe (fromMaybe)
import Prelude hiding (div, span, (**))
makeBorderBox :: Maybe (Size Abs) -> Maybe Color -> Css
makeBorderBox pad backCol =
let pad' = fromMaybe (px 8) pad
backCol' = fromMaybe (rgba 250 250 255 165) backCol
in do
backgroundColor backCol'
border solid (px 1) "#888"
borderRadius (px 5) (px 5) (px 5) (px 5)
boxShadow (px 2) (px 5) (px 2) "#888"
sym padding pad'
marginBottom (em 1.25)