fixes gallery
This commit is contained in:
@@ -91,9 +91,12 @@
|
||||
return (int) $fallback;
|
||||
};
|
||||
|
||||
$imgWidth = max(1, $resolveDimension($art->width ?? null, 'width', 800));
|
||||
$imgHeight = max(1, $resolveDimension($art->height ?? null, 'height', 600));
|
||||
$imgAspectRatio = $imgWidth . ' / ' . $imgHeight;
|
||||
// Use stored dimensions when available; otherwise leave ratio unconstrained
|
||||
// so the thumbnail displays at its natural proportions (no 1:1 or 16:9 forcing).
|
||||
$hasDimensions = ($art->width ?? 0) > 0 && ($art->height ?? 0) > 0;
|
||||
$imgWidth = $hasDimensions ? max(1, $resolveDimension($art->width, 'width', 0)) : null;
|
||||
$imgHeight = $hasDimensions ? max(1, $resolveDimension($art->height, 'height', 0)) : null;
|
||||
$imgAspectRatio = $hasDimensions ? ($imgWidth . ' / ' . $imgHeight) : null;
|
||||
|
||||
$contentUrl = $imgSrc;
|
||||
$cardUrl = (string) ($art->url ?? '');
|
||||
@@ -134,8 +137,8 @@
|
||||
<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
|
||||
|
||||
<div class="nova-card-media relative overflow-hidden bg-neutral-900" style="aspect-ratio: {{ $imgAspectRatio }};">
|
||||
<div class="absolute inset-0 bg-gradient-to-br from-white/10 via-white/5 to-transparent"></div>
|
||||
<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">
|
||||
@@ -148,9 +151,9 @@
|
||||
@if($fetchpriority) fetchpriority="{{ $fetchpriority }}" @endif
|
||||
@if($loading !== 'eager') data-blur-preview @endif
|
||||
alt="{{ e($title) }}"
|
||||
width="{{ $imgWidth }}"
|
||||
height="{{ $imgHeight }}"
|
||||
class="h-full w-full object-cover transition-[transform,filter] duration-300 ease-out group-hover:scale-[1.04]"
|
||||
@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]"
|
||||
itemprop="thumbnailUrl"
|
||||
/>
|
||||
</picture>
|
||||
|
||||
@@ -49,7 +49,7 @@
|
||||
|
||||
<div class="relative">
|
||||
<button class="hover:text-white inline-flex items-center gap-1" data-dd="cats">
|
||||
Categories
|
||||
Explore
|
||||
<svg class="w-4 h-4 opacity-70" viewBox="0 0 24 24" fill="none" stroke="currentColor"
|
||||
stroke-width="2">
|
||||
<path d="M6 9l6 6 6-6" />
|
||||
@@ -57,12 +57,12 @@
|
||||
</button>
|
||||
<div id="dd-cats"
|
||||
class="hidden absolute left-0 mt-2 w-64 rounded-lg bg-panel border border-panel shadow-sb overflow-hidden">
|
||||
<a class="block px-4 py-2 text-sm hover:bg-white/5" href="/browse">All Artworks</a>
|
||||
<a class="block px-4 py-2 text-sm hover:bg-white/5" href="/photography">Photography</a>
|
||||
<a class="block px-4 py-2 text-sm hover:bg-white/5" href="/wallpapers">Wallpapers</a>
|
||||
<a class="block px-4 py-2 text-sm hover:bg-white/5" href="/skins">Skins</a>
|
||||
<a class="block px-4 py-2 text-sm hover:bg-white/5" href="/other">Other</a>
|
||||
<a class="block px-4 py-2 text-sm hover:bg-white/5" href="/featured-artworks">Featured Artwork</a>
|
||||
<a class="block px-4 py-2 text-sm hover:bg-white/5" href="/browse"><i class="fa-solid fa-border-all mr-3 text-sb-muted"></i>All Artworks</a>
|
||||
<a class="block px-4 py-2 text-sm hover:bg-white/5" href="/photography"><i class="fa-solid fa-camera mr-3 text-sb-muted"></i>Photography</a>
|
||||
<a class="block px-4 py-2 text-sm hover:bg-white/5" href="/wallpapers"><i class="fa-solid fa-desktop mr-3 text-sb-muted"></i>Wallpapers</a>
|
||||
<a class="block px-4 py-2 text-sm hover:bg-white/5" href="/skins"><i class="fa-solid fa-layer-group mr-3 text-sb-muted"></i>Skins</a>
|
||||
<a class="block px-4 py-2 text-sm hover:bg-white/5" href="/other"><i class="fa-solid fa-folder-open mr-3 text-sb-muted"></i>Other</a>
|
||||
<a class="block px-4 py-2 text-sm hover:bg-white/5" href="/featured-artworks"><i class="fa-solid fa-star mr-3 text-sb-muted"></i>Featured Artwork</a>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
6
resources/views/legacy/[#6223] Red Cloud XP.txt
Normal file
6
resources/views/legacy/[#6223] Red Cloud XP.txt
Normal file
@@ -0,0 +1,6 @@
|
||||
[#6223] Red Cloud XP
|
||||
→ windows-logo, retro-computing, red-dominant-colour, dark-mood, pixelated-graphics, digital-art, grunge-texture, office-shortcuts-menu, 90s-aesthetic, chromatic-aberration, high-contrast, textured-background
|
||||
[#6225] Helping Hand zoomers (part 1)
|
||||
→ desktop screenshot, computer icons, windows interface, digital-art, blue-grey tones, flat design, minimalist-style, iconography, organized layout, technical illustration, screen capture, system icons
|
||||
[#6226] Helping Hand zoomers (part 2)
|
||||
PS D:\Sites\Skinbase26>
|
||||
@@ -20,7 +20,7 @@
|
||||
|
||||
{{-- Latest uploads grid — use same Nova gallery layout as /browse --}}
|
||||
<section class="px-6 pb-10 pt-6 md:px-10" data-nova-gallery data-gallery-type="home-uploads">
|
||||
<div class="{{ ($gridV2 ?? false) ? 'gallery' : 'grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-6' }}" data-gallery-grid>
|
||||
<div class="{{ ($gridV2 ?? false) ? 'gallery' : 'grid grid-cols-1 md:grid-cols-2 lg:grid-cols-5 gap-6' }}" data-gallery-grid>
|
||||
@forelse($latestUploads as $upload)
|
||||
<x-artwork-card :art="$upload" />
|
||||
@empty
|
||||
@@ -53,10 +53,10 @@
|
||||
[data-nova-gallery].is-enhanced [data-gallery-grid] { grid-template-columns: repeat(2, minmax(0, 1fr)); }
|
||||
}
|
||||
@media (min-width: 1024px) {
|
||||
[data-nova-gallery].is-enhanced [data-gallery-grid] { grid-template-columns: repeat(4, minmax(0, 1fr)); }
|
||||
[data-nova-gallery].is-enhanced [data-gallery-grid] { grid-template-columns: repeat(5, minmax(0, 1fr)); }
|
||||
}
|
||||
@media (min-width: 2600px) {
|
||||
[data-nova-gallery].is-enhanced [data-gallery-grid] { grid-template-columns: repeat(5, minmax(0, 1fr)); }
|
||||
[data-nova-gallery].is-enhanced [data-gallery-grid] { grid-template-columns: repeat(6, minmax(0, 1fr)); }
|
||||
}
|
||||
[data-nova-gallery].is-enhanced [data-gallery-grid] > .nova-card { margin: 0 !important; }
|
||||
[data-nova-gallery].is-enhanced [data-gallery-pagination] { display: none; }
|
||||
|
||||
Reference in New Issue
Block a user