1 # @squeep/html-template-helper
3 Simplistic helpers for rendering HTML and boilerplate.
5 Specific to Squeep Framework Applications, this module has strong opinions and makes many assumptions.
9 `htmlPage(pagePathLevel, ctx, options, main = [])`
13 The context is referenced for authenticated user information, as well as messaging.
15 - `ctx.session.authenticatedIdentifier`
16 - `ctx.session.authenticatedProfile`
18 If either of these are present, a navigation link is added to the page header allowing the user to log out.
19 The link will point relatively to `/admin/logout`.
23 If present, added as a query parameter (`r`, for redirect) to the logout link.
28 Lists of errors and notices to show at top of page, before main content.
32 - `options.pageTitle` - title and h1
33 - `options.headElements` - list of items added to <head>
34 - `options.bodyAttributes` - object entries get mapped to k="v", included on body element
35 - `options.logoUrl` - appears beside h1 if set
36 - `options.footerEntries` - array of content at bottom of page
37 - `options.navLink` - array of {href, text, class} included in page header
38 - `options.errorHeading` - h2 for error section
39 - `options.errorContent` - additional information included ahead of list of errors
40 - `options.notificationHeading` - h2 for notice section
41 - `options.notificationContent` - additional information included ahead of list of notices