Update to latest hakyll/clay, fix template for https usage
This commit is contained in:
@@ -61,10 +61,10 @@ i `times` Em b = Em $ (fromIntegral i) * b
|
||||
i `times` Rem b = Rem $ (fromIntegral i) * b
|
||||
i `times` Ex b = Ex $ (fromIntegral i) * b
|
||||
|
||||
toSize :: CalcSize -> Size Abs
|
||||
toSize :: CalcSize -> Size LengthUnit
|
||||
toSize s = case s of
|
||||
Zero -> nil
|
||||
Px i -> px i
|
||||
Px i -> px $ fromIntegral i
|
||||
Pt d -> pt d
|
||||
Em d -> em d
|
||||
Rem d -> em d -- todo: Add rem to Clay.Size
|
||||
@@ -80,7 +80,7 @@ perct (Rem a) (Rem b) = a / b * 100
|
||||
perct (Ex a) (Ex b) = a / b * 100
|
||||
perct _ _ = error "Can't take percentage of different kinds"
|
||||
|
||||
percentage :: CalcSize -> CalcSize -> Size Rel
|
||||
percentage :: CalcSize -> CalcSize -> Size Percentage
|
||||
percentage a b = pct $ perct a b
|
||||
|
||||
data LayoutSettings =
|
||||
@@ -190,10 +190,10 @@ showGrid =
|
||||
|
||||
showBaseline n = do
|
||||
backgroundSize $ (px 40) `by` (px n)
|
||||
backgroundImage $ repeatingLinearGradient (angular $ deg 0) [("#111", px 0)
|
||||
,("#111", px 1)
|
||||
,(transparent, px 1)
|
||||
,(transparent, px n)]
|
||||
backgroundImage $ repeatingLinearGradient (angular $ deg 0) [("#111", pct 0)
|
||||
,("#111", pct 1)
|
||||
,(transparent, pct 1)
|
||||
,(transparent, pct n)]
|
||||
height (pct 100)
|
||||
width (pct 100)
|
||||
opacity 0.75
|
||||
@@ -212,9 +212,9 @@ selectors :: [Selector] -> Selector
|
||||
selectors = foldl1 (<>)
|
||||
|
||||
setFontSize x = do
|
||||
let line = 1 + x `div` baselinePx
|
||||
fontSize $ emFromRatio x defaultFontPx
|
||||
lineHeight $ emFromRatio (line * baselinePx) x
|
||||
let line = 1 + x / baselinePx
|
||||
fontSize $ em $ x / defaultFontPx
|
||||
lineHeight $ em $ (line * baselinePx) / x
|
||||
|
||||
{- Insert this into main for layout-debugging grids
|
||||
|
||||
@@ -312,7 +312,7 @@ typography = do
|
||||
textRendering optimizeLegibility
|
||||
color bodyCopyColor
|
||||
a ? color primary
|
||||
lineHeight $ emFromRatio baselinePx defaultFontPx
|
||||
lineHeight $ em $ baselinePx / defaultFontPx
|
||||
|
||||
"#logo" ? do
|
||||
paddingTop $ px (1*baselinePx)
|
||||
@@ -368,7 +368,7 @@ typography = do
|
||||
setFontSize 24
|
||||
|
||||
ul <> ol ? do
|
||||
marginLeft $ emFromRatio baselinePx baseFontPx
|
||||
marginLeft $ em $ baselinePx / baseFontPx
|
||||
marginBottom $ px baselinePx
|
||||
"list-style-type" -: "none"
|
||||
|
||||
|
Reference in New Issue
Block a user