Profile: store covers in object storage (WebP); add covers config; remember artworks categories content-type preference

This commit is contained in:
2026-03-29 09:22:36 +02:00
parent cab4fbd83e
commit 1da7d3bf88
27 changed files with 703 additions and 448 deletions

View File

@@ -7,14 +7,28 @@
@php
$active = $section ?? 'artworks';
$includeTags = (bool) ($includeTags ?? false);
$contentTypes = collect($contentTypes ?? $mainCategories ?? []);
$iconMap = [
'photography' => 'fa-camera',
'wallpapers' => 'fa-desktop',
'skins' => 'fa-layer-group',
'digital-art' => 'fa-palette',
'other' => 'fa-folder-open',
];
$sections = collect([
'artworks' => ['label' => 'All Artworks', 'icon' => 'fa-border-all', 'href' => '/browse'],
'photography' => ['label' => 'Photography', 'icon' => 'fa-camera', 'href' => '/photography'],
'wallpapers' => ['label' => 'Wallpapers', 'icon' => 'fa-desktop', 'href' => '/wallpapers'],
'skins' => ['label' => 'Skins', 'icon' => 'fa-layer-group', 'href' => '/skins'],
'other' => ['label' => 'Other', 'icon' => 'fa-folder-open', 'href' => '/other'],
]);
])->merge(
$contentTypes->mapWithKeys(function ($type) use ($iconMap) {
$slug = strtolower((string) ($type->slug ?? ''));
return [$slug => [
'label' => $type->name,
'icon' => $iconMap[$slug] ?? 'fa-folder-open',
'href' => $type->url ?? ('/' . $slug),
]];
})
);
if ($includeTags) {
$sections->put('tags', ['label' => 'Tags', 'icon' => 'fa-tags', 'href' => '/tags']);