1{-# OPTIONS_GHC -Wall #-}
2{-# LANGUAGE OverloadedStrings #-}
3{-# LANGUAGE QuasiQuotes #-}
4module Develop.Generate.Help
11import qualified Data.ByteString.Builder as B
12import Data.Monoid ((<>))
13import qualified Data.Name as Name
14import Text.RawString.QQ (r)
16import qualified Json.Encode as Encode
23makePageHtml :: Name.Name -> Maybe Encode.Value -> B.Builder
24makePageHtml moduleName maybeFlags =
28 <meta charset="UTF-8">
29 <link type="text/css" rel="stylesheet" href="/_elm/styles.css">
30 <script src="/_elm/elm.js"></script>
34Elm.|] <> Name.toBuilder moduleName <> [r|.init({ flags: |] <> maybe "undefined" Encode.encode maybeFlags <> [r| });
45makeCodeHtml :: FilePath -> B.Builder -> B.Builder
46makeCodeHtml title code =
50 <meta charset="UTF-8">
51 <title>|] <> B.stringUtf8 title <> [r|</title>
52 <style type="text/css">
53 @import url(/_elm/source-code-pro.ttf);
54 html, head, body, pre { margin: 0; height: 100%; }
55 body { font-family: "Source Code Pro", monospace; }
57 <link type="text/css" rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.3.0/styles/default.min.css">
58 <script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.3.0/highlight.min.js"></script>
59 <script>if (hljs) { hljs.initHighlightingOnLoad(); }</script>
61<body style="background-color: #F0F0F0;">
62<pre><code>|] <> code <> [r|</code></pre>
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