Update to latest hakyll/clay, fix template for https usage
parent
98bb7b0355
commit
48a1c13f72
|
@ -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"
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
---
|
||||
title: Operator Sections in Haskell: A History
|
||||
title: 'Operator Sections in Haskell: A History'
|
||||
---
|
||||
|
||||
Operator Sections
|
||||
|
|
4
site.hs
4
site.hs
|
@ -9,7 +9,7 @@ import Hakyll
|
|||
frontPagePosts = 5
|
||||
|
||||
hakyllConfig :: Configuration
|
||||
hakyllConfig = def { deployCommand = "cd _site; cp -R * /var/www/pinealservo.com" }
|
||||
hakyllConfig = def { deployCommand = "cd _site; cp -R * /opt/appdata/letsencrypt/config/www" }
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
main :: IO ()
|
||||
|
@ -24,7 +24,7 @@ main = hakyllWith hakyllConfig $ do
|
|||
|
||||
match "css/*.hs" $ do
|
||||
route $ setExtension "css"
|
||||
compile $ getResourceString >>= withItemBody (unixFilter "runhaskell" [])
|
||||
compile $ getResourceString >>= withItemBody (unixFilter "stack" ["runhaskell", "--"])
|
||||
>>= return . fmap compressCss
|
||||
match "*.markdown" $ do
|
||||
route $ setExtension "html"
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<link href='http://fonts.googleapis.com/css?family=Orbitron:700|PT+Sans|Oswald:400,300' rel='stylesheet' type='text/css'>
|
||||
<link href='https://fonts.googleapis.com/css?family=Orbitron:700|PT+Sans|Oswald:400,300' rel='stylesheet' type='text/css'>
|
||||
<meta charset="utf-8" />
|
||||
<title>PinealServo$if(title)$ - $title$$endif$</title>
|
||||
<link rel="stylesheet" href="/css/layout.css" />
|
||||
|
|
Loading…
Reference in New Issue