diff options
author | Ben Sima <ben@bsima.me> | 2022-07-18 22:09:58 -0400 |
---|---|---|
committer | Ben Sima <ben@bsima.me> | 2022-07-19 09:22:58 -0400 |
commit | bc9e5b0ea863a17537987faa5a72b00efc7767d1 (patch) | |
tree | a22df5a00c29f5612a5f6885b9e6bb9a7a56d420 /Hero/Look/Typography.hs | |
parent | f034ad709ba0de5a2e5ec6be47523f595e381d7a (diff) |
Upgrade nixpkgs, ghc923
I ended up deleting miso, and consequently all files under Hero/ and Miso/,
because I couldn't get miso to build with GHC 9.2.
Other things:
- Niv has been wrapped by Biz/Bild/Deps.hs, so I can extend it to my liking.
- Apply-refact is gone because I couldn't get it to build.
- Disabled python stuff.
Diffstat (limited to 'Hero/Look/Typography.hs')
-rw-r--r-- | Hero/Look/Typography.hs | 84 |
1 files changed, 0 insertions, 84 deletions
diff --git a/Hero/Look/Typography.hs b/Hero/Look/Typography.hs deleted file mode 100644 index 603e78b..0000000 --- a/Hero/Look/Typography.hs +++ /dev/null @@ -1,84 +0,0 @@ -{-# LANGUAGE GeneralizedNewtypeDeriving #-} -{-# LANGUAGE OverloadedStrings #-} -{-# LANGUAGE NoImplicitPrelude #-} - -module Hero.Look.Typography where - -import Alpha -import Clay -import Clay.Stylesheet (key) -import Data.Semigroup ((<>)) -import qualified Hero.Pack as Pack - -main :: Css -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 Clay.lowercase - -upper = textTransform uppercase - --- | font sizing - --- | apparently "coat" is a synonym for "size" -coat :: Double -> Css -coat = fontSize <. Clay.rem - -fontRoot :: Text -fontRoot = Pack.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 - --- TODO: add the below to Clay.Font upstream - -newtype FontStretch = FontStretch Value - deriving (Val, Inherit, Normal, Other) - -expanded :: FontStretch -expanded = FontStretch "expanded" - -condensed :: FontStretch -condensed = FontStretch "condensed" - -fontStretch :: FontStretch -> Css -fontStretch = key "font-stretch" |