website/frontend/src/Pages/HyperBlog.elm
2024-12-14 23:59:50 -06:00

108 lines
2.1 KiB
Elm
Executable file

module Pages.HyperBlog exposing (Model, Msg, page)
import Config.Data.Identity exposing (pageNames)
import Config.Helpers.CardFormat as C exposing (underConstructionMaker)
import Config.Helpers.Response
exposing
( pageList
, topLevelContainer
)
import Config.Helpers.Viewport exposing (resetViewport)
import Config.Pages.Headers.Helpers exposing (headerMaker)
import Config.Pages.Headers.Pages.NutriDex exposing (nutriDexHeader)
import Config.Pages.HyperBlog.Helpers exposing (..)
import Config.Style.Colour as T exposing (..)
import Config.Style.Icons.Icons exposing (construction)
import Effect exposing (Effect)
import Element as E exposing (..)
import Layouts
import Page exposing (Page)
import Route exposing (Route)
import Shared exposing (..)
import View exposing (View)
page : Shared.Model -> Route () -> Page Model Msg
page shared route =
Page.new
{ init = init
, update = update
, subscriptions = subscriptions
, view = view shared
}
|> Page.withLayout toLayout
toLayout : Model -> Layouts.Layout Msg
toLayout model =
Layouts.Navbar {}
-- INIT
type alias Model =
{}
init : () -> ( Model, Effect Msg )
init () =
( {}
, Effect.map
(\_ -> NoOp)
(Effect.sendCmd resetViewport)
)
-- UPDATE
type Msg
= NoOp
update : Msg -> Model -> ( Model, Effect Msg )
update msg model =
case msg of
NoOp ->
( model
, Effect.none
)
-- SUBSCRIPTIONS
subscriptions : Model -> Sub Msg
subscriptions model =
Sub.none
-- VIEW
view : Shared.Model -> Model -> View Msg
view shared model =
{ title = pageNames.pageHyperBlog
, attributes = []
, element = hyperBlogContainer shared.device
}
hyperBlogContainer : Device -> Element msg
hyperBlogContainer device =
topLevelContainer (hyperBlogList device)
hyperBlogList : Device -> Element msg
hyperBlogList device =
column pageList <|
List.concat
(case ( device.class, device.orientation ) of
_ ->
[ [ C.underConstructionMaker (String.toUpper pageNames.pageHyperBlog) ] ]
)