2026-01-01 14:41:31 -05:00
|
|
|
// Code generated by templ - DO NOT EDIT.
|
|
|
|
|
|
2026-01-01 20:49:44 -05:00
|
|
|
// templ: version: v0.3.960
|
2026-01-01 14:41:31 -05:00
|
|
|
// Code generated by wa-generator. DO NOT EDIT.
|
|
|
|
|
|
|
|
|
|
// Source: Web Awesome wa-page
|
|
|
|
|
|
|
|
|
|
package wa
|
|
|
|
|
|
|
|
|
|
//lint:file-ignore SA4006 This context is only used if a nested component is present.
|
|
|
|
|
|
|
|
|
|
import "github.com/a-h/templ"
|
|
|
|
|
import templruntime "github.com/a-h/templ/runtime"
|
|
|
|
|
|
|
|
|
|
import (
|
|
|
|
|
"github.com/a-h/templ"
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
// Pages offer an easy way to scaffold entire page layouts using minimal markup.
|
|
|
|
|
//
|
|
|
|
|
// Web Awesome component: <wa-page>
|
|
|
|
|
|
|
|
|
|
// PageProps holds all properties for the wa-page component
|
|
|
|
|
type PageProps struct {
|
|
|
|
|
// The view is a reflection of the "mobileBreakpoint", when the page is larger than the mobile-breakpoint (768px by
|
|
|
|
|
// Valid values: "mobile", "desktop"
|
|
|
|
|
View string `attr:"view"`
|
|
|
|
|
// Whether or not the navigation drawer is open. Note, the navigation drawer is only "open" on mobile views.
|
|
|
|
|
NavOpen bool `attr:"nav-open"`
|
|
|
|
|
// At what page width to hide the "navigation" slot and collapse into a hamburger button.
|
|
|
|
|
MobileBreakpoint string `attr:"mobile-breakpoint"`
|
|
|
|
|
// Where to place the navigation when in the mobile viewport.
|
|
|
|
|
// Valid values: "start", "end"
|
|
|
|
|
NavigationPlacement string `attr:"navigation-placement"`
|
|
|
|
|
// Determines whether or not to hide the default hamburger button.
|
|
|
|
|
DisableNavigationToggle bool `attr:"disable-navigation-toggle"`
|
|
|
|
|
|
|
|
|
|
// Events
|
|
|
|
|
|
|
|
|
|
// Slots contains named slot content
|
|
|
|
|
Slots PageSlots
|
|
|
|
|
|
|
|
|
|
// Attrs contains additional HTML attributes
|
|
|
|
|
Attrs templ.Attributes
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// PageSlots holds named slot content for the component
|
|
|
|
|
type PageSlots struct {
|
|
|
|
|
// The banner that gets display above the header. The banner will not be shown if no content is provided.
|
|
|
|
|
Banner templ.Component
|
|
|
|
|
// The header to display at the top of the page. If a banner is present, the header will appear below the banner. The he...
|
|
|
|
|
Header templ.Component
|
|
|
|
|
// A subheader to display below the header. This is a good place to put things like breadcrumbs.
|
|
|
|
|
Subheader templ.Component
|
|
|
|
|
// The left side of the page. If you slot an element in here, you will override the default navigation slot and will be ...
|
|
|
|
|
Menu templ.Component
|
|
|
|
|
// The header for a navigation area. On mobile this will be the header for <wa-drawer>.
|
|
|
|
|
NavigationHeader templ.Component
|
|
|
|
|
// The main content to display in the navigation area. This is displayed on the left side of the page, if menu is not us...
|
|
|
|
|
Navigation templ.Component
|
|
|
|
|
// The footer for a navigation area. On mobile this will be the footer for <wa-drawer>.
|
|
|
|
|
NavigationFooter templ.Component
|
|
|
|
|
// Use this slot to slot in your own button + icon for toggling the navigation drawer. By default it is a <wa-button> + ...
|
|
|
|
|
NavigationToggle templ.Component
|
|
|
|
|
// Use this to slot in your own icon for toggling the navigation drawer. By default it is 3 bars <wa-icon>.
|
|
|
|
|
NavigationToggleIcon templ.Component
|
|
|
|
|
// Header to display inline above the main content.
|
|
|
|
|
MainHeader templ.Component
|
|
|
|
|
// Footer to display inline below the main content.
|
|
|
|
|
MainFooter templ.Component
|
|
|
|
|
// Content to be shown on the right side of the page. Typically contains a table of contents, ads, etc. This section "st...
|
|
|
|
|
Aside templ.Component
|
|
|
|
|
// The "skip to content" slot. You can override this If you would like to override the Skip to content button and add ad...
|
|
|
|
|
SkipToContent templ.Component
|
|
|
|
|
// The content to display in the footer. This is always displayed underneath the viewport so will always make the page "...
|
|
|
|
|
Footer templ.Component
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// PageBuilder provides a fluent API for constructing PageProps
|
|
|
|
|
type PageBuilder struct {
|
|
|
|
|
props PageProps
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// NewPage creates a new builder for wa-page
|
|
|
|
|
func NewPage() *PageBuilder {
|
|
|
|
|
return &PageBuilder{}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// View sets the view attribute
|
|
|
|
|
// The view is a reflection of the "mobileBreakpoint", when the page is larger than the mobile-breakpoint (768px by
|
|
|
|
|
func (b *PageBuilder) View(v string) *PageBuilder {
|
|
|
|
|
b.props.View = v
|
|
|
|
|
return b
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// NavOpen sets the nav-open attribute
|
|
|
|
|
// Whether or not the navigation drawer is open. Note, the navigation drawer is only "open" on mobile views.
|
|
|
|
|
func (b *PageBuilder) NavOpen(v bool) *PageBuilder {
|
|
|
|
|
b.props.NavOpen = v
|
|
|
|
|
return b
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// MobileBreakpoint sets the mobile-breakpoint attribute
|
|
|
|
|
// At what page width to hide the "navigation" slot and collapse into a hamburger button.
|
|
|
|
|
func (b *PageBuilder) MobileBreakpoint(v string) *PageBuilder {
|
|
|
|
|
b.props.MobileBreakpoint = v
|
|
|
|
|
return b
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// NavigationPlacement sets the navigation-placement attribute
|
|
|
|
|
// Where to place the navigation when in the mobile viewport.
|
|
|
|
|
func (b *PageBuilder) NavigationPlacement(v string) *PageBuilder {
|
|
|
|
|
b.props.NavigationPlacement = v
|
|
|
|
|
return b
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// DisableNavigationToggle sets the disable-navigation-toggle attribute
|
|
|
|
|
// Determines whether or not to hide the default hamburger button.
|
|
|
|
|
func (b *PageBuilder) DisableNavigationToggle(v bool) *PageBuilder {
|
|
|
|
|
b.props.DisableNavigationToggle = v
|
|
|
|
|
return b
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// BannerSlot sets the banner slot content
|
|
|
|
|
// The banner that gets display above the header. The banner will not be shown if no content is provided.
|
|
|
|
|
func (b *PageBuilder) BannerSlot(c templ.Component) *PageBuilder {
|
|
|
|
|
b.props.Slots.Banner = c
|
|
|
|
|
return b
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// HeaderSlot sets the header slot content
|
|
|
|
|
// The header to display at the top of the page. If a banner is present, the header will appear below the banner. The he...
|
|
|
|
|
func (b *PageBuilder) HeaderSlot(c templ.Component) *PageBuilder {
|
|
|
|
|
b.props.Slots.Header = c
|
|
|
|
|
return b
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// SubheaderSlot sets the subheader slot content
|
|
|
|
|
// A subheader to display below the header. This is a good place to put things like breadcrumbs.
|
|
|
|
|
func (b *PageBuilder) SubheaderSlot(c templ.Component) *PageBuilder {
|
|
|
|
|
b.props.Slots.Subheader = c
|
|
|
|
|
return b
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// MenuSlot sets the menu slot content
|
|
|
|
|
// The left side of the page. If you slot an element in here, you will override the default navigation slot and will be ...
|
|
|
|
|
func (b *PageBuilder) MenuSlot(c templ.Component) *PageBuilder {
|
|
|
|
|
b.props.Slots.Menu = c
|
|
|
|
|
return b
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// NavigationHeaderSlot sets the navigation-header slot content
|
|
|
|
|
// The header for a navigation area. On mobile this will be the header for <wa-drawer>.
|
|
|
|
|
func (b *PageBuilder) NavigationHeaderSlot(c templ.Component) *PageBuilder {
|
|
|
|
|
b.props.Slots.NavigationHeader = c
|
|
|
|
|
return b
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// NavigationSlot sets the navigation slot content
|
|
|
|
|
// The main content to display in the navigation area. This is displayed on the left side of the page, if menu is not us...
|
|
|
|
|
func (b *PageBuilder) NavigationSlot(c templ.Component) *PageBuilder {
|
|
|
|
|
b.props.Slots.Navigation = c
|
|
|
|
|
return b
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// NavigationFooterSlot sets the navigation-footer slot content
|
|
|
|
|
// The footer for a navigation area. On mobile this will be the footer for <wa-drawer>.
|
|
|
|
|
func (b *PageBuilder) NavigationFooterSlot(c templ.Component) *PageBuilder {
|
|
|
|
|
b.props.Slots.NavigationFooter = c
|
|
|
|
|
return b
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// NavigationToggleSlot sets the navigation-toggle slot content
|
|
|
|
|
// Use this slot to slot in your own button + icon for toggling the navigation drawer. By default it is a <wa-button> + ...
|
|
|
|
|
func (b *PageBuilder) NavigationToggleSlot(c templ.Component) *PageBuilder {
|
|
|
|
|
b.props.Slots.NavigationToggle = c
|
|
|
|
|
return b
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// NavigationToggleIconSlot sets the navigation-toggle-icon slot content
|
|
|
|
|
// Use this to slot in your own icon for toggling the navigation drawer. By default it is 3 bars <wa-icon>.
|
|
|
|
|
func (b *PageBuilder) NavigationToggleIconSlot(c templ.Component) *PageBuilder {
|
|
|
|
|
b.props.Slots.NavigationToggleIcon = c
|
|
|
|
|
return b
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// MainHeaderSlot sets the main-header slot content
|
|
|
|
|
// Header to display inline above the main content.
|
|
|
|
|
func (b *PageBuilder) MainHeaderSlot(c templ.Component) *PageBuilder {
|
|
|
|
|
b.props.Slots.MainHeader = c
|
|
|
|
|
return b
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// MainFooterSlot sets the main-footer slot content
|
|
|
|
|
// Footer to display inline below the main content.
|
|
|
|
|
func (b *PageBuilder) MainFooterSlot(c templ.Component) *PageBuilder {
|
|
|
|
|
b.props.Slots.MainFooter = c
|
|
|
|
|
return b
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// AsideSlot sets the aside slot content
|
|
|
|
|
// Content to be shown on the right side of the page. Typically contains a table of contents, ads, etc. This section "st...
|
|
|
|
|
func (b *PageBuilder) AsideSlot(c templ.Component) *PageBuilder {
|
|
|
|
|
b.props.Slots.Aside = c
|
|
|
|
|
return b
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// SkipToContentSlot sets the skip-to-content slot content
|
|
|
|
|
// The "skip to content" slot. You can override this If you would like to override the Skip to content button and add ad...
|
|
|
|
|
func (b *PageBuilder) SkipToContentSlot(c templ.Component) *PageBuilder {
|
|
|
|
|
b.props.Slots.SkipToContent = c
|
|
|
|
|
return b
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// FooterSlot sets the footer slot content
|
|
|
|
|
// The content to display in the footer. This is always displayed underneath the viewport so will always make the page "...
|
|
|
|
|
func (b *PageBuilder) FooterSlot(c templ.Component) *PageBuilder {
|
|
|
|
|
b.props.Slots.Footer = c
|
|
|
|
|
return b
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Attr adds a custom HTML attribute
|
|
|
|
|
func (b *PageBuilder) Attr(name, value string) *PageBuilder {
|
|
|
|
|
if b.props.Attrs == nil {
|
|
|
|
|
b.props.Attrs = templ.Attributes{}
|
|
|
|
|
}
|
|
|
|
|
b.props.Attrs[name] = value
|
|
|
|
|
return b
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Attrs merges multiple attributes
|
|
|
|
|
func (b *PageBuilder) Attrs(attrs templ.Attributes) *PageBuilder {
|
|
|
|
|
if b.props.Attrs == nil {
|
|
|
|
|
b.props.Attrs = templ.Attributes{}
|
|
|
|
|
}
|
|
|
|
|
for k, v := range attrs {
|
|
|
|
|
b.props.Attrs[k] = v
|
|
|
|
|
}
|
|
|
|
|
return b
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Props returns the built properties
|
|
|
|
|
func (b *PageBuilder) Props() PageProps {
|
|
|
|
|
return b.props
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Build returns the props (alias for Props for semantic clarity)
|
|
|
|
|
func (b *PageBuilder) Build() PageProps {
|
|
|
|
|
return b.props
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Page renders the wa-page component
|
|
|
|
|
func Page(props PageProps) templ.Component {
|
|
|
|
|
return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) {
|
|
|
|
|
templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context
|
|
|
|
|
if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil {
|
|
|
|
|
return templ_7745c5c3_CtxErr
|
|
|
|
|
}
|
|
|
|
|
templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W)
|
|
|
|
|
if !templ_7745c5c3_IsBuffer {
|
|
|
|
|
defer func() {
|
|
|
|
|
templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer)
|
|
|
|
|
if templ_7745c5c3_Err == nil {
|
|
|
|
|
templ_7745c5c3_Err = templ_7745c5c3_BufErr
|
|
|
|
|
}
|
|
|
|
|
}()
|
|
|
|
|
}
|
|
|
|
|
ctx = templ.InitializeContext(ctx)
|
|
|
|
|
templ_7745c5c3_Var1 := templ.GetChildren(ctx)
|
|
|
|
|
if templ_7745c5c3_Var1 == nil {
|
|
|
|
|
templ_7745c5c3_Var1 = templ.NopComponent
|
|
|
|
|
}
|
|
|
|
|
ctx = templ.ClearChildren(ctx)
|
|
|
|
|
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 1, "<wa-page")
|
|
|
|
|
if templ_7745c5c3_Err != nil {
|
|
|
|
|
return templ_7745c5c3_Err
|
|
|
|
|
}
|
|
|
|
|
if props.View != "" {
|
|
|
|
|
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 2, " view=\"")
|
|
|
|
|
if templ_7745c5c3_Err != nil {
|
|
|
|
|
return templ_7745c5c3_Err
|
|
|
|
|
}
|
|
|
|
|
var templ_7745c5c3_Var2 string
|
|
|
|
|
templ_7745c5c3_Var2, templ_7745c5c3_Err = templ.JoinStringErrs(props.View)
|
|
|
|
|
if templ_7745c5c3_Err != nil {
|
|
|
|
|
return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/wa/page.templ`, Line: 247, Col: 20}
|
|
|
|
|
}
|
|
|
|
|
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var2))
|
|
|
|
|
if templ_7745c5c3_Err != nil {
|
|
|
|
|
return templ_7745c5c3_Err
|
|
|
|
|
}
|
|
|
|
|
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 3, "\"")
|
|
|
|
|
if templ_7745c5c3_Err != nil {
|
|
|
|
|
return templ_7745c5c3_Err
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if props.NavOpen {
|
|
|
|
|
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 4, " nav-open")
|
|
|
|
|
if templ_7745c5c3_Err != nil {
|
|
|
|
|
return templ_7745c5c3_Err
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if props.MobileBreakpoint != "" {
|
|
|
|
|
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 5, " mobile-breakpoint=\"")
|
|
|
|
|
if templ_7745c5c3_Err != nil {
|
|
|
|
|
return templ_7745c5c3_Err
|
|
|
|
|
}
|
|
|
|
|
var templ_7745c5c3_Var3 string
|
|
|
|
|
templ_7745c5c3_Var3, templ_7745c5c3_Err = templ.JoinStringErrs(props.MobileBreakpoint)
|
|
|
|
|
if templ_7745c5c3_Err != nil {
|
|
|
|
|
return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/wa/page.templ`, Line: 253, Col: 45}
|
|
|
|
|
}
|
|
|
|
|
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var3))
|
|
|
|
|
if templ_7745c5c3_Err != nil {
|
|
|
|
|
return templ_7745c5c3_Err
|
|
|
|
|
}
|
|
|
|
|
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 6, "\"")
|
|
|
|
|
if templ_7745c5c3_Err != nil {
|
|
|
|
|
return templ_7745c5c3_Err
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if props.NavigationPlacement != "" {
|
|
|
|
|
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 7, " navigation-placement=\"")
|
|
|
|
|
if templ_7745c5c3_Err != nil {
|
|
|
|
|
return templ_7745c5c3_Err
|
|
|
|
|
}
|
|
|
|
|
var templ_7745c5c3_Var4 string
|
|
|
|
|
templ_7745c5c3_Var4, templ_7745c5c3_Err = templ.JoinStringErrs(props.NavigationPlacement)
|
|
|
|
|
if templ_7745c5c3_Err != nil {
|
|
|
|
|
return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/wa/page.templ`, Line: 256, Col: 51}
|
|
|
|
|
}
|
|
|
|
|
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var4))
|
|
|
|
|
if templ_7745c5c3_Err != nil {
|
|
|
|
|
return templ_7745c5c3_Err
|
|
|
|
|
}
|
|
|
|
|
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 8, "\"")
|
|
|
|
|
if templ_7745c5c3_Err != nil {
|
|
|
|
|
return templ_7745c5c3_Err
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if props.DisableNavigationToggle {
|
|
|
|
|
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 9, " disable-navigation-toggle")
|
|
|
|
|
if templ_7745c5c3_Err != nil {
|
|
|
|
|
return templ_7745c5c3_Err
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
templ_7745c5c3_Err = templ.RenderAttributes(ctx, templ_7745c5c3_Buffer, props.Attrs)
|
|
|
|
|
if templ_7745c5c3_Err != nil {
|
|
|
|
|
return templ_7745c5c3_Err
|
|
|
|
|
}
|
|
|
|
|
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 10, ">")
|
|
|
|
|
if templ_7745c5c3_Err != nil {
|
|
|
|
|
return templ_7745c5c3_Err
|
|
|
|
|
}
|
|
|
|
|
if props.Slots.Banner != nil {
|
|
|
|
|
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 11, "<div slot=\"banner\">")
|
|
|
|
|
if templ_7745c5c3_Err != nil {
|
|
|
|
|
return templ_7745c5c3_Err
|
|
|
|
|
}
|
|
|
|
|
templ_7745c5c3_Err = props.Slots.Banner.Render(ctx, templ_7745c5c3_Buffer)
|
|
|
|
|
if templ_7745c5c3_Err != nil {
|
|
|
|
|
return templ_7745c5c3_Err
|
|
|
|
|
}
|
|
|
|
|
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 12, "</div>")
|
|
|
|
|
if templ_7745c5c3_Err != nil {
|
|
|
|
|
return templ_7745c5c3_Err
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if props.Slots.Header != nil {
|
|
|
|
|
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 13, "<div slot=\"header\">")
|
|
|
|
|
if templ_7745c5c3_Err != nil {
|
|
|
|
|
return templ_7745c5c3_Err
|
|
|
|
|
}
|
|
|
|
|
templ_7745c5c3_Err = props.Slots.Header.Render(ctx, templ_7745c5c3_Buffer)
|
|
|
|
|
if templ_7745c5c3_Err != nil {
|
|
|
|
|
return templ_7745c5c3_Err
|
|
|
|
|
}
|
|
|
|
|
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 14, "</div>")
|
|
|
|
|
if templ_7745c5c3_Err != nil {
|
|
|
|
|
return templ_7745c5c3_Err
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if props.Slots.Subheader != nil {
|
|
|
|
|
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 15, "<div slot=\"subheader\">")
|
|
|
|
|
if templ_7745c5c3_Err != nil {
|
|
|
|
|
return templ_7745c5c3_Err
|
|
|
|
|
}
|
|
|
|
|
templ_7745c5c3_Err = props.Slots.Subheader.Render(ctx, templ_7745c5c3_Buffer)
|
|
|
|
|
if templ_7745c5c3_Err != nil {
|
|
|
|
|
return templ_7745c5c3_Err
|
|
|
|
|
}
|
|
|
|
|
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 16, "</div>")
|
|
|
|
|
if templ_7745c5c3_Err != nil {
|
|
|
|
|
return templ_7745c5c3_Err
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if props.Slots.Menu != nil {
|
|
|
|
|
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 17, "<div slot=\"menu\">")
|
|
|
|
|
if templ_7745c5c3_Err != nil {
|
|
|
|
|
return templ_7745c5c3_Err
|
|
|
|
|
}
|
|
|
|
|
templ_7745c5c3_Err = props.Slots.Menu.Render(ctx, templ_7745c5c3_Buffer)
|
|
|
|
|
if templ_7745c5c3_Err != nil {
|
|
|
|
|
return templ_7745c5c3_Err
|
|
|
|
|
}
|
|
|
|
|
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 18, "</div>")
|
|
|
|
|
if templ_7745c5c3_Err != nil {
|
|
|
|
|
return templ_7745c5c3_Err
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if props.Slots.NavigationHeader != nil {
|
|
|
|
|
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 19, "<div slot=\"navigation-header\">")
|
|
|
|
|
if templ_7745c5c3_Err != nil {
|
|
|
|
|
return templ_7745c5c3_Err
|
|
|
|
|
}
|
|
|
|
|
templ_7745c5c3_Err = props.Slots.NavigationHeader.Render(ctx, templ_7745c5c3_Buffer)
|
|
|
|
|
if templ_7745c5c3_Err != nil {
|
|
|
|
|
return templ_7745c5c3_Err
|
|
|
|
|
}
|
|
|
|
|
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 20, "</div>")
|
|
|
|
|
if templ_7745c5c3_Err != nil {
|
|
|
|
|
return templ_7745c5c3_Err
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if props.Slots.Navigation != nil {
|
|
|
|
|
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 21, "<div slot=\"navigation\">")
|
|
|
|
|
if templ_7745c5c3_Err != nil {
|
|
|
|
|
return templ_7745c5c3_Err
|
|
|
|
|
}
|
|
|
|
|
templ_7745c5c3_Err = props.Slots.Navigation.Render(ctx, templ_7745c5c3_Buffer)
|
|
|
|
|
if templ_7745c5c3_Err != nil {
|
|
|
|
|
return templ_7745c5c3_Err
|
|
|
|
|
}
|
|
|
|
|
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 22, "</div>")
|
|
|
|
|
if templ_7745c5c3_Err != nil {
|
|
|
|
|
return templ_7745c5c3_Err
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if props.Slots.NavigationFooter != nil {
|
|
|
|
|
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 23, "<div slot=\"navigation-footer\">")
|
|
|
|
|
if templ_7745c5c3_Err != nil {
|
|
|
|
|
return templ_7745c5c3_Err
|
|
|
|
|
}
|
|
|
|
|
templ_7745c5c3_Err = props.Slots.NavigationFooter.Render(ctx, templ_7745c5c3_Buffer)
|
|
|
|
|
if templ_7745c5c3_Err != nil {
|
|
|
|
|
return templ_7745c5c3_Err
|
|
|
|
|
}
|
|
|
|
|
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 24, "</div>")
|
|
|
|
|
if templ_7745c5c3_Err != nil {
|
|
|
|
|
return templ_7745c5c3_Err
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if props.Slots.NavigationToggle != nil {
|
|
|
|
|
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 25, "<div slot=\"navigation-toggle\">")
|
|
|
|
|
if templ_7745c5c3_Err != nil {
|
|
|
|
|
return templ_7745c5c3_Err
|
|
|
|
|
}
|
|
|
|
|
templ_7745c5c3_Err = props.Slots.NavigationToggle.Render(ctx, templ_7745c5c3_Buffer)
|
|
|
|
|
if templ_7745c5c3_Err != nil {
|
|
|
|
|
return templ_7745c5c3_Err
|
|
|
|
|
}
|
|
|
|
|
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 26, "</div>")
|
|
|
|
|
if templ_7745c5c3_Err != nil {
|
|
|
|
|
return templ_7745c5c3_Err
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if props.Slots.NavigationToggleIcon != nil {
|
|
|
|
|
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 27, "<div slot=\"navigation-toggle-icon\">")
|
|
|
|
|
if templ_7745c5c3_Err != nil {
|
|
|
|
|
return templ_7745c5c3_Err
|
|
|
|
|
}
|
|
|
|
|
templ_7745c5c3_Err = props.Slots.NavigationToggleIcon.Render(ctx, templ_7745c5c3_Buffer)
|
|
|
|
|
if templ_7745c5c3_Err != nil {
|
|
|
|
|
return templ_7745c5c3_Err
|
|
|
|
|
}
|
|
|
|
|
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 28, "</div>")
|
|
|
|
|
if templ_7745c5c3_Err != nil {
|
|
|
|
|
return templ_7745c5c3_Err
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if props.Slots.MainHeader != nil {
|
|
|
|
|
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 29, "<div slot=\"main-header\">")
|
|
|
|
|
if templ_7745c5c3_Err != nil {
|
|
|
|
|
return templ_7745c5c3_Err
|
|
|
|
|
}
|
|
|
|
|
templ_7745c5c3_Err = props.Slots.MainHeader.Render(ctx, templ_7745c5c3_Buffer)
|
|
|
|
|
if templ_7745c5c3_Err != nil {
|
|
|
|
|
return templ_7745c5c3_Err
|
|
|
|
|
}
|
|
|
|
|
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 30, "</div>")
|
|
|
|
|
if templ_7745c5c3_Err != nil {
|
|
|
|
|
return templ_7745c5c3_Err
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if props.Slots.MainFooter != nil {
|
|
|
|
|
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 31, "<div slot=\"main-footer\">")
|
|
|
|
|
if templ_7745c5c3_Err != nil {
|
|
|
|
|
return templ_7745c5c3_Err
|
|
|
|
|
}
|
|
|
|
|
templ_7745c5c3_Err = props.Slots.MainFooter.Render(ctx, templ_7745c5c3_Buffer)
|
|
|
|
|
if templ_7745c5c3_Err != nil {
|
|
|
|
|
return templ_7745c5c3_Err
|
|
|
|
|
}
|
|
|
|
|
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 32, "</div>")
|
|
|
|
|
if templ_7745c5c3_Err != nil {
|
|
|
|
|
return templ_7745c5c3_Err
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if props.Slots.Aside != nil {
|
|
|
|
|
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 33, "<div slot=\"aside\">")
|
|
|
|
|
if templ_7745c5c3_Err != nil {
|
|
|
|
|
return templ_7745c5c3_Err
|
|
|
|
|
}
|
|
|
|
|
templ_7745c5c3_Err = props.Slots.Aside.Render(ctx, templ_7745c5c3_Buffer)
|
|
|
|
|
if templ_7745c5c3_Err != nil {
|
|
|
|
|
return templ_7745c5c3_Err
|
|
|
|
|
}
|
|
|
|
|
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 34, "</div>")
|
|
|
|
|
if templ_7745c5c3_Err != nil {
|
|
|
|
|
return templ_7745c5c3_Err
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if props.Slots.SkipToContent != nil {
|
|
|
|
|
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 35, "<div slot=\"skip-to-content\">")
|
|
|
|
|
if templ_7745c5c3_Err != nil {
|
|
|
|
|
return templ_7745c5c3_Err
|
|
|
|
|
}
|
|
|
|
|
templ_7745c5c3_Err = props.Slots.SkipToContent.Render(ctx, templ_7745c5c3_Buffer)
|
|
|
|
|
if templ_7745c5c3_Err != nil {
|
|
|
|
|
return templ_7745c5c3_Err
|
|
|
|
|
}
|
|
|
|
|
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 36, "</div>")
|
|
|
|
|
if templ_7745c5c3_Err != nil {
|
|
|
|
|
return templ_7745c5c3_Err
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if props.Slots.Footer != nil {
|
|
|
|
|
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 37, "<div slot=\"footer\">")
|
|
|
|
|
if templ_7745c5c3_Err != nil {
|
|
|
|
|
return templ_7745c5c3_Err
|
|
|
|
|
}
|
|
|
|
|
templ_7745c5c3_Err = props.Slots.Footer.Render(ctx, templ_7745c5c3_Buffer)
|
|
|
|
|
if templ_7745c5c3_Err != nil {
|
|
|
|
|
return templ_7745c5c3_Err
|
|
|
|
|
}
|
|
|
|
|
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 38, "</div>")
|
|
|
|
|
if templ_7745c5c3_Err != nil {
|
|
|
|
|
return templ_7745c5c3_Err
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
templ_7745c5c3_Err = templ_7745c5c3_Var1.Render(ctx, templ_7745c5c3_Buffer)
|
|
|
|
|
if templ_7745c5c3_Err != nil {
|
|
|
|
|
return templ_7745c5c3_Err
|
|
|
|
|
}
|
|
|
|
|
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 39, "</wa-page>")
|
|
|
|
|
if templ_7745c5c3_Err != nil {
|
|
|
|
|
return templ_7745c5c3_Err
|
|
|
|
|
}
|
|
|
|
|
return nil
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// PageFunc renders with a builder function for inline configuration
|
|
|
|
|
func PageFunc(fn func(*PageBuilder)) templ.Component {
|
|
|
|
|
return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) {
|
|
|
|
|
templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context
|
|
|
|
|
if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil {
|
|
|
|
|
return templ_7745c5c3_CtxErr
|
|
|
|
|
}
|
|
|
|
|
templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W)
|
|
|
|
|
if !templ_7745c5c3_IsBuffer {
|
|
|
|
|
defer func() {
|
|
|
|
|
templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer)
|
|
|
|
|
if templ_7745c5c3_Err == nil {
|
|
|
|
|
templ_7745c5c3_Err = templ_7745c5c3_BufErr
|
|
|
|
|
}
|
|
|
|
|
}()
|
|
|
|
|
}
|
|
|
|
|
ctx = templ.InitializeContext(ctx)
|
|
|
|
|
templ_7745c5c3_Var5 := templ.GetChildren(ctx)
|
|
|
|
|
if templ_7745c5c3_Var5 == nil {
|
|
|
|
|
templ_7745c5c3_Var5 = templ.NopComponent
|
|
|
|
|
}
|
|
|
|
|
ctx = templ.ClearChildren(ctx)
|
|
|
|
|
b := NewPage()
|
|
|
|
|
fn(b)
|
|
|
|
|
templ_7745c5c3_Var6 := templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) {
|
|
|
|
|
templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context
|
|
|
|
|
templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W)
|
|
|
|
|
if !templ_7745c5c3_IsBuffer {
|
|
|
|
|
defer func() {
|
|
|
|
|
templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer)
|
|
|
|
|
if templ_7745c5c3_Err == nil {
|
|
|
|
|
templ_7745c5c3_Err = templ_7745c5c3_BufErr
|
|
|
|
|
}
|
|
|
|
|
}()
|
|
|
|
|
}
|
|
|
|
|
ctx = templ.InitializeContext(ctx)
|
|
|
|
|
templ_7745c5c3_Err = templ_7745c5c3_Var5.Render(ctx, templ_7745c5c3_Buffer)
|
|
|
|
|
if templ_7745c5c3_Err != nil {
|
|
|
|
|
return templ_7745c5c3_Err
|
|
|
|
|
}
|
|
|
|
|
return nil
|
|
|
|
|
})
|
|
|
|
|
templ_7745c5c3_Err = Page(b.Props()).Render(templ.WithChildren(ctx, templ_7745c5c3_Var6), templ_7745c5c3_Buffer)
|
|
|
|
|
if templ_7745c5c3_Err != nil {
|
|
|
|
|
return templ_7745c5c3_Err
|
|
|
|
|
}
|
|
|
|
|
return nil
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
var _ = templruntime.GeneratedTemplate
|