Files
besttechfrom.eu/resources/views/upvotes/index.blade.php
T
2026-10-17 16:26:21 +03:00

61 lines
2.8 KiB
PHP

@extends('layouts.app')
@section('content')
<div class="bg-gradient-to-br from-primary-50 via-white to-accent-50 dark:from-gray-900 dark:via-gray-800 dark:to-gray-900 border-b border-gray-200 dark:border-gray-700">
<div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-12 sm:py-16">
<div class="max-w-3xl">
<h1 class="text-4xl sm:text-5xl font-bold text-gray-900 dark:text-white mb-4">
My Upvotes
</h1>
<p class="text-lg text-gray-600 dark:text-gray-400">
Products you've upvoted and supported
</p>
</div>
</div>
</div>
<div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-8">
<!-- Results Summary -->
@if($upvotes->total() > 0)
<div class="mb-6">
<p class="text-sm text-gray-600 dark:text-gray-400">
You have upvoted <span class="font-semibold text-gray-900 dark:text-white">{{ $upvotes->total() }}</span> {{ Str::plural('product', $upvotes->total()) }}
</p>
</div>
@endif
<!-- Upvoted Products Grid -->
<div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6 mb-8">
@forelse($upvotes as $upvote)
@include('components.product.card', ['product' => $upvote->product])
@empty
<!-- Empty State -->
<div class="col-span-full">
<div class="text-center py-16">
<svg class="mx-auto h-16 w-16 text-gray-400 dark:text-gray-500 mb-4" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M5 15l7-7 7 7"></path>
</svg>
<h3 class="text-lg font-medium text-gray-900 dark:text-white mb-2">No upvotes yet</h3>
<p class="text-gray-600 dark:text-gray-400 mb-6">
Start upvoting products you love to show your support!
</p>
<a href="{{ route('products.index') }}" class="inline-flex items-center px-4 py-2 border border-transparent shadow-sm text-sm font-medium rounded-md text-white bg-primary-600 hover:bg-primary-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-primary-500">
<svg class="mr-2 h-5 w-5" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"></path>
</svg>
Browse Products
</a>
</div>
</div>
@endforelse
</div>
<!-- Pagination -->
@if($upvotes->hasPages())
<div class="flex justify-center">
{{ $upvotes->links() }}
</div>
@endif
</div>
@endsection