allow for sections and components in any order on pages

This commit is contained in:
2025-09-09 22:30:00 -06:00
parent 88d757546a
commit b82e22c38d
11 changed files with 1179 additions and 848 deletions

View File

@ -583,13 +583,19 @@ export default function {{.Page.Name}}Page() {
{/* Protected content */}
{{end}}
{{range .Page.Sections}}
<section className="{{.Class | derefString}}">
{{if .Label}}<h2>{{.Label | derefString}}</h2>{{end}}
{{range .Components}}
{/* Component: {{.Type}} */}
{{range .Page.Elements}}
{{if .Section}}
<section className="{{.Section.Class | derefString}}">
{{if .Section.Label}}<h2>{{.Section.Label | derefString}}</h2>{{end}}
{{range .Section.Elements}}
{{if .Component}}
{/* Component: {{.Component.Type}} */}
{{end}}
{{end}}
</section>
{{else if .Component}}
{/* Component: {{.Component.Type}} */}
{{end}}
{{end}}
</div>
</Layout>