Refactor social link icon handling to support file uploads; update display logic in welcome view for improved responsiveness and fallback for missing icons. Simplify category visibility toggling in JavaScript.

This commit is contained in:
Mekan1206
2026-06-06 13:30:57 +05:00
parent f73035593e
commit 36626fe779
3 changed files with 21 additions and 14 deletions

View File

@@ -123,8 +123,9 @@
<section class="border-b-2 border-inverse-surface bg-surface" id="products">
@foreach($categories as $category)
<div
class="category-products py-12 px-margin-mobile md:px-margin-desktop {{ $loop->first ? '' : 'hidden' }}"
class="category-products py-12 px-margin-mobile md:px-margin-desktop"
data-category-id="{{ $category->id }}"
style="{{ $loop->first ? '' : 'display:none' }}"
>
@if($category->products->isNotEmpty())
<div class="splide product-splide" id="splide-cat-{{ $category->id }}">
@@ -274,7 +275,11 @@
<div class="flex gap-6">
@foreach($socialLinks as $link)
<a class="w-10 h-10 rounded-full border border-surface-variant flex items-center justify-center text-surface-bright hover:bg-surface-bright hover:text-inverse-surface transition-colors" href="{{ $link->url }}" target="_blank" rel="noopener noreferrer" aria-label="{{ $link->platform }}">
<span class="material-symbols-outlined text-lg">{{ $link->icon }}</span>
@if($link->icon)
<img src="{{ Storage::url($link->icon) }}" alt="{{ $link->platform }}" class="w-5 h-5 object-contain" style="filter: brightness(0) invert(1);">
@else
<span class="material-symbols-outlined text-lg">link</span>
@endif
</a>
@endforeach
</div>