MIF_E31230580/resources/views/gesture/index.blade.php

320 lines
11 KiB
PHP

<x-app-layout>
<!-- Header Halaman -->
<x-slot name="header">
<div class="header-container-css">
<span class="icon-pulse-css">📖</span>
<h2 class="title-grad-css">Katalog & Contoh Isyarat BISINDO</h2>
</div>
</x-slot>
<!-- STYLE LEMBARAN CSS UTUH (MURNI CUSTOM CSS - BEBAS DEPENDENSI TAILWIND) -->
<style>
/* 1. VARIABEL WARNA & TEMA PREMIUM COHERENT DENGAN DASHBOARD */
:root {
--primary-blue: #0052cc;
--primary-glow: rgba(0, 82, 204, 0.15);
--neon-sky: #00b3ff;
--light-ice: #f2f7ff;
--clean-white: #ffffff;
--text-main: #1e293b;
--text-muted: #64748b;
--border-soft: #e2e8f0;
--card-shadow: 0 10px 30px rgba(0, 0, 0, 0.03);
--grad-banner: linear-gradient(135deg, #0f172a 0%, #1e3a8a 50%, #0052cc 100%);
--grad-accent: linear-gradient(135deg, #0052cc 0%, #00b3ff 100%);
}
/* 2. BASE WRAPPER & GELEMBUNG LATAR BELAKANG */
.gt-wrapper-css {
font-family: 'Inter', system-ui, -apple-system, sans-serif;
background-color: #f8fafc;
min-height: 100vh;
padding: 40px 20px;
position: relative;
overflow: hidden;
box-sizing: border-box;
}
.gt-container-css {
max-width: 1200px;
margin: 0 auto;
display: flex;
flex-direction: column;
gap: 30px;
position: relative;
z-index: 10;
}
/* Floating Blobs Background */
.blob-css {
position: absolute;
border-radius: 50%;
filter: blur(80px);
pointer-events: none;
z-index: 1;
opacity: 0.25;
}
.blob-1 {
width: 400px;
height: 400px;
background-color: #93c5fd;
top: 5%;
left: -10%;
animation: float-slow 8s infinite ease-in-out;
}
.blob-2 {
width: 500px;
height: 500px;
background-color: #bae6fd;
bottom: 5%;
right: -10%;
animation: float-slow-rev 10s infinite ease-in-out;
}
/* 3. PAPAN UTAMA INFORMASI (HERO GLASS CARD) */
.gt-hero-card {
background: var(--clean-white);
border: 1px solid var(--border-soft);
border-radius: 32px;
padding: 35px;
box-shadow: var(--card-shadow);
border-left: 8px solid var(--primary-blue);
}
.gt-hero-card h3 {
font-size: 24px;
font-weight: 900;
color: var(--text-main);
margin: 0 0 8px 0;
letter-spacing: -0.5px;
}
.gt-hero-card p {
font-size: 13px;
line-height: 1.6;
color: var(--text-muted);
margin: 0;
max-width: 800px;
}
/* 4. GRID KATALOG (RESPONSIVE AUTO-FIT) */
.gt-grid-css {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
gap: 24px;
}
/* 5. PREMIUM CARDS (3D GLOW EFFECTS) */
.gt-card-css {
background: var(--clean-white);
border: 1px solid var(--border-soft);
border-radius: 24px;
overflow: hidden;
box-shadow: var(--card-shadow);
transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
display: flex;
flex-direction: column;
position: relative;
}
.gt-card-css:hover {
transform: translateY(-8px);
border-color: var(--primary-blue);
box-shadow: 0 25px 50px -12px rgba(0, 82, 204, 0.15);
}
/* Thumbnail Image Placeholder Box */
.gt-img-box {
height: 160px;
background: linear-gradient(135deg, var(--light-ice) 0%, #e2eefc 100%);
border-bottom: 1px solid var(--border-soft);
display: flex;
align-items: center;
justify-content: center;
color: var(--primary-blue);
font-size: 13px;
font-weight: 800;
letter-spacing: 0.5px;
position: relative;
overflow: hidden;
transition: all 0.4s ease;
}
.gt-card-css:hover .gt-img-box {
background: var(--grad-accent);
color: var(--clean-white);
}
.gt-img-glow-overlay {
position: absolute;
width: 100%;
height: 100%;
background: radial-gradient(circle, rgba(255,255,255,0.2) 0%, rgba(255,255,255,0) 70%);
opacity: 0;
transition: opacity 0.4s ease;
}
.gt-card-css:hover .gt-img-glow-overlay {
opacity: 1;
}
/* Card Info Typography */
.gt-info-box {
padding: 20px;
display: flex;
flex-direction: column;
flex-grow: 1;
gap: 6px;
}
.gt-card-title {
font-size: 18px;
font-weight: 900;
color: var(--primary-blue);
margin: 0;
transition: color 0.3s ease;
}
.gt-card-desc {
font-size: 11px;
line-height: 1.6;
color: var(--text-muted);
margin: 0;
flex-grow: 1;
}
/* Admin Delete Button */
.gt-delete-form {
margin-top: 12px;
border-top: 1px solid var(--light-ice);
padding-top: 12px;
}
.gt-delete-btn {
background: transparent;
border: none;
color: #ef4444;
font-size: 11px;
font-weight: 800;
cursor: pointer;
padding: 0;
transition: color 0.2s ease;
text-transform: uppercase;
letter-spacing: 0.5px;
}
.gt-delete-btn:hover {
color: #b91c1c;
text-decoration: underline;
}
/* 6. ANIMASI KEYFRAMES & RESPONSIVE LAYOUT */
@keyframes float-slow {
0%, 100% { transform: translateY(0) scale(1); }
50% { transform: translateY(-20px) scale(1.05); }
}
@keyframes float-slow-rev {
0%, 100% { transform: translateY(0) scale(1); }
50% { transform: translateY(20px) scale(0.95); }
}
@keyframes bounce-slow {
0%, 100% { transform: translateY(0); }
50% { transform: translateY(-6px); }
}
@media (max-width: 768px) {
.gt-wrapper-css { padding: 20px 10px; }
.gt-hero-card { padding: 24px; border-radius: 24px; }
.gt-grid-css { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; }
}
/* Header Navigation Styles coherent */
.header-container-css {
display: flex;
align-items: center;
gap: 12px;
}
.icon-pulse-css {
font-size: 24px;
animation: bounce-slow 2s infinite ease-in-out;
}
.title-grad-css {
font-size: 20px;
font-weight: 900;
background: linear-gradient(to right, var(--primary-blue), var(--neon-sky));
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
margin: 0;
letter-spacing: -0.5px;
}
</style>
<!-- WRAPPER UTAMA GESTURE KATALOG -->
<div class="gt-wrapper-css">
<!-- Blobs Background -->
<div class="blob-css blob-1"></div>
<div class="blob-css blob-2"></div>
<div class="gt-container-css">
<!-- 1. HEADER INFORMASI UTAMA -->
<div class="gt-hero-card">
<h3>Pola Isyarat Tangan BISINDO</h3>
<p>Gunakan visualisasi referensi di bawah ini sebagai panduan melatih isyarat tangan Anda sebelum diletakkan di depan lensa kamera anda.</p>
</div>
@if(auth()->user()->role === 'admin')
<a href="{{ route('admin.gesture.create') }}"
style="background: #0052cc; color: white; padding: 10px 20px; border-radius: 12px; text-decoration: none; font-weight: 800;">
+ Tambah Isyarat
</a>
@endif
<!-- 2. GRID LIST KATALOG GESTURE -->
<div class="gt-grid-css">
@foreach($gestures as $item)
<div class="gt-card-css">
<!-- Thumbnail Box -->
<div class="gt-img-box" style="position: relative; overflow: hidden; height: 160px; display: flex; align-items: center; justify-content: center; background: #f1f5f9;">
<div class="gt-img-glow-overlay"></div>
@if($item->gambar_contoh && $item->gambar_contoh !== 'default_gesture.png')
<img src="{{ asset('storage/' . $item->gambar_contoh) }}" alt="{{ $item->huruf_kata }}" style="width: 100%; height: 100%; object-fit: cover;">
@else
<span>[ ISYARAT {{ $item->huruf_kata }} ]</span>
@endif
</div>
<!-- Info Box -->
<div class="gt-info-box">
<h4 class="gt-card-title">{{ $item->huruf_kata }}</h4>
<p class="gt-card-desc">{{ $item->deskripsi ?? 'Tidak ada deskripsi panduan.' }}</p>
<!-- Tombol CRUD Khusus Admin -->
@if(auth()->user()->role === 'admin')
<div style="margin-top: 15px; display: flex; gap: 10px; border-top: 1px solid #e2e8f0; padding-top: 12px;">
<!-- Tombol Edit -->
<a href="{{ route('admin.gesture.edit', $item->id) }}"
style="background: #e2e8f0; color: #1e293b; padding: 6px 12px; border-radius: 6px; font-size: 10px; font-weight: 800; text-transform: uppercase; text-decoration: none;">
Edit
</a>
<!-- Tombol Hapus -->
<form action="{{ route('admin.gesture.destroy', $item->id) }}" method="POST" onsubmit="return confirm('Yakin ingin hapus isyarat ini?')">
@csrf
@method('DELETE')
<button type="submit"
style="background: #fee2e2; color: #991b1b; padding: 6px 12px; border-radius: 6px; border: none; font-size: 10px; font-weight: 800; cursor: pointer; text-transform: uppercase;">
Hapus
</button>
</form>
</div>
@endif
</div>
</div>
@endforeach
</div>
</div>
</div>
</x-app-layout>