summaryrefslogtreecommitdiff
path: root/haunt.scm
diff options
context:
space:
mode:
Diffstat (limited to 'haunt.scm')
-rw-r--r--haunt.scm22
1 files changed, 15 insertions, 7 deletions
diff --git a/haunt.scm b/haunt.scm
index 4c64a46..53fd096 100644
--- a/haunt.scm
+++ b/haunt.scm
@@ -347,13 +347,21 @@ each consisting of a file extension and a url."
")"))
pairs))))
-(define (screenshot src title)
- "SXML for a screenshot; should use a thumbnail." ; TODO
- `(a (@ (href ,src)
+(define (screenshot url title
+ thumbnail-url thumbnail-width thumbnail-height)
+ "SXML for a screenshot.
+
+URL: The URL of the full-size screenshot as a raster graphics image.
+TITLE: The title for a link to the full image.
+THUMBNAIL-URL: The URL to a smaller version of the image.
+THUMBNAIL-WIDTH: The width of the thumbnail image.
+THUMBNAIL-HEIGHT: The height of the thumbnail image." ; TODO AUTODETECT
+ `(a (@ (href ,url)
(title ,title))
(img (@ (class "horizontally-padded-wide")
- (src ,src)
- (width "300")
+ (src ,thumbnail-url)
+ (width ,(number->string thumbnail-width))
+ (height ,(number->string thumbnail-height))
(alt (string-append "Screenshot: " ,title))))))
(define (back-button-for-lingua lingua)
@@ -655,9 +663,9 @@ cost."))
(h1 ,(_ "Screenshots"))
(div (@ (class "centered"))
,(screenshot "screenshots/01.png" (_ "Guessing an \
-expression"))
+expression") "screenshots/01-thumb.png" 224 126)
,(screenshot "screenshots/02.png" (_ "Right-to-left \
-support")))
+support") "screenshots/02-thumb.png" 224 126))
,(let* ((posts-about-dont-hang
(assoc-ref