Skip to content

Commit

Permalink
support an extra set of html elements when rendering app document
Browse files Browse the repository at this point in the history
  • Loading branch information
hojberg committed Aug 28, 2023
1 parent 731f197 commit 5922b99
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions src/UI/AppDocument.elm
Original file line number Diff line number Diff line change
Expand Up @@ -78,10 +78,15 @@ viewAnnouncement content =


view : AppDocument msg -> Document msg
view { pageId, title, announcement, appHeader, pageHeader, page, modal } =
view appDoc =
view_ appDoc []


view_ : AppDocument msg -> List (Html msg) -> Document msg
view_ { pageId, title, announcement, appHeader, pageHeader, page, modal } extra =
{ title = title ++ " | Unison Share"
, body =
[ div
div
[ id "app"
, class pageId
]
Expand All @@ -91,5 +96,5 @@ view { pageId, title, announcement, appHeader, pageHeader, page, modal } =
, page
, Maybe.withDefault UI.nothing modal
]
]
:: extra
}

0 comments on commit 5922b99

Please sign in to comment.