60 lines
1.3 KiB
Elm
60 lines
1.3 KiB
Elm
module Pages.Top exposing (Model, Msg, page)
|
|
|
|
import Element exposing (..)
|
|
import Element.Font as Font
|
|
import Generated.Params as Params
|
|
import Generated.Routes as Routes exposing (Route, routes)
|
|
import Spa.Page
|
|
import Utils.Spa exposing (Page)
|
|
|
|
|
|
type alias Model =
|
|
()
|
|
|
|
|
|
type alias Msg =
|
|
Never
|
|
|
|
|
|
page : Page Params.Top Model Msg model msg appMsg
|
|
page =
|
|
Spa.Page.static
|
|
{ title = always "/"
|
|
, view = view
|
|
}
|
|
|
|
|
|
|
|
-- VIEW
|
|
|
|
|
|
view : Utils.Spa.PageContext -> Element Msg
|
|
view { global } =
|
|
case global.token of
|
|
Just _ ->
|
|
column
|
|
[ spacing 12
|
|
]
|
|
[ row [ spacing 14 ]
|
|
[ el [ Font.size 48, Font.semiBold ] (text "Mi")
|
|
, el [ alpha 0.5 ] (text "POSSE and stuff")
|
|
]
|
|
, text "TODO:"
|
|
, text "* POSSE"
|
|
, text "* Switch Data"
|
|
]
|
|
|
|
Nothing ->
|
|
el
|
|
[ Font.size 48, centerX, centerY ]
|
|
(link
|
|
[ Font.underline
|
|
, Font.color (rgb255 204 75 75)
|
|
, Font.size 48
|
|
, mouseOver [ alpha 0.5 ]
|
|
]
|
|
{ label = text "Login"
|
|
, url = Routes.toPath routes.signIn
|
|
}
|
|
)
|