From 1be85a0c0c87340226caecf85c4ee72fa3f2f2a9 Mon Sep 17 00:00:00 2001 From: sabadev Date: Wed, 17 Mar 2021 06:56:06 -0400 Subject: [PATCH] Added link colors. --- src/Server.hs | 2 +- src/StyleSheet.hs | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) 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 -- 2.20.1