Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- clay :: (KeyDoesNotExist l lts, RecCopy lts lts (Sort ((l := Path '[] Open) ': lts)), KnownNat (RecSize lts), KnownNat ((RecSize (Sort ((l := Path '[] Open) ': lts)) - RecTyIdxH 0 l (Sort ((l := Path '[] Open) ': lts))) - 1), KnownSymbol l) => FldProxy l -> String -> Css -> (ReadWritePool, Rec lts, TsSpockCtxT lts0 xs sess ()) -> (ReadWritePool, Record ((l := Path '[] Open) ': lts), TsSpockCtxT lts0 xs sess ())
Documentation
:: (KeyDoesNotExist l lts, RecCopy lts lts (Sort ((l := Path '[] Open) ': lts)), KnownNat (RecSize lts), KnownNat ((RecSize (Sort ((l := Path '[] Open) ': lts)) - RecTyIdxH 0 l (Sort ((l := Path '[] Open) ': lts))) - 1), KnownSymbol l) | |
=> FldProxy l | Label to access this stylesheet |
-> String | Base URL for this sheet |
-> Css |
|
-> (ReadWritePool, Rec lts, TsSpockCtxT lts0 xs sess ()) | |
-> (ReadWritePool, Record ((l := Path '[] Open) ': lts), TsSpockCtxT lts0 xs sess ()) |
Serve a Css
instance. The rendered CSS will be served from a .css
file whose name is derived from the rendered sheet's contents. This has two
results: changing the stylesheet will change the sheet's full URL, and the
stylesheet really needs to be referenced by label, using something like
showPath
. The first one of those is actually really nice,
since browsers are so aggressive about caching css. The second one is more
convenient anyhow, so this function is just pretty nice.