diff --git a/src/Aggreact/Comments/Views.hs b/src/Aggreact/Comments/Views.hs index 663541b..2278437 100644 --- a/src/Aggreact/Comments/Views.hs +++ b/src/Aggreact/Comments/Views.hs @@ -165,6 +165,7 @@ displayOneComment comment vt = do H.a ! A.href (cvt ('#':cid)) $ "ยง " H.a H.! A.href (fromString (toS ("/comments/" <> urlEncode (toS s)))) $ H.text (toS s) H.span ! A.class_ "time" $ do + H.text " " H.text . toS . approximativeDuration . realToFrac $ diffUTCTime vt (created (metas comment)) H.text " ago" H.div ! A.class_ "tohide" $ do diff --git a/src/Aggreact/Css.hs b/src/Aggreact/Css.hs index cba8525..1239800 100644 --- a/src/Aggreact/Css.hs +++ b/src/Aggreact/Css.hs @@ -60,7 +60,7 @@ base3 :: Color base3 = rgb 253 246 227 highlightColor :: Color -highlightColor = lighten 0.7 yellow +highlightColor = base3 headerstyle :: Clay.Selector -> Css headerstyle h = h ? do @@ -71,16 +71,24 @@ headerstyle h = h ? do genCss :: Css genCss = do body ? do - -- fontFamily ["Menlo"] [monospace] fontFamily ["helvetica"] [sansSerif] - fontSize (px 13) + fontSize (px 14) color (rgb 64 64 64) margin (px 0) (px 0) (px 0) (px 0) padding (px 0) (px 0) (px 0) (px 0) - ":target" ? + pre ? do + fontFamily ["Menlo"] [monospace] + fontSize (px 12) + code ? do + fontFamily ["Menlo"] [monospace] + fontSize (px 12) + ":target" ? do backgroundColor highlightColor - ":target" |+ div ? + padding (ex 1) (ex 1) (ex 1) (ex 1) + ":target" |+ div ? do backgroundColor highlightColor + padding (ex 1) (ex 1) (ex 1) (ex 1) + borderBottom solid (px 4) base2 header ? do width (pct 100) background base3 @@ -141,6 +149,8 @@ genCss = do borderLeft solid (px 0) solblue borderRight solid (px 0) solblue backgroundColor base2 + padding (ex 1) (ex 1) (ex 1) (ex 1) + margin (ex 1) (ex 1) (ex 1) (ex 0) hover & do backgroundColor base3 cursor pointer