feat: ship creator journey v2 and profile updates
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
'art',
|
||||
'loading' => 'lazy',
|
||||
'fetchpriority' => null,
|
||||
'imageSizes' => '(max-width: 640px) 50vw, (max-width: 1024px) 33vw, (max-width: 1536px) 25vw, 320px',
|
||||
])
|
||||
|
||||
@php
|
||||
@@ -105,6 +106,7 @@
|
||||
$imgSrcset = (string) ($art->thumb_srcset ?? $art->thumbnail_srcset ?? $imgSrc);
|
||||
$imgAvifSrcset = (string) ($art->thumb_avif_srcset ?? $imgSrcset);
|
||||
$imgWebpSrcset = (string) ($art->thumb_webp_srcset ?? $imgSrcset);
|
||||
$imgSizes = trim((string) $imageSizes);
|
||||
|
||||
$resolveDimension = function ($value, string $field, $fallback) {
|
||||
if (is_numeric($value)) {
|
||||
@@ -163,8 +165,17 @@
|
||||
if ($resolution !== '') {
|
||||
$metaParts[] = $resolution;
|
||||
}
|
||||
|
||||
$maturity = data_get($art, 'maturity');
|
||||
if (is_array($maturity)) {
|
||||
$maturity = (object) $maturity;
|
||||
}
|
||||
$shouldHide = (bool) data_get($maturity, 'should_hide', false);
|
||||
$shouldBlur = (bool) data_get($maturity, 'should_blur', false);
|
||||
$isMatureArtwork = (bool) data_get($maturity, 'is_mature_effective', false);
|
||||
@endphp
|
||||
|
||||
@unless($shouldHide)
|
||||
<article class="nova-card gallery-item artwork" itemscope itemtype="https://schema.org/ImageObject"
|
||||
data-art-id="{{ $art->id ?? '' }}"
|
||||
data-art-url="{{ $cardUrl }}"
|
||||
@@ -181,15 +192,19 @@
|
||||
<div class="absolute left-3 top-3 z-30 rounded-md bg-black/55 px-2 py-1 text-xs text-white backdrop-blur-sm">{{ $category }}</div>
|
||||
@endif
|
||||
|
||||
@if($shouldBlur && $isMatureArtwork)
|
||||
<div class="absolute right-3 top-3 z-30 rounded-md bg-amber-500/85 px-2 py-1 text-xs font-semibold text-black shadow-lg shadow-black/30 backdrop-blur-sm">Mature</div>
|
||||
@endif
|
||||
|
||||
<div class="nova-card-media relative overflow-hidden bg-neutral-900"@if($imgAspectRatio) style="aspect-ratio: {{ $imgAspectRatio }};"@endif>
|
||||
<div class="absolute inset-0 bg-gradient-to-br from-white/10 via-white/5 to-transparent pointer-events-none"></div>
|
||||
<picture>
|
||||
<source srcset="{{ $imgAvifSrcset }}" type="image/avif">
|
||||
<source srcset="{{ $imgWebpSrcset }}" type="image/webp">
|
||||
<source srcset="{{ $imgAvifSrcset }}" @if($imgSizes !== '') sizes="{{ $imgSizes }}" @endif type="image/avif">
|
||||
<source srcset="{{ $imgWebpSrcset }}" @if($imgSizes !== '') sizes="{{ $imgSizes }}" @endif type="image/webp">
|
||||
<img
|
||||
src="{{ $imgSrc }}"
|
||||
srcset="{{ $imgSrcset }}"
|
||||
sizes="(max-width: 768px) 50vw, (max-width: 1280px) 33vw, 20vw"
|
||||
@if($imgSizes !== '') sizes="{{ $imgSizes }}" @endif
|
||||
loading="{{ $loading }}"
|
||||
decoding="{{ $loading === 'eager' ? 'sync' : 'async' }}"
|
||||
@if($fetchpriority) fetchpriority="{{ $fetchpriority }}" @endif
|
||||
@@ -197,11 +212,18 @@
|
||||
alt="{{ e($title) }}"
|
||||
@if($imgWidth) width="{{ $imgWidth }}" @endif
|
||||
@if($imgHeight) height="{{ $imgHeight }}" @endif
|
||||
class="{{ $imgAspectRatio ? 'h-full w-full object-cover' : 'w-full h-auto' }} transition-[transform,filter] duration-300 ease-out group-hover:scale-[1.04]"
|
||||
class="{{ $imgAspectRatio ? 'h-full w-full object-cover' : 'w-full h-auto' }} transition-[transform,filter] duration-300 ease-out {{ $shouldBlur ? 'blur-xl scale-[1.08]' : 'group-hover:scale-[1.04]' }}"
|
||||
itemprop="thumbnailUrl"
|
||||
/>
|
||||
</picture>
|
||||
|
||||
@if($shouldBlur && $isMatureArtwork)
|
||||
<div class="pointer-events-none absolute inset-0 z-10 bg-black/25"></div>
|
||||
<div class="pointer-events-none absolute inset-x-0 bottom-0 z-20 bg-gradient-to-t from-black/85 via-black/45 to-transparent px-3 py-3 text-xs font-semibold uppercase tracking-[0.18em] text-white/90">
|
||||
Mature content blurred
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<div class="pointer-events-none absolute inset-x-0 bottom-0 z-20 bg-gradient-to-t from-black/80 via-black/40 to-transparent p-3 backdrop-blur-[2px] opacity-100 transition-opacity duration-200 md:opacity-0 md:group-hover:opacity-100 md:group-focus-visible:opacity-100">
|
||||
<div class="truncate text-sm font-semibold text-white">{{ $title }}</div>
|
||||
<div class="mt-1 flex items-start justify-between gap-3 text-xs text-white/80">
|
||||
@@ -222,3 +244,4 @@
|
||||
<span class="sr-only">{{ $title }} by {{ $author }}</span>
|
||||
</a>
|
||||
</article>
|
||||
@endunless
|
||||
|
||||
Reference in New Issue
Block a user