mirror of
https://github.com/dillonkearns/elm-pages.git
synced 2024-09-11 09:05:28 +03:00
Fix reference.
This commit is contained in:
parent
b1cba8ce0e
commit
2136dc250c
@ -8,7 +8,7 @@ import Html.Styled as Html exposing (text)
|
||||
import Html.Styled.Attributes as Attr
|
||||
import Pages.Url
|
||||
import PagesMsg exposing (PagesMsg)
|
||||
import Path
|
||||
import UrlPath
|
||||
import Route
|
||||
import RouteBuilder exposing (App, StatefulRoute, StatelessRoute)
|
||||
import Shared
|
||||
@ -77,6 +77,6 @@ view app shared =
|
||||
{ title = "Index page"
|
||||
, body =
|
||||
[ text "This is the index page."
|
||||
, Html.div [] [ Html.a [ Attr.href (Route.SubPage |> Route.toPath |> Path.toAbsolute) ] [ text "Sub Page" ] ]
|
||||
, Html.div [] [ Html.a [ Attr.href (Route.SubPage |> Route.toPath |> UrlPath.toAbsolute) ] [ text "Sub Page" ] ]
|
||||
]
|
||||
}
|
||||
|
@ -10,7 +10,7 @@ import Html.Styled as Html exposing (..)
|
||||
import Html.Styled.Attributes as Attr
|
||||
import Pages.Url
|
||||
import PagesMsg exposing (PagesMsg)
|
||||
import Path
|
||||
import UrlPath
|
||||
import RouteBuilder exposing (App, StatefulRoute, StatelessRoute)
|
||||
import Shared
|
||||
import View exposing (View)
|
||||
@ -94,7 +94,7 @@ view app shared =
|
||||
[ text "Here is the Elm logo:"
|
||||
]
|
||||
, img
|
||||
[ Attr.src (Path.fromString "/images/elm-logo.svg" |> Path.toAbsolute)
|
||||
[ Attr.src (UrlPath.fromString "/images/elm-logo.svg" |> UrlPath.toAbsolute)
|
||||
, Attr.css [ maxWidth (rem 10) ]
|
||||
]
|
||||
[]
|
||||
|
@ -7,7 +7,7 @@ import Html exposing (Html)
|
||||
import Html.Styled
|
||||
import Pages.Flags
|
||||
import Pages.PageUrl exposing (PageUrl)
|
||||
import Path exposing (Path)
|
||||
import UrlPath exposing (UrlPath)
|
||||
import Route exposing (Route)
|
||||
import SharedTemplate exposing (SharedTemplate)
|
||||
import View exposing (View)
|
||||
@ -26,7 +26,7 @@ template =
|
||||
|
||||
type Msg
|
||||
= OnPageChange
|
||||
{ path : Path
|
||||
{ path : UrlPath
|
||||
, query : Maybe String
|
||||
, fragment : Maybe String
|
||||
}
|
||||
@ -50,7 +50,7 @@ init :
|
||||
->
|
||||
Maybe
|
||||
{ path :
|
||||
{ path : Path
|
||||
{ path : UrlPath
|
||||
, query : Maybe String
|
||||
, fragment : Maybe String
|
||||
}
|
||||
@ -71,7 +71,7 @@ update msg model =
|
||||
( { model | showMobileMenu = False }, Effect.none )
|
||||
|
||||
|
||||
subscriptions : Path -> Model -> Sub Msg
|
||||
subscriptions : UrlPath -> Model -> Sub Msg
|
||||
subscriptions _ _ =
|
||||
Sub.none
|
||||
|
||||
@ -84,7 +84,7 @@ data =
|
||||
view :
|
||||
Data
|
||||
->
|
||||
{ path : Path
|
||||
{ path : UrlPath
|
||||
, route : Maybe Route
|
||||
}
|
||||
-> Model
|
||||
|
@ -1,4 +1,4 @@
|
||||
{
|
||||
"root": "../src",
|
||||
"tests": ["Path"]
|
||||
"tests": ["UrlPath"]
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user