mirror of
https://github.com/dillonkearns/elm-pages-v3-beta.git
synced 2024-11-28 14:34:18 +03:00
Fix repos example.
This commit is contained in:
parent
04ee10c17a
commit
89aaa4a764
@ -1,12 +1,10 @@
|
||||
module Page.Index exposing (Data, Model, Msg, page)
|
||||
|
||||
import DataSource exposing (DataSource)
|
||||
import Element exposing (Element)
|
||||
import Head
|
||||
import Head.Seo as Seo
|
||||
import Page exposing (Page, PageWithState, StaticPayload)
|
||||
import Pages.ImagePath as ImagePath
|
||||
import Shared
|
||||
import Pages.Url
|
||||
import View exposing (View)
|
||||
|
||||
|
||||
@ -44,7 +42,7 @@ head static =
|
||||
{ canonicalUrlOverride = Nothing
|
||||
, siteName = "elm-pages"
|
||||
, image =
|
||||
{ url = ImagePath.build [ "TODO" ]
|
||||
{ url = Pages.Url.external "TODO"
|
||||
, alt = "elm-pages logo"
|
||||
, dimensions = Nothing
|
||||
, mimeType = Nothing
|
||||
@ -64,4 +62,4 @@ view :
|
||||
StaticPayload Data RouteParams
|
||||
-> View Msg
|
||||
view static =
|
||||
Document.placeholder "Index"
|
||||
View.placeholder "Index"
|
||||
|
@ -4,7 +4,7 @@ import Browser.Navigation
|
||||
import DataSource
|
||||
import Html exposing (Html)
|
||||
import Pages.Flags
|
||||
import Pages.PagePath exposing (PagePath)
|
||||
import Path exposing (Path)
|
||||
import SharedTemplate exposing (SharedTemplate)
|
||||
import View exposing (View)
|
||||
|
||||
@ -23,7 +23,7 @@ template =
|
||||
|
||||
type Msg
|
||||
= OnPageChange
|
||||
{ path : PagePath
|
||||
{ path : Path
|
||||
, query : Maybe String
|
||||
, fragment : Maybe String
|
||||
}
|
||||
@ -49,7 +49,7 @@ init :
|
||||
->
|
||||
Maybe
|
||||
{ path :
|
||||
{ path : PagePath
|
||||
{ path : Path
|
||||
, query : Maybe String
|
||||
, fragment : Maybe String
|
||||
}
|
||||
@ -72,7 +72,7 @@ update msg model =
|
||||
( model, Cmd.none )
|
||||
|
||||
|
||||
subscriptions : PagePath -> Model -> Sub Msg
|
||||
subscriptions : Path -> Model -> Sub Msg
|
||||
subscriptions _ _ =
|
||||
Sub.none
|
||||
|
||||
@ -85,12 +85,12 @@ data =
|
||||
view :
|
||||
Data
|
||||
->
|
||||
{ path : PagePath
|
||||
{ path : Path
|
||||
, frontmatter : route
|
||||
}
|
||||
-> Model
|
||||
-> (Msg -> msg)
|
||||
-> View Msg
|
||||
-> View msg
|
||||
-> { body : Html msg, title : String }
|
||||
view sharedData page model toMsg pageView =
|
||||
{ body = Html.div [] pageView.body
|
||||
|
@ -51,7 +51,7 @@ siteMap allRoutes =
|
||||
|> List.filterMap identity
|
||||
|> List.map
|
||||
(\route ->
|
||||
{ path = Route.routeToPath (Just route) |> String.join "/"
|
||||
{ path = Route.routeToPath route |> String.join "/"
|
||||
, lastMod = Nothing
|
||||
}
|
||||
)
|
||||
|
Loading…
Reference in New Issue
Block a user