diff options
author | Joris Guyonvarch | 2025-08-08 22:26:00 +0200 |
---|---|---|
committer | Joris Guyonvarch | 2025-08-08 22:26:00 +0200 |
commit | 4b71f5477cf3d9b309baadfea8756e00c0bf84a6 (patch) | |
tree | aec9289b4e68492ac0253e62d09981ca725f9af4 | |
parent | b7adbb2ef7c413f653b71e0fd26acec4a1f84945 (diff) |
Show notes if defined
-rw-r--r-- | public/main.css | 6 | ||||
-rw-r--r-- | src/main.lisp | 10 |
2 files changed, 16 insertions, 0 deletions
diff --git a/public/main.css b/public/main.css index 55c298c..52b2460 100644 --- a/public/main.css +++ b/public/main.css @@ -41,6 +41,12 @@ body { font-style: italic; } +.g-Notes { + background-color: #eee; + padding: 1rem; + border-radius: 0.25rem; +} + /* Parts */ .g-Parts { diff --git a/src/main.lisp b/src/main.lisp index 70b1bab..be2491a 100644 --- a/src/main.lisp +++ b/src/main.lisp @@ -53,6 +53,14 @@ (h "h1" '(("class" "g-Title")) (list title)) (h "div" '(("class" "g-Author")) (list from))))) +; Notes + +(defun notes-tags (notes) + (if + (eql notes nil) + nil + (h "div" '(("class" "g-Notes")) (list notes)))) + ; Part (defun part-name (key) @@ -178,6 +186,7 @@ (title (car (song-key 'title (cdr data)))) (from (car (song-key 'from (cdr data)))) (tonality (car (song-key 'tonality (cdr data)))) + (notes (car (song-key 'notes (cdr data)))) (chords (song-key 'chords (cdr data))) (lyrics (song-key 'lyrics (cdr data)))) (write-file output (page @@ -188,6 +197,7 @@ (list (h "a" '(("class" "g-Back") ("href" "/")) '("Retour à l’accueil")) (title-tags title from) + (notes-tags notes) (chord-tags chords tonality) (lyrics-tags lyrics))))))) |