diff options
| author | Zach DeCook <zachdecook@librem.one> | 2021-03-12 03:43:22 +0000 |
|---|---|---|
| committer | Zach DeCook <zachdecook@librem.one> | 2021-03-12 03:43:22 +0000 |
| commit | 6752db1909b113db070e7c4c5e2717635571f994 (patch) | |
| tree | 7cbd4e2ba9dcb88ba6cd0c894662700ce243656e | |
| parent | dd531da860abeed873a5da03dfdc86b5bb94539d (diff) | |
| download | prosongsa-6752db1909b113db070e7c4c5e2717635571f994.tar.gz | |
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; ?> |
