~alcinnz/rhapsode

51363e58abf555d165da1279db5cee677a4d2672 — Adrian Cochrane 3 years ago df33111
Style <summary> as links, play the dading.
1 files changed, 3 insertions(+), 1 deletions(-)

M src/Render.hs
M src/Render.hs => src/Render.hs +3 -1
@@ 132,8 132,10 @@ testVisited hist base val = uriToText url `Trie.member` hist
    uriToText uri = pack $ uriToString id uri ""

rhapsodePseudoFilter url hist =
    -- Note: not all links must have an href tag, but it's not a bad approximation visited links must.
    -- Doing it this way is easier to implement in Haskell Stylist.
    CSSPseudo.addTest "visited" Nothing "href" (CSSSel.PropertyFunc $ testVisited hist url) $
    CSSPseudo.addRewrite "link" "[src], [href]" $
    CSSPseudo.addRewrite "link" "[src], [href], details > summary" $
    CSSPseudo.addRewrite' "target" (targetSel $ uriFragment url) $
    CSSPseudo.htmlPsuedoFilter Style.queryableStyleSheet