summaryrefslogtreecommitdiff
path: root/resources/views/writings/index.blade.php
blob: 7e123336d2c018bb61709e0ca7ace53bcfa19bef (plain)
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
@extends('template')
@section('head')
@v('js/writing_index.js')
<script src="https://cdn.jsdelivr.net/npm/marked/marked.min.js"></script>
@endsection
@section('content')
<main>
    <div >
        <section>
            <h1 >Writings</h1>
            <p >Thoughts, ideas, words potentially worth publishing</p>
            <a href = "/w/create">Write Something</a>
            <!-- TODO search -->
            <div class = "sidebar">
                <legend>Sort by: </legend>
                <select name = "sort_method" id = "sort_method">
                    <option value = "date">Date</option>
                    <option value = "user">Author</option>
                    <option value = "title">Title</option>        
                </select>
                <fieldset id = "filter_method">
                    <legend>Filter: </legend>
                    <div>
                      <input type="checkbox" id="checkbox_author1" name="checkbox_author1" value="Author 1 (placeholder TODO)">
                      <label for="checkbox_author1">Author 1 (placeholder TODO)</label>
                    </div>
                </fieldset>
            </div>
            
        </section>

        <section>
            @foreach ($writings as $writing)
                <article>
                    <a href="{{ route('w.show', $writing->id) }}" >
                        <h2 >
                            {{ $writing->title }}
                        </h2>
                        
                        <div >
                            {{ $writing->created_at }}
                        </div>

                        <div >
                            Read more →
                        </div>
                    </a>
                </article>
            @endforeach
        </section>



        @if ($writings->hasPages())
            <div >
                {{ $writings->links() }}
            </div>
        @endif
    </div>
</main>
@endsection