;;; Harmonic Flow web site (define-module (apps media builder) #:use-module (apps aux system) #:use-module (apps base utils) #:use-module (apps media data) #:use-module (apps media templates screenshot) #:use-module (apps media templates screenshots-overview) #:use-module (apps media types) #:use-module (haunt artifact) #:use-module (haunt html) #:use-module (haunt utils) #:use-module (apps aux web) #:use-module (srfi srfi-19) #: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 and ) A list of objects that represent the web resources of the application. See Haunt and objects for more information." (flatten (list (screenshots-overview-builder) (screenshots-builder) ))) ;;; ;;; Helper builders. ;;; (define (screenshots-builder) "Return a list of Haunt pages representing screenshot pages." (map (lambda (shot) (let ((context (list (cons "screenshot" shot) (cons "screenshots" screenshots)))) (serialized-artifact (path-join "screenshots" (screenshot-slug shot) "index.html") (screenshot-t context) sxml->html))) screenshots)) (define (screenshots-overview-builder) "Return a Haunt page representing the screenshots overview page." (serialized-artifact "screenshots/index.html" (screenshots-overview-t screenshots) sxml->html))