;;; Harmonic Flow web site (define-module (apps base builder) #:use-module (apps base templates about) #:use-module (apps base templates contact) #:use-module (apps base templates hfge-about) #:use-module (apps base templates hfge-download) #:use-module (apps base templates hfge-git) #:use-module (apps base templates home) #:use-module (apps base templates menu) #:use-module (apps base types) #:use-module (apps blog utils) #:use-module (apps media data) #:use-module (haunt html) #:use-module (haunt artifact) #:use-module (haunt post) #:use-module (haunt utils) #:use-module (srfi srfi-1) #:export (builder)) ;;; ;;; Application builder. ;;; (define (builder site posts) "Return the list of web resources that compose the app. This procedure is a Haunt builder procedure. SITE () A site object that defines all the properties of the website. See Haunt objects for more information. POSTS (list of ) A list of post objects that represent articles from the blog. See Haunt objects for more information. RETURN (list of ) A list of page objects that represent the web resources of the application. See Haunt objects for more information." (flatten (list (menu-builder) (home-builder site posts) (about-builder) (contact-builder) (hfge-about-builder) (hfge-download-builder) (hfge-git-builder)))) ;;; ;;; Helper builders. ;;; (define (about-builder) "Return a Haunt page representing the About page of the website." (serialized-artifact "about/index.html" (about-t) sxml->html)) (define (contact-builder) "Return a Haunt page representing the Contact page of the website." (serialized-artifact "contact/index.html" (contact-t) sxml->html)) (define (hfge-about-builder) "Return a Haunt page representing the HFGE about page of the website." (serialized-artifact "hfge-about/index.html" (hfge-about-t) sxml->html)) (define (hfge-download-builder) "Return a Haunt page representing the HFGE download page of the website." (serialized-artifact "hfge-download/index.html" (hfge-download-t) sxml->html)) (define (hfge-git-builder) "Return a Haunt page representing the HFGE git page of the website." (serialized-artifact "hfge-git/index.html" (hfge-git-t) sxml->html)) (define (home-builder site posts) "Return a Haunt page representing the Home page of the website." (let ((context (list (cons "screenshots" screenshots) (cons "posts" (posts/latest posts 3)) ))) (serialized-artifact "index.html" (home-t context) sxml->html))) (define (menu-builder) "Return a Haunt page representing the website menu." (serialized-artifact "menu/index.html" (menu-t) sxml->html))