1{-# LANGUAGE OverloadedStrings #-}
2{-# LANGUAGE QuasiQuotes #-}
9import qualified Data.ByteString.Builder as B
10import Data.Monoid ((<>))
11import qualified Data.Name as Name
12import Text.RawString.QQ (r)
19sandwich :: Name.Name -> B.Builder -> B.Builder
20sandwich moduleName javascript =
21 let name = Name.toBuilder moduleName in
25 <meta charset="UTF-8">
26 <title>|] <> name <> [r|</title>
27 <style>body { padding: 0; margin: 0; }</style>
33This is a headless program, meaning there is nothing to show here.
35I started the program anyway though!
37You can access it as `app` in the developer console.
41|] <> javascript <> [r|
44 var app = Elm.|] <> name <> [r|.init({ node: document.getElementById("elm") });
46 // display initialization errors (e.g. bad flags, infinite recursion)
47 document.getElementById("elm").innerText = e;
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