Backend for songs.zachdecook.com
* Gemini Song Page: Add chord symbols
| -rwxr-xr-x | laravel/public/chord.svg | 4 | ||||
| l--------- | laravel/public/public | 1 | ||||
| -rwxr-xr-x | laravel/public/song.gmi.php | 3 |
3 files changed, 8 insertions, 0 deletions
diff --git a/laravel/public/chord.svg b/laravel/public/chord.svg new file mode 100755 index 0000000..4b62993 --- /dev/null +++ b/laravel/public/chord.svg @@ -0,0 +1,4 @@ +#!/bin/sh +printf "20 image/svg+xml\r\n" +# TODO: Strip the preceding slash from $PATH_INFO +ccharter $QUERY_STRING $PATH_INFO diff --git a/laravel/public/public b/laravel/public/public new file mode 120000 index 0000000..945c9b4 --- /dev/null +++ b/laravel/public/public @@ -0,0 +1 @@ +.
\ No newline at end of file diff --git a/laravel/public/song.gmi.php b/laravel/public/song.gmi.php index e4a84d6..2535ca2 100755 --- a/laravel/public/song.gmi.php +++ b/laravel/public/song.gmi.php @@ -29,6 +29,9 @@ printf("30 " . Song::inRandomOrder()->first()->id . "\r\n");return; <?= $song->textTranspose(getenv('QUERY_STRING')??'') ?> ``` +<?php foreach($song->chords as $symbol => $tabs): ?> +=> /chord.svg/<?=$symbol?>?<?=$tabs[0]?> <?= $symbol ?> chord symbol +<?php endforeach; ?> => mailto:zachdecook+songs@gmail.com?subject=<?= rawurlencode(json_encode([ |