- Implementada nueva funcion para crear productos destacados por etiquetas, mostrando carrusel con los mismos en la pagina welcome.
This commit is contained in:
Bryam105
2026-06-02 09:46:53 -03:00
parent 63f91bdd6d
commit 902b8433d9
17 changed files with 480 additions and 33 deletions
+29 -1
View File
@@ -82,7 +82,7 @@
<button type="submit" class="px-5 py-3 text-sm font-bold text-neutral-900 bg-neon-lime rounded-lg hover:bg-[#b3e600] transition-colors">
Filtrar
</button>
@if(request('search') || request('type'))
@if(request('search') || request('type') || request('tag'))
<a href="{{ route('catalogo.index') }}" title="Limpiar Filtros" class="flex items-center justify-center p-3 text-sm font-bold text-red-600 bg-red-100 dark:bg-red-900/30 rounded-lg hover:bg-red-200 transition-colors">
<svg class="w-5 h-5" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24">
<path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 18 17.94 6M18 18 6.06 6"/>
@@ -90,8 +90,25 @@
</a>
@endif
</div>
<input type="hidden" name="tag" value="{{ request('tag') }}">
</form>
<!-- Filtro de Etiquetas -->
@if($allTags->count() > 0)
<div class="mb-8 flex flex-wrap gap-2">
@foreach($allTags as $t)
<a href="{{ route('catalogo.index', array_merge(request()->query(), ['tag' => $t->name])) }}"
class="px-3 py-1.5 text-xs font-bold uppercase rounded-full border transition-colors
{{ request('tag') == $t->name
? 'bg-neon-lime border-neon-lime text-black dark:text-black'
: 'bg-transparent border-neutral-400 dark:border-neutral-600 text-gray-700 dark:text-gray-300 hover:border-neon-lime hover:text-neon-lime dark:hover:border-neon-lime dark:hover:text-neon-lime' }}">
#{{ $t->name }}
</a>
@endforeach
</div>
@endif
<!-- GRILLA DE PRODUCTOS -->
<!-- GRILLA DE PRODUCTOS -->
@if ($products->count() > 0)
@@ -113,6 +130,17 @@
<!-- ACÁ ESTÁ EL SEGUNDO CAMBIO: Agregamos "flex-1" al título -->
<h2 class="text-lg font-semibold text-black dark:text-white flex-1">{{ $product->name }}</h2>
{{-- Etiquetas --}}
@if($product->tags->count() > 0)
<div class="flex flex-wrap gap-1 mt-2">
@foreach($product->tags as $t)
<span class="text-[10px] font-bold uppercase tracking-wider px-2 py-0.5 rounded-full border border-neon-lime text-neon-lime bg-neon-lime/10">
#{{ $t->name }}
</span>
@endforeach
</div>
@endif
{{-- Precio --}}
@if (!empty($product->price))
<p class="text-neutral-900 dark:text-white group-hover:text-lime-700 group-hover:dark:text-neon-lime font-bold mt-3 transition-colors">${{ number_format($product->price, 2, ',', '.') }}</p>
+11
View File
@@ -50,6 +50,17 @@
<p class="text-stone-500 dark:text-neon-lime text-sm font-bold uppercase tracking-widest mb-2">SKU: {{ $product->sku ?? 'N/A' }}</p>
<h1 class="text-4xl font-black text-black dark:text-white italic mb-2 leading-tight">{{ $product->name }}</h1>
{{-- Etiquetas --}}
@if($product->tags->count() > 0)
<div class="flex flex-wrap gap-2 mt-2 mb-4">
@foreach($product->tags as $t)
<span class="text-xs font-bold uppercase tracking-wider px-3 py-1 rounded-full border border-neon-lime text-neon-lime bg-neon-lime/10">
#{{ $t->name }}
</span>
@endforeach
</div>
@endif
<!-- Stock Status -->
<div class="flex items-center gap-2 mt-4">
@if($product->stock_quantity > 5)