1{-# LANGUAGE OverloadedStrings #-}
2module GenerateHtml (generateHtml) where
4import Text.Blaze (preEscapedToMarkup)
5import qualified Text.Blaze.Html5 as H
6import Text.Blaze.Html5 ((!))
7import qualified Text.Blaze.Html5.Attributes as A
9css = preEscapedToMarkup $
10 ("* { padding:0; margin:0; \
11 \hyphens: auto; -moz-hyphens: auto;\
12 \ -webkit-hyphens: auto; -ms-hyphens: auto; }\
13 \body { font-family: Arial; }\
14 \a:link {text-decoration: none}\
15 \a:visited {text-decoration: none}\
16 \a:active {text-decoration: none}\
17 \a:hover {text-decoration: underline; color: #ff8f12;}" :: String)
19makeScript :: String -> H.Html
20makeScript s = H.script ! A.type_ "text/javascript" ! A.src (H.toValue s) $ ""
22generateHtml libLoc title source =
25 H.meta ! A.charset "UTF-8"
26 H.title . H.toHtml $ title
28 (H.script ! A.type_ "text/javascript") . preEscapedToMarkup $ source
29 H.style ! A.type_ "text/css" $ css
31 H.div ! A.id "widthChecker" ! A.style "width:100%; height:1px; position:absolute; top:-1px;" $ ""
32 H.span ! A.id "content" $ ""
33 H.script ! A.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