mirror of
https://gitlab.com/upRootNutrition/website.git
synced 2025-06-16 04:25:11 -05:00
79 lines
1.4 KiB
Elm
79 lines
1.4 KiB
Elm
![]() |
module Layouts.Navbar exposing (Model, Msg, Props, layout)
|
||
|
|
||
|
import Config.Identity as ID exposing (..)
|
||
|
import Config.Theme as T exposing (..)
|
||
|
import Effect exposing (Effect)
|
||
|
import Element exposing (..)
|
||
|
import Element.Background as B
|
||
|
import Element.Font as F
|
||
|
import Element.Region exposing (description)
|
||
|
import Html exposing (Html)
|
||
|
import Html.Attributes as H exposing (class, style)
|
||
|
import Layout exposing (Layout)
|
||
|
import Route exposing (Route)
|
||
|
import Shared
|
||
|
import View exposing (View)
|
||
|
|
||
|
|
||
|
type alias Props =
|
||
|
{}
|
||
|
|
||
|
|
||
|
layout : Props -> Shared.Model -> Route () -> Layout () Model Msg contentMsg
|
||
|
layout props shared route =
|
||
|
Layout.new
|
||
|
{ init = init
|
||
|
, update = update
|
||
|
, view = view
|
||
|
, subscriptions = subscriptions
|
||
|
}
|
||
|
|
||
|
|
||
|
|
||
|
-- MODEL
|
||
|
|
||
|
|
||
|
type alias Model =
|
||
|
{}
|
||
|
|
||
|
|
||
|
init : () -> ( Model, Effect Msg )
|
||
|
init _ =
|
||
|
( {}
|
||
|
, Effect.none
|
||
|
)
|
||
|
|
||
|
|
||
|
|
||
|
-- UPDATE
|
||
|
|
||
|
|
||
|
type Msg
|
||
|
= ReplaceMe
|
||
|
|
||
|
|
||
|
update : Msg -> Model -> ( Model, Effect Msg )
|
||
|
update msg model =
|
||
|
case msg of
|
||
|
ReplaceMe ->
|
||
|
( model
|
||
|
, Effect.none
|
||
|
)
|
||
|
|
||
|
|
||
|
subscriptions : Model -> Sub Msg
|
||
|
subscriptions model =
|
||
|
Sub.none
|
||
|
|
||
|
|
||
|
|
||
|
-- VIEW
|
||
|
|
||
|
|
||
|
view : { toContentMsg : Msg -> contentMsg, content : View contentMsg, model : Model } -> View contentMsg
|
||
|
view { toContentMsg, model, content } =
|
||
|
{ title = content.title
|
||
|
, attributes = [ F.family [ spartanFont ] ]
|
||
|
, element = column [width fill, height fill] [text "some bullshit", content.element]
|
||
|
}
|