Backend for songs.zachdecook.com
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
@extends('layouts.app')
@section('title', "All songs")
@section('content')
<div class='container'>
<h1>
Prosongsa Songs
</h1>
<form>
<input id='toc-filter' placeholder='filter songs'>
</form>
Sort by:
@foreach(['id','title','author'] as $key)
<a href='/?sort={{$key}}'>
@if(($_GET['sort'] ??'title') ==$key)
<i>{{$key}}</i>
@else
<b>{{$key}}</b>
@endif
</a>
@endforeach
<ul id='toc'>
@foreach( App\Song::orderBy($_GET['sort']??'title')->get() as $song )
<li>
<a href='{{ route('song.show', ['song' => $song]) }}'>
{{ $song->name }}
</a>
@endforeach
</ul>
<script src='js/toc-filter.js?nojq' defer></script>
</div>
@endsection
|