feat: increase gallery grid from 4 to 5 columns per row on desktopfeat: increase gallery grid from 4 to 5 columns per row on desktop

This commit is contained in:
2026-02-25 19:11:23 +01:00
parent 5c97488e80
commit 0032aec02f
131 changed files with 15674 additions and 597 deletions

View File

@@ -42,6 +42,18 @@ Route::middleware(['web', 'normalize.username', 'throttle:30,1'])
->get('username/availability', \App\Http\Controllers\Api\UsernameAvailabilityController::class)
->name('api.username.availability');
// Artwork navigation — prev/next neighbors for the fullscreen viewer
Route::middleware(['throttle:60,1'])
->get('artworks/navigation/{id}', [\App\Http\Controllers\Api\ArtworkNavigationController::class, 'neighbors'])
->where('id', '[0-9]+')
->name('api.artworks.navigation');
// Artwork page data by ID — for client-side (no-reload) navigation
Route::middleware(['throttle:60,1'])
->get('artworks/{id}/page', [\App\Http\Controllers\Api\ArtworkNavigationController::class, 'pageData'])
->where('id', '[0-9]+')
->name('api.artworks.page-data');
Route::middleware(['web', 'auth', 'normalize.username'])->prefix('artworks')->name('api.artworks.')->group(function () {
Route::post('/', [\App\Http\Controllers\Api\ArtworkController::class, 'store'])
->name('store');
@@ -133,8 +145,23 @@ Route::middleware(['web', 'auth', 'normalize.username'])->prefix('discovery')->n
->name('events.store');
});
// Tag system (auth-protected; 404-only ownership checks handled in requests/controllers)
Route::middleware(['web', 'auth', 'normalize.username'])->prefix('tags')->name('api.tags.')->group(function () {
// ─── Artwork Search (Meilisearch-powered, public) ────────────────────────────
Route::prefix('search')->name('api.search.')->middleware(['web', 'throttle:60,1'])->group(function () {
Route::get('artworks', [\App\Http\Controllers\Api\Search\ArtworkSearchController::class, 'index'])
->name('artworks');
Route::get('artworks/tag/{slug}', [\App\Http\Controllers\Api\Search\ArtworkSearchController::class, 'byTag'])
->where('slug', '[a-z0-9\-]+')
->name('artworks.tag');
Route::get('artworks/category/{cat}', [\App\Http\Controllers\Api\Search\ArtworkSearchController::class, 'byCategory'])
->where('cat', '[a-z0-9\-]+')
->name('artworks.category');
Route::get('artworks/related/{id}', [\App\Http\Controllers\Api\Search\ArtworkSearchController::class, 'related'])
->whereNumber('id')
->name('artworks.related');
});
// Tag search/popular: public endpoints (used by SearchBar for all visitors)
Route::middleware(['web', 'throttle:60,1'])->prefix('tags')->name('api.tags.')->group(function () {
Route::get('search', [\App\Http\Controllers\Api\TagController::class, 'search'])->name('search');
Route::get('popular', [\App\Http\Controllers\Api\TagController::class, 'popular'])->name('popular');
});
@@ -146,6 +173,23 @@ Route::middleware(['web', 'auth', 'normalize.username'])->prefix('artworks')->na
Route::delete('{id}/tags/{tag}', [\App\Http\Controllers\Api\ArtworkTagController::class, 'destroy'])->whereNumber('id')->name('destroy');
});
// Artwork Awards
Route::middleware(['web', 'auth', 'normalize.username', 'throttle:20,1'])
->prefix('artworks')
->name('api.artworks.awards.')
->group(function () {
Route::post('{id}/award', [\App\Http\Controllers\Api\ArtworkAwardController::class, 'store']) ->whereNumber('id')->name('store');
Route::put('{id}/award', [\App\Http\Controllers\Api\ArtworkAwardController::class, 'update']) ->whereNumber('id')->name('update');
Route::delete('{id}/award', [\App\Http\Controllers\Api\ArtworkAwardController::class, 'destroy']) ->whereNumber('id')->name('destroy');
});
Route::middleware(['web'])
->prefix('artworks')
->name('api.artworks.awards.show.')
->group(function () {
Route::get('{id}/awards', [\App\Http\Controllers\Api\ArtworkAwardController::class, 'show'])->whereNumber('id')->name('show');
});
Route::middleware(['web', 'auth', 'normalize.username'])->group(function () {
Route::post('artworks/{id}/favorite', [\App\Http\Controllers\Api\ArtworkInteractionController::class, 'favorite'])
->whereNumber('id')