summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Thompson <dthompson2@worcester.edu>2016-08-19 20:40:38 -0400
committerDavid Thompson <dthompson2@worcester.edu>2016-08-19 20:40:38 -0400
commit25a07d7687b2a69d6a304fa87403c01c04308c89 (patch)
tree2fdc30b76bf5a02182c12001a13b93365b74608a
parent9224412274e1e1a31a959083bb257a7d6ab2b113 (diff)
Finish Sly project page.
-rw-r--r--haunt.scm114
1 files changed, 88 insertions, 26 deletions
diff --git a/haunt.scm b/haunt.scm
index b08b1ea..e32f853 100644
--- a/haunt.scm
+++ b/haunt.scm
@@ -43,6 +43,11 @@
(ice-9 match)
(web uri))
+(define (date year month day)
+ "Create a SRFI-19 date for the given YEAR, MONTH, DAY"
+ (let ((tzoffset (tm:gmtoff (localtime (time-second (current-time))))))
+ (make-date 0 0 0 0 day month year tzoffset)))
+
(define (stylesheet name)
`(link (@ (rel "stylesheet")
(href ,(string-append "/css/" name ".css")))))
@@ -69,6 +74,13 @@
(define (link name uri)
`(a (@ (href ,uri)) ,name))
+(define* (centered-image url #:optional alt)
+ `(img (@ (class "centered-image")
+ (src ,url)
+ ,@(if alt
+ `((alt ,alt))
+ '()))))
+
(define (first-paragraph post)
(let loop ((sxml (post-sxml post))
(result '()))
@@ -142,11 +154,6 @@ free culture works available under the " ,%cc-by-sa-link " license.")
(a (@ (href ,uri)) "read more ➔"))))
posts)))))
-;; (define (static-page file theme reader)
-;; (lambda (site posts)
-;; (make-page "foo.html"
-;; (with-layout theme ))))
-
(define %collections
`(("Recent Blog Posts" "index.html" ,posts/reverse-chronological)))
@@ -183,19 +190,46 @@ free culture works available under the " ,%cc-by-sa-link " license.")
sxml->html)))
(define* (project-page #:key name file-name description usage requirements
- installation documentation license repo)
+ installation manual? license repo releases)
(define body
`((h1 ,name)
,description
- (h2 "Usage")
- ,usage
- (h2 "Documentation")
- ,documentation
+ ,@(if usage
+ `((h2 "Usage")
+ ,usage)
+ '())
+ ,@(if manual?
+ `((h2 "Documentation")
+ (p ,(anchor "View the reference manual"
+ (string-append "/manuals/" repo "/index.html"))))
+ '())
(h2 "Releases")
+ (ul ,(map (match-lambda
+ ((version date)
+ (let ((url (string-append "https://files.dthompson.us/"
+ repo "/" repo "-" version
+ ".tar.gz")))
+ `(li ,(date->string date "~Y-~m-~d")
+ " — " ,version " — "
+ ,(anchor (string-append repo "-" version ".tar.gz")
+ url)
+ " — "
+ ,(anchor (string-append repo "-" version
+ ".tar.gz.asc")
+ (string-append url ".asc"))))))
+ releases))
(h2 "Requirements")
- ,requirements
+ (ul ,(map (lambda (requirement)
+ `(li ,requirement))
+ requirements))
(h2 "Installation")
- ,installation
+ ,@(if installation
+ (list installation)
+ `((p ,name " uses the standard GNU build system. "
+ "To build and install " ,name " from source, run:")
+ (pre "./configure
+make
+make install")))
(h2 "License")
(p ,license)
(h2 "Source Code")
@@ -240,22 +274,50 @@ at "
"Projects"
"projects.html"
`((h1 "Projects")
- (p ,(anchor "Guile-SDL2" "#") " — SDL2 bindings for Guile Scheme")
- (p ,(anchor "Haunt" "#") " — Functional, hackable static site generator")
- (p ,(anchor "Shroud" "#") " — GPG-based password manager")
- (p ,(anchor "Sly" "#") " — Functional reactive game engine")
- (p ,(anchor "srt2vtt" "#") " — SRT to WebVTT subtitle converter"))))
+ (p ,(anchor "Guile-SDL2" "projects/guile-sdl2.html")
+ " — SDL2 bindings for Guile Scheme")
+ (p ,(anchor "Haunt" "projects/haunt.html")
+ " — Functional, hackable static site generator")
+ (p ,(anchor "Shroud" "projects/shroud.html")
+ " — GPG-based password manager")
+ (p ,(anchor "Sly" "projects/sly.html")
+ " — Functional reactive game engine")
+ (p ,(anchor "srt2vtt" "projects/srt2vtt.html")
+ " — SRT to WebVTT subtitle converter"))))
(define sly-page
- (project-page #:name "Sly"
- #:file-name "sly.html"
- #:description "game engine"
- #:documentation "read a book"
- #:usage "meh"
- #:requirements "a computer"
- #:installation "guix package -i sly"
- #:license "GNU GPLv3+"
- #:repo "sly"))
+ (project-page
+ #:name "Sly"
+ #:file-name "sly.html"
+ #:description
+ `((p "Sly is a fun, free software 2D/3D game engine written in "
+ ,(anchor "Guile Scheme" "https://gnu.org/s/guile") ".")
+ ,(centered-image "/images/sly/logo.png" "Sly fox mascot")
+ (p "Sly differentiates itself from most other game engines by encouraging
+and enabling the use of "
+ ,(anchor "live coding"
+ "http://toplap.org/about/")
+ " and "
+ ,(anchor "functional reactive programming"
+ "https://en.wikipedia.org/wiki/Functional_reactive_programming")
+ " techniques. Sly provides a dynamic live coding environment
+that allows games to be built interactively and iteratively without
+ever stopping the running program. A data structure called a “signal”
+provides a method of modeling time-varying state that is declarative,
+functional, and reactive.")
+ (p ,(centered-image "/images/sly/2048.png"))
+ (p ,(centered-image "/images/sly/mines.png")))
+ #:requirements '("GNU Guile >= 2.0.11"
+ "guile-opengl_ >= 0.1.0"
+ "guile-sdl_ >= 0.5.0"
+ "SDL 1.2.x"
+ "FreeImage >= 3.0"
+ "GNU Scientific Library (GSL)")
+ #:license "GNU GPLv3+"
+ #:repo "sly"
+ #:manual? #t
+ #:releases
+ `(("0.1" ,(date 2015 11 12)))))
(site #:title "dthompson"
#:domain "dthompson.us"