Files
analytics/resources/views/websites/index.blade.php
T

68 lines
4.5 KiB
PHP
Raw Normal View History

2026-03-18 11:40:20 +02:00
<x-app-layout>
<x-slot name="header">
<div class="flex items-center justify-between">
<h2 class="font-semibold text-xl text-gray-800 leading-tight">
{{ __('Websites') }}
</h2>
<a href="{{ route('websites.create') }}" class="inline-flex items-center px-4 py-2 bg-gray-800 border border-transparent rounded-md font-semibold text-xs text-white uppercase tracking-widest hover:bg-gray-700 focus:bg-gray-700 active:bg-gray-900 focus:outline-none focus:ring-2 focus:ring-indigo-500 focus:ring-offset-2 transition ease-in-out duration-150">
{{ __('Add Website') }}
</a>
</div>
</x-slot>
<div class="py-12">
<div class="max-w-7xl mx-auto sm:px-6 lg:px-8">
@if (session('success'))
<div class="mb-4 rounded-md bg-green-50 p-4">
<p class="text-sm font-medium text-green-800">{{ session('success') }}</p>
</div>
@endif
@if ($websites->isEmpty())
<div class="bg-white overflow-hidden shadow-sm sm:rounded-lg">
<div class="p-12 text-center">
<svg class="mx-auto h-12 w-12 text-gray-400" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor">
<path stroke-linecap="round" stroke-linejoin="round" d="M12 21a9.004 9.004 0 0 0 8.716-6.747M12 21a9.004 9.004 0 0 1-8.716-6.747M12 21c2.485 0 4.5-4.03 4.5-9S14.485 3 12 3m0 18c-2.485 0-4.5-4.03-4.5-9S9.515 3 12 3m0 0a8.997 8.997 0 0 1 7.843 4.582M12 3a8.997 8.997 0 0 0-7.843 4.582m15.686 0A11.953 11.953 0 0 1 12 10.5c-2.998 0-5.74-1.1-7.843-2.918m15.686 0A8.959 8.959 0 0 1 21 12c0 .778-.099 1.533-.284 2.253m0 0A17.919 17.919 0 0 1 12 16.5c-3.162 0-6.133-.815-8.716-2.247m0 0A9.015 9.015 0 0 1 3 12c0-1.605.42-3.113 1.157-4.418" />
</svg>
<h3 class="mt-2 text-sm font-semibold text-gray-900">{{ __('No websites') }}</h3>
<p class="mt-1 text-sm text-gray-500">{{ __('Get started by adding your first website.') }}</p>
<div class="mt-6">
<a href="{{ route('websites.create') }}" class="inline-flex items-center px-4 py-2 bg-gray-800 border border-transparent rounded-md font-semibold text-xs text-white uppercase tracking-widest hover:bg-gray-700">
{{ __('Add Website') }}
</a>
</div>
</div>
</div>
@else
<div class="grid gap-6 sm:grid-cols-2 lg:grid-cols-3">
@foreach ($websites as $website)
<div class="bg-white overflow-hidden shadow-sm sm:rounded-lg">
<div class="p-6">
<div class="flex items-center justify-between mb-4">
<h3 class="text-lg font-semibold text-gray-900 truncate">
<a href="{{ route('websites.show', $website) }}" class="hover:text-indigo-600">
{{ $website->name }}
</a>
</h3>
<span class="inline-flex items-center rounded-full px-2 py-1 text-xs font-medium {{ $website->is_active ? 'bg-green-100 text-green-700' : 'bg-gray-100 text-gray-600' }}">
{{ $website->is_active ? 'Active' : 'Inactive' }}
</span>
</div>
<p class="text-sm text-gray-500 mb-1">{{ $website->domain }}</p>
<p class="text-xs text-gray-400 font-mono">{{ $website->tracking_id }}</p>
<div class="mt-4 flex items-center gap-3 text-sm">
<a href="{{ route('websites.show', $website) }}" class="text-indigo-600 hover:text-indigo-800">View</a>
<a href="{{ route('websites.snippet', $website) }}" class="text-indigo-600 hover:text-indigo-800">Snippet</a>
<a href="{{ route('websites.edit', $website) }}" class="text-gray-600 hover:text-gray-800">Edit</a>
</div>
</div>
</div>
@endforeach
</div>
@endif
</div>
</div>
</x-app-layout>