@extends('layouts.nova') @php $discoverBreadcrumbs = collect([ (object) ['name' => 'Discover', 'url' => '/discover/trending'], (object) ['name' => $page_title ?? 'Discover', 'url' => request()->path()], ]); @endphp @php $followingActivity = collect($following_activity ?? []); $networkTrending = collect($network_trending ?? []); $suggestedUsers = collect($suggested_users ?? $fallback_creators ?? []); $fallbackTrending = collect($fallback_trending ?? []); @endphp @section('content') @include('web.discover._nav', ['section' => $section ?? '']) @if (($section ?? null) === 'following')
@if (!empty($empty))

Personalized following feed

Your network starts here

Follow a few creators to unlock a feed made of their newest art, social activity, and rising work from around your network.

@endif

Activity from people you follow

Network activity

View all
@forelse ($followingActivity as $activity)
{{ data_get($activity, 'user.username') }}

{{ data_get($activity, 'user.username') ? '@' . data_get($activity, 'user.username') : data_get($activity, 'user.name', 'Creator') }}

@if (data_get($activity, 'type') === 'follow') started following {{ data_get($activity, 'target_user.username') ? '@' . data_get($activity, 'target_user.username') : 'another creator' }} @elseif (data_get($activity, 'type') === 'upload') published {{ data_get($activity, 'artwork.title', 'a new artwork') }} @elseif (in_array(data_get($activity, 'type'), ['comment', 'reply'], true)) {{ data_get($activity, 'type') === 'reply' ? 'replied on' : 'commented on' }} {{ data_get($activity, 'artwork.title', 'an artwork') }} @else {{ ucfirst(str_replace('_', ' ', (string) data_get($activity, 'type', 'activity'))) }} @endif

{{ data_get($activity, 'time_ago') ?: data_get($activity, 'created_at') }}

@empty
Follow activity will appear here as your network starts moving.
@endforelse

Trending in your network

Network highlights

@foreach (($empty ?? false) ? $fallbackTrending->take(4) : $networkTrending->take(4) as $item) @php $itemId = (int) data_get($item, 'id', 0); $itemSlug = (string) data_get($item, 'slug', ''); $itemUrl = $itemSlug !== '' && $itemId > 0 ? route('art.show', ['id' => $itemId, 'slug' => $itemSlug]) : data_get($item, 'url', '#'); $itemThumb = data_get($item, 'thumb_url') ?: data_get($item, 'thumb') ?: data_get($item, 'thumbnail_url') ?: '/images/placeholder.jpg'; $itemTitle = data_get($item, 'title') ?: data_get($item, 'name', 'Artwork'); @endphp {{ $itemTitle }}

{{ $itemTitle ?: 'Untitled artwork' }}

{{ data_get($item, 'author.username') ? '@' . data_get($item, 'author.username') : data_get($item, 'username', data_get($item, 'uname')) }}

@if (is_array($item) && isset($item['stats']))

{{ number_format((int) data_get($item, 'stats.favorites', 0)) }} favourites · {{ number_format((int) data_get($item, 'stats.views', 0)) }} views

@endif
@endforeach
@endif {{-- ── Artwork grid (React MasonryGallery) ── --}} @php $galleryItems = method_exists($artworks, 'items') ? $artworks->items() : (is_iterable($artworks) ? $artworks : []); $galleryArtworks = collect($galleryItems)->map(fn ($art) => [ 'id' => $art->id, 'name' => $art->name ?? null, 'thumb' => $art->thumb_url ?? $art->thumb ?? null, 'thumb_srcset' => $art->thumb_srcset ?? null, 'uname' => $art->uname ?? '', 'username' => $art->uname ?? '', 'avatar_url' => $art->avatar_url ?? null, 'category_name' => $art->category_name ?? '', 'category_slug' => $art->category_slug ?? '', 'slug' => $art->slug ?? '', 'width' => $art->width ?? null, 'height' => $art->height ?? null, ])->values(); $galleryNextPageUrl = method_exists($artworks, 'nextPageUrl') ? $artworks->nextPageUrl() : null; @endphp
@endsection @push('styles') @endpush @push('scripts') @vite('resources/js/entry-masonry-gallery.jsx') @endpush