1{-# OPTIONS_GHC -Wall #-}
2{-# LANGUAGE OverloadedStrings #-}
3{-# LANGUAGE TemplateHaskell #-}
4module Develop.StaticFiles
12import Prelude hiding (lookup)
13import qualified Data.ByteString as BS
14import Data.FileEmbed (bsToExp)
15import qualified Data.HashMap.Strict as HM
16import Language.Haskell.TH (runIO)
17import System.FilePath ((</>))
19import qualified Develop.StaticFiles.Build as Build
30lookup :: FilePath -> Maybe (BS.ByteString, MimeType)
35dict :: HM.HashMap FilePath (BS.ByteString, MimeType)
38 [ faviconPath ==> (favicon , "image/x-icon")
39 , elmPath ==> (elm , "application/javascript")
40 , cssPath ==> (css , "text/css")
41 , codeFontPath ==> (codeFont, "font/ttf")
42 , sansFontPath ==> (sansFont, "font/ttf")
46(==>) :: a -> b -> (a,b)
55faviconPath :: FilePath
60waitingPath :: FilePath
62 "_elm" </> "waiting.gif"
72 "_elm" </> "styles.css"
75codeFontPath :: FilePath
77 "_elm" </> "source-code-pro.ttf"
80sansFontPath :: FilePath
82 "_elm" </> "source-sans-pro.ttf"
91 $(bsToExp =<< runIO Build.buildReactorFrontEnd)
100 $(bsToExp =<< runIO (Build.readAsset "styles.css"))
107codeFont :: BS.ByteString
109 $(bsToExp =<< runIO (Build.readAsset "source-code-pro.ttf"))
112sansFont :: BS.ByteString
114 $(bsToExp =<< runIO (Build.readAsset "source-sans-pro.ttf"))
121favicon :: BS.ByteString
123 $(bsToExp =<< runIO (Build.readAsset "favicon.ico"))
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