aboutsummaryrefslogtreecommitdiff
path: root/resources/views/pages/bookmarks.blade.php
blob: cbc67eeff36687cc9094fee2e72d873e699f9ad5 (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
@extends('layouts.default')
@section('title', 'Bookmarks')
@section('description', 'This is the personal homepage of floppydisk.')
@section('content')
    @php
        $categories = DB::select('
        SELECT id, name
        FROM bookmark__categories
        ORDER BY priority ASC
    ');
    @endphp

    @foreach ($categories as $category)
        <table class="infotable">

            <tr>
                <td colspan="2">
                    <h1>{{ $category->name }}</h1>
                </td>
            </tr>
            <tr>
                <td colspan="2">
                    <hr>
                </td>
            </tr>

            @php
                $sites = DB::select(
                    '
            SELECT name, url, description
            FROM bookmark__sites
            WHERE category_id = ? ORDER BY priority ASC
        ',
                    [$category->id],
                );
            @endphp
            @foreach ($sites as $site)
                <tr>
                    <td><a href="{{ $site->url }}">{{ $site->name }}</a>
                        - {{ $site->description }}</td>
                </tr>
            @endforeach
        </table>
        <br>
    @endforeach
@stop