Rename 12 to 14 and 11 to 13

This commit is contained in:
Richard Feldman
2016-09-04 16:23:56 -07:00
parent d4e291d074
commit d8380e1763
25 changed files with 0 additions and 0 deletions

26
part13/Page.elm Normal file
View File

@@ -0,0 +1,26 @@
module Page exposing (..)
import Navigation
import UrlParser exposing (Parser, (</>), format, int, s, string)
import String
type Page
= Home
| Repository String String
| NotFound
pageParser : Parser (Page -> a) a
pageParser =
UrlParser.oneOf
[ format Home (s "")
, format Repository (s "repositories" </> string </> string)
]
parser : Navigation.Location -> Result String Page
parser location =
location.pathname
|> String.dropLeft 1
|> UrlParser.parse identity pageParser