This page describes how the extra styles for the front page of this site are generated.
Preamble
As usual, we start with defining the main module, module imports, and writing the CSS stylesheet to standard output.
module Main (main) where
import Clay
import Clay.Media qualified as Media
import Web.Site.Styles (narrowWidth)
main :: IO ()
= putCss frontStyle main
Latest updates
The front page may optionally include the latest update. It will style it a little bit differently than an update normally would be. This is so that the update will not be confused with the rest of the front page. It is this extra bit of styling that is done for the front page.
frontStyle :: Css
= do
frontStyle ".latest-update" ? do
$ em 1
sym padding
$ do
query Media.all [Media.minWidth narrowWidth] ".latest-update" ? do
$ em 2
sym margin $ em 2
sym padding
$ do
query Media.all [Media.prefersColorScheme Media.light] ".latest-update" ? do
2) solid $ rgb 20 20 50
border (px $ rgb 250 250 250
backgroundColor
$ do
query Media.all [Media.prefersColorScheme Media.dark] ".latest-update" ? do
2) solid $ rgb 230 230 200
border (px $ rgb 5 5 5 backgroundColor