From: sabadev Date: Wed, 17 Mar 2021 10:56:06 +0000 (-0400) Subject: Added link colors. X-Git-Url: http://sabadev.xyz:4321/?a=commitdiff_plain;h=1be85a0c0c87340226caecf85c4ee72fa3f2f2a9;p=website.git Added link colors. --- diff --git a/src/Server.hs b/src/Server.hs index 220d141..cf0a6b8 100644 --- a/src/Server.hs +++ b/src/Server.hs @@ -50,7 +50,7 @@ darkTheme = pure $ darkStyle C.saddlebrown -- TODO Modify this endpoint to take in a single hex colour value and produce a stylesheet from it. The strategy used here should be the inverse of the one used by the dark path. lightTheme :: Handler C.Css -lightTheme = pure $ lightStyle C.saddlebrown +lightTheme = pure $ lightStyle C.blanchedalmond htmlContainer :: Html a -> Handler (Html ()) htmlContainer contents = do diff --git a/src/StyleSheet.hs b/src/StyleSheet.hs index 074e996..90b32ed 100644 --- a/src/StyleSheet.hs +++ b/src/StyleSheet.hs @@ -13,8 +13,13 @@ lightStyle = makeStyle darken makeStyle :: ColorAction -> Color -> Css makeStyle colorAction themeColor = do bodyStyle colorAction themeColor + linkStyle colorAction themeColor bodyStyle :: ColorAction -> Color -> Css bodyStyle action themeColor = body ? do backgroundColor themeColor fontColor $ action 0.75 themeColor + +linkStyle :: ColorAction -> Color -> Css +linkStyle action themeColor = a ? do + fontColor $ action 0.60 $ themeColor +. 0x40