package components
templ Layout(props LayoutProps) {
{ props.Title }
@Head(props.Head)
@Header(props.Header)
//@Sidebar(props.Routes) Hidden until we need it
{ children... }
@props.Modal
}
type LayoutProps struct {
Title string
Description string
Head HeadProps
Header HeaderProps
Routes []NavRoutes
Modal templ.Component
}
type NavRoutes struct {
Name string
Path string
Icon templ.Component
}
templ Head(props HeadProps) {
for _, link := range props.Links {
}
for _, script := range props.Scripts {
}
}
type HeadProps struct {
Links []Link
Scripts []Script
}
type Link struct {
Href string
Rel string
As string
}
type Script struct {
Src string
Defer bool
}