Profile: store covers in object storage (WebP); add covers config; remember artworks categories content-type preference
This commit is contained in:
@@ -17,7 +17,7 @@ use Illuminate\Pagination\AbstractCursorPaginator;
|
||||
|
||||
class BrowseGalleryController extends \App\Http\Controllers\Controller
|
||||
{
|
||||
private const CONTENT_TYPE_SLUGS = ['photography', 'wallpapers', 'skins', 'other'];
|
||||
private const CONTENT_TYPE_SLUGS = ['photography', 'wallpapers', 'skins', 'other', 'digital-art'];
|
||||
|
||||
/**
|
||||
* Meilisearch sort-field arrays per sort alias.
|
||||
@@ -108,7 +108,7 @@ class BrowseGalleryController extends \App\Http\Controllers\Controller
|
||||
'sort_options' => self::SORT_OPTIONS,
|
||||
'hero_title' => 'Browse Artworks',
|
||||
'hero_description' => 'List of all uploaded artworks across Skins, Wallpapers, Photography, and Other.',
|
||||
'breadcrumbs' => collect(),
|
||||
'breadcrumbs' => collect([(object) ['name' => 'Explore', 'url' => '/browse']]),
|
||||
'page_title' => 'Browse Uploaded Artworks - Photography, Wallpapers and Skins at SkinBase',
|
||||
'page_meta_description' => "Browse Uploaded Photography, Wallpapers and Skins to one of the world's oldest online social community for artists and art enthusiasts.",
|
||||
'page_meta_keywords' => 'photography, wallpapers, skins, stock, browse, social, community, artist, picture, photo',
|
||||
@@ -164,7 +164,10 @@ class BrowseGalleryController extends \App\Http\Controllers\Controller
|
||||
'sort_options' => self::SORT_OPTIONS,
|
||||
'hero_title' => $contentType->name,
|
||||
'hero_description' => $contentType->description ?? ($contentType->name . ' artworks on Skinbase.'),
|
||||
'breadcrumbs' => collect([(object) ['name' => $contentType->name, 'url' => '/' . $contentSlug]]),
|
||||
'breadcrumbs' => collect([
|
||||
(object) ['name' => 'Explore', 'url' => '/browse'],
|
||||
(object) ['name' => $contentType->name, 'url' => '/' . $contentSlug],
|
||||
]),
|
||||
'page_title' => $contentType->name . ' – Skinbase Nova',
|
||||
'page_meta_description' => $contentType->description ?? ('Discover the best ' . $contentType->name . ' artworks on Skinbase'),
|
||||
'page_meta_keywords' => strtolower($contentType->slug) . ', skinbase, artworks, wallpapers, skins, photography',
|
||||
@@ -204,8 +207,17 @@ class BrowseGalleryController extends \App\Http\Controllers\Controller
|
||||
$subcategories = $rootCategories;
|
||||
}
|
||||
|
||||
$breadcrumbs = collect($category->breadcrumbs)
|
||||
->map(function (Category $crumb) {
|
||||
$breadcrumbs = collect(array_merge([
|
||||
(object) [
|
||||
'name' => 'Explore',
|
||||
'url' => '/browse',
|
||||
],
|
||||
(object) [
|
||||
'name' => $contentType->name,
|
||||
'url' => '/' . $contentSlug,
|
||||
],
|
||||
], $category->breadcrumbs))
|
||||
->map(function ($crumb) {
|
||||
return (object) [
|
||||
'name' => $crumb->name,
|
||||
'url' => $crumb->url,
|
||||
@@ -344,7 +356,8 @@ class BrowseGalleryController extends \App\Http\Controllers\Controller
|
||||
|
||||
private function mainCategories(): Collection
|
||||
{
|
||||
return ContentType::orderBy('id')
|
||||
return ContentType::ordered()
|
||||
->whereIn('slug', self::CONTENT_TYPE_SLUGS)
|
||||
->get(['name', 'slug'])
|
||||
->map(function (ContentType $type) {
|
||||
return (object) [
|
||||
|
||||
Reference in New Issue
Block a user