fixes
This commit is contained in:
17
resources/views/dashboard/comments.blade.php
Normal file
17
resources/views/dashboard/comments.blade.php
Normal file
@@ -0,0 +1,17 @@
|
||||
@extends('layouts.nova')
|
||||
|
||||
@section('content')
|
||||
<div class="container mx-auto py-8">
|
||||
<h1 class="text-2xl font-semibold mb-4">Comments</h1>
|
||||
|
||||
@if(empty($comments))
|
||||
<p class="text-sm text-gray-500">No comments to show.</p>
|
||||
@else
|
||||
<ul class="space-y-2">
|
||||
@foreach($comments as $c)
|
||||
<li>{{ $c }}</li>
|
||||
@endforeach
|
||||
</ul>
|
||||
@endif
|
||||
</div>
|
||||
@endsection
|
||||
63
resources/views/dashboard/favorites.blade.php
Normal file
63
resources/views/dashboard/favorites.blade.php
Normal file
@@ -0,0 +1,63 @@
|
||||
@extends('layouts.nova')
|
||||
|
||||
@section('content')
|
||||
<div class="container mx-auto py-8">
|
||||
<h1 class="text-2xl font-semibold mb-4">Favourites</h1>
|
||||
|
||||
<div class="mb-4 flex items-center justify-between">
|
||||
<div class="text-sm text-muted">Showing your favourites</div>
|
||||
<div>
|
||||
<form method="GET" class="inline">
|
||||
<label class="text-sm mr-2">Sort</label>
|
||||
<select name="sort" onchange="this.form.submit()" class="rounded bg-panel px-2 py-1 text-sm">
|
||||
<option value="newest" {{ ($sort ?? 'newest') === 'newest' ? 'selected' : '' }}>Newest first</option>
|
||||
<option value="oldest" {{ ($sort ?? '') === 'oldest' ? 'selected' : '' }}>Oldest first</option>
|
||||
</select>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@if($artworks->isEmpty())
|
||||
<p class="text-sm text-gray-500">You have no favourites yet.</p>
|
||||
@else
|
||||
<div class="overflow-x-auto bg-panel rounded">
|
||||
<table class="min-w-full text-sm">
|
||||
<thead>
|
||||
<tr class="border-b border-panel">
|
||||
<th class="p-2 text-left">Thumb</th>
|
||||
<th class="p-2 text-left">Name</th>
|
||||
<th class="p-2 text-left">Author</th>
|
||||
<th class="p-2 text-left">Published</th>
|
||||
<th class="p-2 text-left">Actions</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($artworks as $art)
|
||||
<tr class="border-b border-panel">
|
||||
<td class="p-2 w-24">
|
||||
<a href="/art/{{ $art->id }}/{{ Illuminate\Support\Str::slug($art->title ?? 'art') }}">
|
||||
<img src="{{ $art->thumb ?? '/gfx/sb_join.jpg' }}" alt="{{ $art->title }}" class="w-20 h-12 object-cover rounded" />
|
||||
</a>
|
||||
</td>
|
||||
<td class="p-2">
|
||||
<a href="/art/{{ $art->id }}/{{ Illuminate\Support\Str::slug($art->title ?? 'art') }}" class="font-medium">{{ $art->title }}</a>
|
||||
</td>
|
||||
<td class="p-2">{{ $art->author }}</td>
|
||||
<td class="p-2">{{ optional($art->published_at)->format('Y-m-d') }}</td>
|
||||
<td class="p-2">
|
||||
<form method="POST" action="{{ route('dashboard.favorites.destroy', ['artwork' => $art->id]) }}" onsubmit="return confirm('Really remove from favourites?');">
|
||||
@csrf
|
||||
@method('DELETE')
|
||||
<button type="submit" class="text-sm text-red-500 hover:underline">Remove</button>
|
||||
</form>
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="mt-6">{{ $artworks->links() }}</div>
|
||||
@endif
|
||||
</div>
|
||||
@endsection
|
||||
17
resources/views/dashboard/followers.blade.php
Normal file
17
resources/views/dashboard/followers.blade.php
Normal file
@@ -0,0 +1,17 @@
|
||||
@extends('layouts.nova')
|
||||
|
||||
@section('content')
|
||||
<div class="container mx-auto py-8">
|
||||
<h1 class="text-2xl font-semibold mb-4">Followers</h1>
|
||||
|
||||
@if(empty($followers))
|
||||
<p class="text-sm text-gray-500">You have no followers yet.</p>
|
||||
@else
|
||||
<ul class="space-y-2">
|
||||
@foreach($followers as $f)
|
||||
<li>{{ $f }}</li>
|
||||
@endforeach
|
||||
</ul>
|
||||
@endif
|
||||
</div>
|
||||
@endsection
|
||||
17
resources/views/dashboard/following.blade.php
Normal file
17
resources/views/dashboard/following.blade.php
Normal file
@@ -0,0 +1,17 @@
|
||||
@extends('layouts.nova')
|
||||
|
||||
@section('content')
|
||||
<div class="container mx-auto py-8">
|
||||
<h1 class="text-2xl font-semibold mb-4">Following</h1>
|
||||
|
||||
@if(empty($following))
|
||||
<p class="text-sm text-gray-500">You are not following anyone yet.</p>
|
||||
@else
|
||||
<ul class="space-y-2">
|
||||
@foreach($following as $f)
|
||||
<li>{{ $f }}</li>
|
||||
@endforeach
|
||||
</ul>
|
||||
@endif
|
||||
</div>
|
||||
@endsection
|
||||
35
resources/views/dashboard/gallery.blade.php
Normal file
35
resources/views/dashboard/gallery.blade.php
Normal file
@@ -0,0 +1,35 @@
|
||||
@extends('layouts.nova')
|
||||
|
||||
@section('content')
|
||||
<div class="container mx-auto py-8">
|
||||
<h1 class="text-2xl font-semibold mb-4">My Gallery</h1>
|
||||
|
||||
@if($artworks->isEmpty())
|
||||
<p class="text-sm text-gray-500">You have not uploaded any artworks yet.</p>
|
||||
@else
|
||||
<div class="grid grid-cols-2 md:grid-cols-4 gap-4">
|
||||
@foreach($artworks as $art)
|
||||
<div class="bg-panel p-3 rounded">
|
||||
<a href="/art/{{ $art->id }}/{{ Illuminate\Support\Str::slug($art->title ?? 'art') }}">
|
||||
<img src="{{ $art->thumbUrl('md') ?? '/gfx/sb_join.jpg' }}" alt="{{ $art->title }}" class="w-full h-36 object-cover rounded" />
|
||||
</a>
|
||||
<div class="mt-2 text-sm">
|
||||
<a class="font-medium" href="/art/{{ $art->id }}/{{ Illuminate\Support\Str::slug($art->title ?? 'art') }}">{{ $art->title }}</a>
|
||||
<div class="text-xs text-soft mt-1">Published: {{ optional($art->published_at)->format('Y-m-d') }}</div>
|
||||
<div class="mt-2 flex gap-2">
|
||||
<a href="{{ route('dashboard.artworks.edit', ['id' => $art->id]) }}" class="text-xs px-2 py-1 bg-black/10 rounded">Edit</a>
|
||||
<form method="POST" action="{{ route('dashboard.artworks.destroy', ['id' => $art->id]) }}" onsubmit="return confirm('Really delete this artwork?');">
|
||||
@csrf
|
||||
@method('DELETE')
|
||||
<button type="submit" class="text-xs px-2 py-1 bg-red-600 text-white rounded">Delete</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endforeach
|
||||
</div>
|
||||
|
||||
<div class="mt-6">{{ $artworks->links() }}</div>
|
||||
@endif
|
||||
</div>
|
||||
@endsection
|
||||
Reference in New Issue
Block a user