diff options
author | Ben Sima <ben@bsima.me> | 2020-04-15 10:06:24 -0700 |
---|---|---|
committer | Ben Sima <ben@bsima.me> | 2020-04-15 10:07:02 -0700 |
commit | afa9d701538b9e56622a0bfdf8e04aa358c9cd82 (patch) | |
tree | dee95c3955b3fe3d11e80d89823660d28eee0587 /Hero/Look/Typography.hs | |
parent | f4b8c0df041b063c0b47d2ec6c818a9c202fd833 (diff) |
Reformatting
Now I'm using ormolu instead of brittany for Haskell formatting
now. Figured I should just make all of these big changes at once.
Diffstat (limited to 'Hero/Look/Typography.hs')
-rw-r--r-- | Hero/Look/Typography.hs | 48 |
1 files changed, 26 insertions, 22 deletions
diff --git a/Hero/Look/Typography.hs b/Hero/Look/Typography.hs index 4d4f976..6358ef3 100644 --- a/Hero/Look/Typography.hs +++ b/Hero/Look/Typography.hs @@ -1,13 +1,14 @@ +{-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE NoImplicitPrelude #-} -{-# LANGUAGE GeneralizedNewtypeDeriving #-} + module Hero.Look.Typography where -import Alpha -import Clay -import Clay.Stylesheet ( key ) -import qualified Hero.Assets as Assets -import Data.Semigroup ( (<>) ) +import Alpha +import Clay +import Clay.Stylesheet (key) +import Data.Semigroup ((<>)) +import qualified Hero.Assets as Assets main :: Css main = fonts @@ -15,25 +16,28 @@ main = fonts -- font modifiers euro, slim, wide, thicc, thinn, norm, lean, smol, lower, upper :: Css - euro = fontFamily ["Eurostile"] [sansSerif] -- | stretch slim = fontStretch condensed + wide = fontStretch expanded -- | weight thicc = fontWeight bold + thinn = fontWeight normal -- | style norm = fontStyle normal + lean = fontStyle italic -- | "smallcaps" is already taken by Clay smol = fontVariant smallCaps lower = textTransform lowercase + upper = textTransform uppercase -- | font sizing @@ -48,21 +52,21 @@ fontRoot = Assets.cdnEdge <> "/old-assets/fonts/eurostile/Eurostile" -- | font faces fonts :: Css fonts = - mconcat - $ mkEuro - </ [ ("-Reg.otf" , OpenType, fontWeight normal <> fontStyle normal) - , ("LTStd-Bold.otf" , OpenType, thicc <> norm) - , ("LTStd-Cn.otf" , OpenType, slim <> norm) - , ("LTStd-Ex2.otf" , OpenType, wide <> norm) - , ("LTStd-BoldCn.otf" , OpenType, slim <> thicc) - , ("LTStd-BoldEx2.otf", OpenType, wide <> thicc) - ] - where - mkEuro :: (Text, FontFaceFormat, Css) -> Css - mkEuro (sufx, fmt, extra) = fontFace $ do - fontFamily ["Eurostile"] [] - fontFaceSrc [FontFaceSrcUrl (fontRoot <> sufx) $ Just fmt] - extra + mconcat $ + mkEuro + </ [ ("-Reg.otf", OpenType, fontWeight normal <> fontStyle normal), + ("LTStd-Bold.otf", OpenType, thicc <> norm), + ("LTStd-Cn.otf", OpenType, slim <> norm), + ("LTStd-Ex2.otf", OpenType, wide <> norm), + ("LTStd-BoldCn.otf", OpenType, slim <> thicc), + ("LTStd-BoldEx2.otf", OpenType, wide <> thicc) + ] + where + mkEuro :: (Text, FontFaceFormat, Css) -> Css + mkEuro (sufx, fmt, extra) = fontFace $ do + fontFamily ["Eurostile"] [] + fontFaceSrc [FontFaceSrcUrl (fontRoot <> sufx) $ Just fmt] + extra -- TODO: add the below to Clay.Font upstream |