mirror of
https://github.com/dillonkearns/elm-pages-v3-beta.git
synced 2024-12-25 21:02:33 +03:00
77 lines
1.4 KiB
Elm
77 lines
1.4 KiB
Elm
module Page.Links exposing (Data, Model, Msg, page)
|
|
|
|
import DataSource exposing (DataSource)
|
|
import Head
|
|
import Head.Seo as Seo
|
|
import Html.Styled as Html exposing (text)
|
|
import Html.Styled.Attributes as Attr
|
|
import Page exposing (Page, PageWithState, StaticPayload)
|
|
import Pages.PageUrl exposing (PageUrl)
|
|
import Pages.Url
|
|
import Shared
|
|
import View exposing (View)
|
|
|
|
|
|
type alias Model =
|
|
{}
|
|
|
|
|
|
type alias Msg =
|
|
()
|
|
|
|
|
|
type alias RouteParams =
|
|
{}
|
|
|
|
|
|
page : Page RouteParams Data
|
|
page =
|
|
Page.single
|
|
{ head = head
|
|
, data = data
|
|
}
|
|
|> Page.buildNoState { view = view }
|
|
|
|
|
|
type alias Data =
|
|
()
|
|
|
|
|
|
data : DataSource Data
|
|
data =
|
|
DataSource.succeed ()
|
|
|
|
|
|
head :
|
|
StaticPayload Data RouteParams
|
|
-> List Head.Tag
|
|
head static =
|
|
Seo.summary
|
|
{ canonicalUrlOverride = Nothing
|
|
, siteName = "elm-pages"
|
|
, image =
|
|
{ url = Pages.Url.external "TODO"
|
|
, alt = "elm-pages logo"
|
|
, dimensions = Nothing
|
|
, mimeType = Nothing
|
|
}
|
|
, description = "TODO"
|
|
, locale = Nothing
|
|
, title = "TODO title" -- metadata.title -- TODO
|
|
}
|
|
|> Seo.website
|
|
|
|
|
|
view :
|
|
Maybe PageUrl
|
|
-> Shared.Model
|
|
-> StaticPayload Data RouteParams
|
|
-> View Msg
|
|
view maybeUrl sharedModel static =
|
|
{ title = "Links"
|
|
, body =
|
|
[ Html.a [ Attr.href "/" ]
|
|
[ text "Root page" ]
|
|
]
|
|
}
|