website/frontend/src/Layouts/Navbar.elm

108 lines
3.1 KiB
Elm
Raw Normal View History

2024-11-11 03:57:54 -06:00
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
2024-11-11 18:57:51 -06:00
-- image [spacing 30, width <| px 150] {src = "navbar/nutrivorelogo.png", description = ""}
2024-11-11 03:57:54 -06:00
-- VIEW
view : { toContentMsg : Msg -> contentMsg, content : View contentMsg, model : Model } -> View contentMsg
view { toContentMsg, model, content } =
{ title = content.title
, attributes = [ F.family [ spartanFont ] ]
2024-11-11 18:57:51 -06:00
, element =
column
[ width fill
, height fill
, B.color colourTheme.backgroundColour
]
[ column
[ height <| px 80
, centerX
]
[ row
[ spacing 30
, centerY
, F.color colourTheme.nonHighlightedText
]
[ image [ spacing 30, width <| px 80 ] { src = "navbar/nutrivorelogo.png", description = "" }
, link nonHighlightedTitleFormat { url = "", label = transitionNonHighlightedLinkHover <| text "THE NUTRIVORE" }
, link navBarLinkFormat { url = "", label = transitionNonHighlightedLinkHover <| text "PLATFORMS" }
, link navBarLinkFormat { url = "", label = transitionNonHighlightedLinkHover <| text "SERVICES" }
, link navBarLinkFormat { url = "", label = transitionNonHighlightedLinkHover <| text "DEBATE" }
, link navBarLinkFormat { url = "", label = transitionNonHighlightedLinkHover <| text "BLOG" }
, link navBarLinkFormat { url = "", label = transitionNonHighlightedLinkHover <| text "NUTRI-DEX" }
, link navBarLinkFormat { url = "", label = transitionNonHighlightedLinkHover <| text "SUPPORT" }
, link navBarLinkFormat { url = "", label = transitionNonHighlightedLinkHover <| text "INTERVIEWS" }
, link navBarLinkFormat { url = "", label = transitionNonHighlightedLinkHover <| text "CONTACT" }
]
]
, content.element
]
2024-11-11 03:57:54 -06:00
}