@@ -2,14 +2,14 @@ module Shared exposing (Data, Model, Msg(..), SharedMsg(..), template)
22
33import BackendTask exposing (BackendTask)
44import Effect exposing (Effect)
5+import Element exposing (..)
56import FatalError exposing (FatalError)
67import Html exposing (Html)
7−import Html.Events
88import Pages.Flags
99import Pages.PageUrl exposing (PageUrl)
10−import UrlPath exposing (UrlPath)
1110import Route exposing (Route)
1211import SharedTemplate exposing (SharedTemplate)
12+import UrlPath exposing (UrlPath)
1313import View exposing (View)
1414
1515
@@ -26,7 +26,6 @@ template =
2626
2727type Msg
2828 = SharedMsg SharedMsg
29− | MenuClicked
3029
3130
3231type alias Data =
@@ -38,8 +37,7 @@ type SharedMsg
3837
3938
4039type alias Model =
41− { showMenu : Bool
42− }
40+ {}
4341
4442
4543init :
@@ -56,7 +54,7 @@ init :
5654 }
5755 -> ( Model, Effect Msg )
5856init flags maybePagePath =
59− ( { showMenu = False }
57+ ( {}
6058 , Effect.none
6159 )
6260
@@ -67,9 +65,6 @@ update msg model =
6765 SharedMsg globalMsg ->
6866 ( model, Effect.none )
6967
70− MenuClicked ->
71− ( { model | showMenu = not model.showMenu }, Effect.none )
72−
7368
7469subscriptions : UrlPath -> Model -> Sub Msg
7570subscriptions _ _ =
@@ -93,28 +88,6 @@ view :
9388 -> { body : List (Html msg), title : String }
9489view sharedData page model toMsg pageView =
9590 { body =
96− [ Html.nav []
97− [ Html.button
98− [ Html.Events.onClick MenuClicked ]
99− [ Html.text
100− (if model.showMenu then
101− "Close Menu"
102−
103− else
104− "Open Menu"
105− )
106− ]
107− , if model.showMenu then
108− Html.ul []
109− [ Html.li [] [ Html.text "Menu item 1" ]
110− , Html.li [] [ Html.text "Menu item 2" ]
111− ]
112−
113− else
114− Html.text ""
115− ]
116− |> Html.map toMsg
117− , Html.main_ [] pageView.body
118− ]
91+ [ layout [] pageView.body ]
11992 , title = pageView.title
12093 }