From b4fdc3017b9c05734b92151d7aa2e0353682fc09 Mon Sep 17 00:00:00 2001 From: Jakob L. Kreuze Date: Sat, 20 Jul 2019 17:07:39 -0400 Subject: Stage everything. Bleh, I'll commit to a clean history from now on --- haunt/jakob/utils/sxml.scm | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'haunt/jakob/utils/sxml.scm') diff --git a/haunt/jakob/utils/sxml.scm b/haunt/jakob/utils/sxml.scm index c4ce33d..0bde0fe 100644 --- a/haunt/jakob/utils/sxml.scm +++ b/haunt/jakob/utils/sxml.scm @@ -23,16 +23,21 @@ (define-module (jakob utils sxml) #:export (hyperlink image - stylesheet)) + stylesheet + script)) (define (hyperlink target text) `(a (@ (href ,target)) ,text)) -(define* (image filename #:optional description) - (let ((src (string-append "/static/image/" filename))) +(define* (image file-name #:optional description) + (let ((src (string-append "/static/image/" file-name))) (if description `(img (@ (src ,src) (alt ,description) (title ,description))) `(img (@ (src ,src)))))) (define (stylesheet file-name) `(link (@ (rel "stylesheet") (href ,(format #f "/static/css/~a" file-name))))) + +(define (script file-name) + (let ((src (string-append "/static/js/" file-name))) + `(script (@ (src ,src))))) -- cgit v1.3