1{-# LANGUAGE OverloadedStrings #-}
2{-# LANGUAGE QuasiQuotes #-}
9import qualified Data.ByteString.Builder as B
10import Data.Monoid ((<>))
11import Text.RawString.QQ (r)
13import qualified Elm.Name as N
20sandwich :: N.Name -> B.Builder -> B.Builder
21sandwich moduleName javascript =
22 header <> javascript <> footer (N.toBuilder moduleName)
30 <meta charset="UTF-8">
39footer :: B.Builder -> B.Builder
43 \// It is too complicated to figure out which kind of Program you created\n\
44 \// based on only the code. So here we check for different possibilities.\n\
46 \// When you embed compiled Elm into HTML yourself, you should not copy/paste\n\
47 \// from here. Do just the part that makes sense for your application!\n\
50 \ Elm." <> name <> ".fullscreen\n\
51 \ ? Elm." <> name <> ".fullscreen()\n\
53 \ Elm." <> name <> ".embed\n\
54 \ ? Elm." <> name <> ".embed(document.getElementById('embed'))\n\
56 \ Elm." <> name <> ".worker\n\
57 \ ? (document.getElementById('embed').innerText = 'This is a headless program, meaning there is nothing to show here. I started the program anyway though, and you can access it as `app` in the developer console.', Elm." <> name <> ".worker())\n\
58 \ : (document.getElementById('embed').innerText = 'I cannot figure out what kind of program this is supposed to be. Perhaps someone on Slack can help?', undefined);\n\
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