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

47 lines
1.2 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">
<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
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