diff options
-rw-r--r-- | public/main.css | 20 | ||||
-rw-r--r-- | public/rhythms/0.5.png | bin | 0 -> 4520 bytes | |||
-rw-r--r-- | public/rhythms/1.5.png | bin | 0 -> 3503 bytes | |||
-rw-r--r-- | public/rhythms/2.png | bin | 0 -> 3108 bytes | |||
-rw-r--r-- | songs/bob-marley/no-woman-no-cry.lisp (renamed from songs/bob-marley/woman-no-cry.lisp) | 26 | ||||
-rw-r--r-- | src/main.lisp | 23 |
6 files changed, 52 insertions, 17 deletions
diff --git a/public/main.css b/public/main.css index 236ddc0..8606108 100644 --- a/public/main.css +++ b/public/main.css @@ -53,13 +53,13 @@ body { .g-Part h3 { margin: 0; - background-color: #f0f0f0; padding: 0 0.25rem; border-radius: 0.25rem; font-size: 110%; font-weight: normal; font-family: monospace; color: #851616; + border: 1px solid #851616; width: fit-content; } @@ -78,13 +78,25 @@ body { text-align: center; border-left: 1px solid black; border-right: 1px solid black; - padding: 0.5rem 0; + padding: 0.5rem 1rem; + white-space: nowrap; +} + +.g-Chords__Chord { + display: inline-flex; + gap: 0.5rem; + align-items: baseline; +} + +.g-Chords__Rhythm { + height: 1.3rem; } .g-Chords__Chord:not(:last-child):after { display: inline-block; content: "/"; - margin: 0 0.5rem; + margin-left: 0.5rem; + margin-right: 1rem; } .g-Lyrics__Paragraph { @@ -94,5 +106,5 @@ body { } .g-Lyrics__Paragraph emph { - background-color: #e6e6d2; + background-color: #a7de9b; } diff --git a/public/rhythms/0.5.png b/public/rhythms/0.5.png Binary files differnew file mode 100644 index 0000000..08bf293 --- /dev/null +++ b/public/rhythms/0.5.png diff --git a/public/rhythms/1.5.png b/public/rhythms/1.5.png Binary files differnew file mode 100644 index 0000000..aae73bd --- /dev/null +++ b/public/rhythms/1.5.png diff --git a/public/rhythms/2.png b/public/rhythms/2.png Binary files differnew file mode 100644 index 0000000..0bcc0ba --- /dev/null +++ b/public/rhythms/2.png diff --git a/songs/bob-marley/woman-no-cry.lisp b/songs/bob-marley/no-woman-no-cry.lisp index 57ba345..deaaa80 100644 --- a/songs/bob-marley/woman-no-cry.lisp +++ b/songs/bob-marley/no-woman-no-cry.lisp @@ -3,17 +3,33 @@ (from "Bob Marley & The Wailers") (tonality "C") + ; (chords + ; (:templates + ; (A ((C G) (("Am" 1.5) (F 0.5 2)) ((C 2) (F 1.5) (C 0.5)) (C G))) + ; (B ((C G) (("Am" 1.5) (F 0.5 2)) (C G) (("Am" 1.5) (F 0.5 2)))) + ; (C ((C G) ("Am" F) (C G) ("Am" F)))) + + ; (intro A) + ; (chorus A A) + ; (verse B B) + ; (bridge C C)) + (chords (intro - ((C G) ("Am *" F) (C "F *") (C G))) + ((C G) (("Am" 1.5) (F 0.5 2))) + (((C 2) (F 1.5) (C 0.5)) (C G))) (chorus - ((C G) ("Am *" F) (C "F *") (C G)) - ((C G) ("Am *" F) (C "F *") (C G))) + ((C G) (("Am" 1.5) (F 0.5 2))) + (((C 2) (F 1.5) (C 0.5)) (C G)) + ((C G) (("Am" 1.5) (F 0.5 2))) + (((C 2) (F 1.5) (C 0.5)) (C G))) (verse - ((C G) ("Am *" F) (C G) ("Am *" F)) - ((C G) ("Am *" F) (C G) ("Am *" F))) + ((C G) (("Am" 1.5) (F 0.5 2))) + ((C G) (("Am" 1.5) (F 0.5 2))) + ((C G) (("Am" 1.5) (F 0.5 2))) + ((C G) (("Am" 1.5) (F 0.5 2)))) (bridge ((C G) ("Am" F) (C G) ("Am" F)) 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 |