diff options
| author | Jakob L. Kreuze | 2019-07-20 17:07:39 -0400 |
|---|---|---|
| committer | Jakob L. Kreuze | 2019-07-20 17:07:39 -0400 |
| commit | b4fdc3017b9c05734b92151d7aa2e0353682fc09 (patch) | |
| tree | a056a6a6e379bcae01b22c6dca203218c609cac3 /haunt/jakob/utils/sxml.scm | |
| parent | aed8c20a9488f1ed4f4e316068cbafb07e8676ff (diff) | |
Stage everything. Bleh, I'll commit to a clean history from now on
Diffstat (limited to 'haunt/jakob/utils/sxml.scm')
| -rw-r--r-- | haunt/jakob/utils/sxml.scm | 11 |
1 files changed, 8 insertions, 3 deletions
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))))) |