aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/main.lisp23
1 files changed, 15 insertions, 8 deletions
diff --git a/src/main.lisp b/src/main.lisp
index f3bd32e..d7dec7f 100644
--- a/src/main.lisp
+++ b/src/main.lisp
@@ -76,18 +76,25 @@
; Chords
-(defun chord-div (chord)
- (h "span" '(("class" "g-Chords__Chord")) (list (string chord))))
+(defun rhythm (x)
+ (h "img" (list '("class" "g-Chords__Rhythm") (list "src" (format nil "/rhythms/~S.png" x))) nil))
-(defun chord-cell (chords)
+(defun chord-div (x)
+ (h "span" '(("class" "g-Chords__Chord"))
+ (if
+ (listp x)
+ (cons (string (car x)) (mapcar #'rhythm (cdr x)))
+ (list (string x)))))
+
+(defun chord-cell (x)
(h "td" '(("class" "g-Chords__Cell"))
(if
- (listp chords)
- (mapcar #'chord-div chords)
- (list (chord-div chords)))))
+ (listp x)
+ (mapcar #'chord-div x)
+ (list (chord-div x)))))
-(defun chord-row (chords)
- (h "tr" nil (mapcar #'chord-cell chords)))
+(defun chord-row (xs)
+ (h "tr" nil (mapcar #'chord-cell xs)))
(defun chord-rows (xs)
(if