79 lines
3.2 KiB
PHP
79 lines
3.2 KiB
PHP
@extends('template.admin')
|
|
|
|
@section('content')
|
|
<!-- Card Selamat Datang -->
|
|
<div class="bg-gradient-to-r from-blue-600 via-indigo-600 to-purple-600 rounded-xl shadow-lg text-white p-5 flex items-center justify-between mb-8">
|
|
<!-- Kiri -->
|
|
<div class="max-w-xl">
|
|
<div class="text-2xl font-bold mb-2">Welcome, {{ auth()->user()->name }}!</div>
|
|
<p class="text-white text-opacity-90 text-sm leading-relaxed">
|
|
Anda login sebagai admin. Anda memiliki akses penuh untuk melakukan <strong>Create</strong>, <strong>Read</strong>,
|
|
<strong>Update</strong>, dan <strong>Delete</strong> (CRUD) data. Data yang Anda kelola akan digunakan dalam
|
|
proses <strong>perhitungan rekomendasi mobil terbaik</strong> berdasarkan kriteria yang ditentukan.
|
|
</p>
|
|
</div>
|
|
|
|
<!-- Kanan -->
|
|
<div class="hidden md:flex items-center pr-16">
|
|
<img src="assets/images/admin.svg" alt="Admin Illustration" class="w-64 h-auto">
|
|
</div>
|
|
</div>
|
|
|
|
<div class="grid grid-cols-1 md:grid-cols-3 gap-6">
|
|
@php
|
|
$cards = [
|
|
[
|
|
'title' => 'Jumlah Mobil',
|
|
'count' => $totalMobil,
|
|
'icon' => '
|
|
<path stroke-linecap="round" stroke-linejoin="round" d="M3 7v10a2 2 0 002 2h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2z" />
|
|
<path stroke-linecap="round" stroke-linejoin="round" d="M16 7V5a2 2 0 00-2-2H6a2 2 0 00-2 2v2" />',
|
|
'desc' => 'Mobil tersedia',
|
|
'bg' => 'from-orange-200 to-orange-50'
|
|
],
|
|
[
|
|
'title' => 'Jumlah Kriteria',
|
|
'count' => $totalKriteria,
|
|
'icon' => '
|
|
<path stroke-linecap="round" stroke-linejoin="round" d="M4 6h16M4 10h16M4 14h16M4 18h16" />',
|
|
'desc' => 'Kriteria yang digunakan',
|
|
'bg' => 'from-pink-200 to-pink-50'
|
|
],
|
|
[
|
|
'title' => 'Jumlah Sub Kriteria',
|
|
'count' => $totalSubKriteria,
|
|
'icon' => '
|
|
<path stroke-linecap="round" stroke-linejoin="round" d="M12 4v16m8-8H4" />',
|
|
'desc' => 'Sub kriteria terkait',
|
|
'bg' => 'from-purple-300 to-purple-50'
|
|
]
|
|
];
|
|
@endphp
|
|
|
|
@foreach ($cards as $index => $card)
|
|
@php
|
|
$links = [
|
|
route('mobil.index'),
|
|
route('kriteria.index'),
|
|
route('sub-kriteria.index')
|
|
];
|
|
@endphp
|
|
<a href="{{ $links[$index] }}" class="block transform hover:scale-105 transition duration-300">
|
|
<div class="bg-gradient-to-br {{ $card['bg'] }} rounded-xl shadow-lg hover:shadow-2xl cursor-pointer relative p-6 flex flex-col items-center"
|
|
style="clip-path: polygon(0 15%, 10% 0, 100% 0, 100% 100%, 0 100%);">
|
|
<div class="absolute top-0 left-0 bg-white w-12 h-8 rounded-tr-lg border-b border-r border-gray-300"></div>
|
|
|
|
<div class="text-[#1e3a8a] mt-4 mb-4">
|
|
<svg xmlns="http://www.w3.org/2000/svg" class="h-12 w-12" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2">
|
|
{!! $card['icon'] !!}
|
|
</svg>
|
|
</div>
|
|
|
|
<h2 class="font-semibold text-lg mb-2 text-center">{{ $card['title'] }}</h2>
|
|
<p class="text-4xl font-extrabold text-[#1e3a8a]">{{ $card['count'] }}</p>
|
|
<p class="text-gray-700 mt-1 text-center text-sm">{{ $card['desc'] }}</p>
|
|
</div>
|
|
</a>
|
|
@endforeach
|
|
</div>
|
|
@endsection |