diskfloppy.me/resources/views/pages/bookmarks.blade.php

41 lines
1 KiB
PHP
Raw Normal View History

2023-06-13 22:50:07 +00:00
@extends('layouts.default')
2023-07-25 23:08:58 +00:00
@section('title', 'Bookmarks')
2023-06-13 22:50:07 +00:00
@section('description', 'This is the personal homepage of floppydisk.')
@section('content')
2023-07-25 23:08:58 +00:00
@php
$categories = DB::select('
SELECT id, name
2023-07-19 00:58:32 +00:00
FROM bookmark__categories
ORDER BY priority ASC
');
2023-07-25 23:08:58 +00:00
@endphp
2023-07-25 23:08:58 +00:00
@foreach ($categories as $category)
<table class="infotable">
2023-08-14 23:13:53 +00:00
<caption>
<h1>{{ $category->name }}</h1>
<hr>
</caption>
2023-07-25 23:08:58 +00:00
@php
$sites = DB::select(
'
SELECT name, url, description
2023-07-19 00:58:32 +00:00
FROM bookmark__sites
WHERE category_id = ? ORDER BY priority ASC
2023-07-25 23:08:58 +00:00
',
[$category->id],
);
@endphp
@foreach ($sites as $site)
<tr>
<td><a href="{{ $site->url }}">{{ $site->name }}</a>
- {{ $site->description }}</td>
</tr>
@endforeach
</table>
<br>
2023-06-13 22:50:07 +00:00
@endforeach
@stop