about summary refs log tree commit diff
path: root/laravel/public/index.gmi
diff options
context:
space:
mode:
authorZach DeCook <zachdecook@librem.one>2021-03-12 03:43:22 +0000
committerZach DeCook <zachdecook@librem.one>2021-03-12 03:43:22 +0000
commit6752db1909b113db070e7c4c5e2717635571f994 (patch)
tree7cbd4e2ba9dcb88ba6cd0c894662700ce243656e /laravel/public/index.gmi
parentdd531da860abeed873a5da03dfdc86b5bb94539d (diff)
downloadprosongsa-6752db1909b113db070e7c4c5e2717635571f994.tar.gz
Gemini Home: Add random song button, sort by id
Diffstat (limited to 'laravel/public/index.gmi')
-rwxr-xr-xlaravel/public/index.gmi6
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; ?>