feat: unify layout slot architecture - make header/footer configurable positions, footer as array, add defaultPosition fallback, add tests, update docs
This commit is contained in:
@@ -19,7 +19,7 @@ export const DefaultFrame: PageFrame = {
|
||||
afterBody,
|
||||
left,
|
||||
right,
|
||||
footer: Footer,
|
||||
footer,
|
||||
}: PageFrameProps) {
|
||||
return (
|
||||
<>
|
||||
@@ -54,7 +54,9 @@ export const DefaultFrame: PageFrame = {
|
||||
<BodyComponent {...componentData} />
|
||||
))}
|
||||
</div>
|
||||
<Footer {...componentData} />
|
||||
{footer.map((FooterComponent) => (
|
||||
<FooterComponent {...componentData} />
|
||||
))}
|
||||
</>
|
||||
)
|
||||
},
|
||||
|
||||
@@ -19,7 +19,7 @@ export const FullWidthFrame: PageFrame = {
|
||||
beforeBody,
|
||||
pageBody: Content,
|
||||
afterBody,
|
||||
footer: Footer,
|
||||
footer,
|
||||
}: PageFrameProps) {
|
||||
return (
|
||||
<>
|
||||
@@ -44,7 +44,9 @@ export const FullWidthFrame: PageFrame = {
|
||||
))}
|
||||
</div>
|
||||
</div>
|
||||
<Footer {...componentData} />
|
||||
{footer.map((FooterComponent) => (
|
||||
<FooterComponent {...componentData} />
|
||||
))}
|
||||
</>
|
||||
)
|
||||
},
|
||||
|
||||
@@ -10,13 +10,15 @@ import { PageFrame, PageFrameProps } from "./types"
|
||||
*/
|
||||
export const MinimalFrame: PageFrame = {
|
||||
name: "minimal",
|
||||
render({ componentData, pageBody: Content, footer: Footer }: PageFrameProps) {
|
||||
render({ componentData, pageBody: Content, footer }: PageFrameProps) {
|
||||
return (
|
||||
<>
|
||||
<div class="center minimal">
|
||||
<Content {...componentData} />
|
||||
</div>
|
||||
<Footer {...componentData} />
|
||||
{footer.map((FooterComponent) => (
|
||||
<FooterComponent {...componentData} />
|
||||
))}
|
||||
</>
|
||||
)
|
||||
},
|
||||
|
||||
@@ -22,8 +22,8 @@ export interface PageFrameProps {
|
||||
left: QuartzComponent[]
|
||||
/** Right sidebar components */
|
||||
right: QuartzComponent[]
|
||||
/** Footer component */
|
||||
footer: QuartzComponent
|
||||
/** Footer components */
|
||||
footer: QuartzComponent[]
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user