Backend for songs.zachdecook.com
Gemini Home: Add random song button, sort by id
| -rwxr-xr-x | laravel/public/index.gmi | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/laravel/public/index.gmi b/laravel/public/index.gmi index 492ed92..8bc26d5 100755 --- a/laravel/public/index.gmi +++ b/laravel/public/index.gmi @@ -11,12 +11,14 @@ printf("20 text/gemini\r\n"); ?> # Prosongsa Songs -<?php foreach(['title','author'] as $key): ?> +=> /song.gmi.php/ Random song + +<?php foreach(['title','author','id'] as $key): ?> => /?<?=$key?> Sort by <?=$key?> <?php endforeach; ?> -<?php foreach(Song::all()->sortBy(getenv('QUERY_STRING')??'title')->pluck('title','id') as $id => $title): ?> +<?php foreach(Song::all()->sortBy(getenv('QUERY_STRING')?:'title')->pluck('title','id') as $id => $title): ?> => /song.gmi.php/<?=$id?> <?= $title ?> <?php endforeach; ?> |