1{-# LANGUAGE OverloadedStrings #-}
2module GenerateHtml (generateHtml) where
4import Text.Blaze.Html5 hiding (map)
5import qualified Text.Blaze.Html5 as H
6import Text.Blaze.Html5.Attributes
7import qualified Text.Blaze.Html5.Attributes as A
9css = preEscapedString "* { padding:0; margin:0; \
10 \hyphens: auto; -moz-hyphens: auto;\
11 \ -webkit-hyphens: auto; -ms-hyphens: auto; }\
12 \body { font-family: Arial; }\
13 \a:link {text-decoration: none}\
14 \a:visited {text-decoration: none}\
15 \a:active {text-decoration: none}\
16 \a:hover {text-decoration: underline; color: #ff8f12;}"
18makeScript :: String -> Html
19makeScript s = script ! type_ "text/javascript" ! src (toValue s) $ ""
21generateHtml libLoc title source =
24 meta ! charset "UTF-8"
25 H.title . toHtml $ title
27 (script ! type_ "text/javascript") . preEscapedString $ source
28 H.style ! type_ "text/css" $ css
30 H.div ! A.id "widthChecker" ! A.style "width:100%; height:1px; position:absolute; top:-1px;" $ ""
31 H.span ! A.id "content" $ ""
32 script ! type_ "text/javascript" $ "Dispatcher.initialize()"
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list