| | |
| | | header: QuartzComponent[] |
| | | beforeBody: QuartzComponent[] |
| | | pageBody: QuartzComponent |
| | | afterBody: QuartzComponent[] |
| | | left: QuartzComponent[] |
| | | right: QuartzComponent[] |
| | | footer: QuartzComponent |
| | |
| | | const contentIndexScript = `const fetchData = fetch("${contentIndexPath}").then(data => data.json())` |
| | | |
| | | return { |
| | | css: [joinSegments(baseDir, "index.css"), ...staticResources.css], |
| | | css: [ |
| | | { |
| | | content: joinSegments(baseDir, "index.css"), |
| | | }, |
| | | ...staticResources.css, |
| | | ], |
| | | js: [ |
| | | { |
| | | src: joinSegments(baseDir, "prescript.js"), |
| | |
| | | // skip until we find the blockref that matches |
| | | if (el.properties?.id === blockRef) { |
| | | startIdx = i |
| | | startDepth = Number(el.tagName.substring(1)) |
| | | startDepth = depth |
| | | } |
| | | } else if (depth <= startDepth) { |
| | | // looking for new header that is same level or higher |
| | | endIdx = i |
| | | break |
| | | } |
| | | } |
| | | |
| | |
| | | header, |
| | | beforeBody, |
| | | pageBody: Content, |
| | | afterBody, |
| | | left, |
| | | right, |
| | | footer: Footer, |
| | |
| | | </div> |
| | | </div> |
| | | <Content {...componentData} /> |
| | | <hr /> |
| | | <div class="page-footer"> |
| | | {afterBody.map((BodyComponent) => ( |
| | | <BodyComponent {...componentData} /> |
| | | ))} |
| | | </div> |
| | | </div> |
| | | {RightComponent} |
| | | <Footer {...componentData} /> |
| | | </Body> |
| | | <Footer {...componentData} /> |
| | | </div> |
| | | </body> |
| | | {pageResources.js |