2021-12-28 01:22:59 +03:00
|
|
|
module Page.Hex.Hex_ exposing (Data, Model, Msg, page)
|
|
|
|
|
|
|
|
import ColorHelpers
|
|
|
|
import DataSource exposing (DataSource)
|
|
|
|
import Page exposing (Page, PageWithState, StaticPayload)
|
|
|
|
|
|
|
|
|
|
|
|
type alias Model =
|
|
|
|
{}
|
|
|
|
|
|
|
|
|
|
|
|
type alias Msg =
|
2022-01-06 01:09:37 +03:00
|
|
|
()
|
2021-12-28 01:22:59 +03:00
|
|
|
|
|
|
|
|
|
|
|
type alias RouteParams =
|
|
|
|
{ hex : String }
|
|
|
|
|
|
|
|
|
|
|
|
type alias Data =
|
|
|
|
ColorHelpers.Data
|
|
|
|
|
|
|
|
|
|
|
|
page : Page RouteParams Data
|
|
|
|
page =
|
|
|
|
Page.preRenderWithFallback
|
|
|
|
{ head = ColorHelpers.head toCssVal
|
|
|
|
, pages = pages
|
|
|
|
, data = ColorHelpers.data
|
|
|
|
}
|
|
|
|
|> Page.buildNoState { view = ColorHelpers.view toCssVal }
|
|
|
|
|
|
|
|
|
|
|
|
toCssVal : RouteParams -> String
|
|
|
|
toCssVal routeParams =
|
|
|
|
"#" ++ routeParams.hex
|
|
|
|
|
|
|
|
|
|
|
|
pages : DataSource (List RouteParams)
|
|
|
|
pages =
|
|
|
|
DataSource.succeed []
|