1{-# OPTIONS_GHC -Wall #-}
2{-# LANGUAGE TemplateHaskell #-}
3module Develop.StaticFiles
11import Prelude hiding (lookup)
12import qualified Data.ByteString as BS
13import Data.FileEmbed (bsToExp)
14import qualified Data.HashMap.Strict as HM
15import Language.Haskell.TH (runIO)
17import qualified Develop.StaticFiles.Build as Build
28lookup :: FilePath -> Maybe (BS.ByteString, MimeType)
33dict :: HM.HashMap FilePath (BS.ByteString, MimeType)
36 [ faviconPath ==> (favicon , "image/x-icon")
37 , waitingPath ==> (waiting , "image/gif")
38 , elmPath ==> (elm , "application/javascript")
39 , cssPath ==> (css , "text/css")
40 , codeFontPath ==> (codeFont, "font/ttf")
41 , sansFontPath ==> (sansFont, "font/ttf")
45(==>) :: a -> b -> (a,b)
54faviconPath :: FilePath
59waitingPath :: FilePath
74codeFontPath :: FilePath
76 "_elm/source-code-pro.ttf"
79sansFontPath :: FilePath
81 "_elm/source-sans-pro.ttf"
90 $(bsToExp =<< runIO Build.compile)
99 $(bsToExp =<< runIO (Build.readAsset "styles.css"))
106codeFont :: BS.ByteString
108 $(bsToExp =<< runIO (Build.readAsset "source-code-pro.ttf"))
111sansFont :: BS.ByteString
113 $(bsToExp =<< runIO (Build.readAsset "source-sans-pro.ttf"))
120favicon :: BS.ByteString
122 $(bsToExp =<< runIO (Build.readAsset "favicon.ico"))
125waiting :: BS.ByteString
127 $(bsToExp =<< runIO (Build.readAsset "waiting.gif"))
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