From 5536591ea03599e67485ff96f4458513d4a7cfa3 Mon Sep 17 00:00:00 2001 From: Dillon Kearns Date: Thu, 31 Mar 2022 11:04:05 -0700 Subject: [PATCH] Add a navbar. --- examples/pokedex/app/Shared.elm | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/examples/pokedex/app/Shared.elm b/examples/pokedex/app/Shared.elm index 2118e52c..91a91100 100644 --- a/examples/pokedex/app/Shared.elm +++ b/examples/pokedex/app/Shared.elm @@ -3,6 +3,7 @@ module Shared exposing (Data, Model, Msg(..), SharedMsg(..), template) import DataSource import Effect exposing (Effect) import Html exposing (Html) +import Html.Attributes as Attr import Pages.Flags import Pages.PageUrl exposing (PageUrl) import Path exposing (Path) @@ -94,6 +95,26 @@ view : -> View msg -> { body : Html msg, title : String } view sharedData page model toMsg pageView = - { body = Html.div [] pageView.body + { body = + Html.div + [] + [ Html.nav + [ Attr.style "display" "flex" + , Attr.style "justify-content" "space-evenly" + ] + [ Route.Index + |> Route.link + [] + [ Html.text "Home" ] + , Route.PokedexNumber_ { pokedexNumber = "0" } + |> Route.link + [] + [ Html.text "To 404 page" ] + ] + , Html.div + [ Attr.style "padding" "40px" + ] + pageView.body + ] , title = pageView.title }