From 61e21346a6947327bf5394f6c73499621c494986 Mon Sep 17 00:00:00 2001 From: Ben Sima Date: Fri, 10 Apr 2020 16:33:00 -0700 Subject: Deploy herocomics.app production server This also includes some drive-by formatting changes and config changes needed to get it up and running. --- Com/MusicMeetsComics/Look/Typography.hs | 78 ++++++++++++++------------------- 1 file changed, 34 insertions(+), 44 deletions(-) (limited to 'Com/MusicMeetsComics/Look') diff --git a/Com/MusicMeetsComics/Look/Typography.hs b/Com/MusicMeetsComics/Look/Typography.hs index bb9fc01..152662a 100644 --- a/Com/MusicMeetsComics/Look/Typography.hs +++ b/Com/MusicMeetsComics/Look/Typography.hs @@ -4,80 +4,70 @@ module Com.MusicMeetsComics.Look.Typography where import Clay -import Clay.Stylesheet (key) -import qualified Com.MusicMeetsComics.Assets as Assets +import Clay.Stylesheet ( key ) +import qualified Com.MusicMeetsComics.Assets as Assets import Com.Simatime.Alpha -import Data.Semigroup ((<>)) -import Protolude +import Data.Semigroup ( (<>) ) main :: Css main = fonts ---------------------------------------------------------------------------------- -- font modifiers ---------------------------------------------------------------------------------- -euro, slim, wide, thicc, thinn, norm, lean, - smol, lower, upper :: Css +euro, slim, wide, thicc, thinn, norm, lean, smol, lower, upper :: Css -euro = fontFamily ["Eurostile"] [sansSerif] +euro = fontFamily ["Eurostile"] [sansSerif] --- stretch -slim = fontStretch condensed -wide = fontStretch expanded +-- | stretch +slim = fontStretch condensed +wide = fontStretch expanded --- weight +-- | weight thicc = fontWeight bold thinn = fontWeight normal --- style -norm = fontStyle normal -lean = fontStyle italic +-- | style +norm = fontStyle normal +lean = fontStyle italic --- "smallcaps" is already taken by Clay -smol = fontVariant smallCaps +-- | "smallcaps" is already taken by Clay +smol = fontVariant smallCaps lower = textTransform lowercase upper = textTransform uppercase ---------------------------------------------------------------------------------- --- font sizing ---------------------------------------------------------------------------------- +-- | font sizing -- | apparently "coat" is a synonym for "size" coat :: Double -> Css coat = fontSize . Clay.rem ---------------------------------------------------------------------------------- --- font faces ---------------------------------------------------------------------------------- - fontRoot :: Text fontRoot = Assets.cdnEdge <> "/old-assets/fonts/eurostile/Eurostile" +-- | font faces fonts :: Css -fonts = mconcat $ mkEuro 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 - - ---------------------------------------------------------------------------------- +fonts = + mconcat + $ mkEuro + 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 ---------------------------------------------------------------------------------- newtype FontStretch = FontStretch Value - deriving (Val, Inherit, Normal, Other) + deriving (Val, Inherit, Normal, Other) expanded :: FontStretch expanded = FontStretch "expanded" -- cgit v1.2.3