page-wrapper.scm 707 B

123456789101112131415161718192021
  1. (library (templates page-wrapper)
  2. (export page-wrapper-template)
  3. (import
  4. (except (rnrs base) let-values error)
  5. (only (guile) lambda* λ)
  6. (templates nav)))
  7. (define page-wrapper-template
  8. (λ (request body page-content)
  9. "page-wrapper-template adds things like navigation and footer. It renders
  10. the actual content into the correct place on the website."
  11. `((div (@ (class "body-wrapper"))
  12. ,(nav-template request body)
  13. ;; Page content should be wrapped inside a <main> tag or similar. It
  14. ;; is expected to return a single root element, which may contain
  15. ;; other elements.
  16. ,page-content
  17. ;; TODO: footer
  18. ))))