eSPJ/Views/Shared/Components/_Navigation.cshtml

130 lines
7.5 KiB
Plaintext

<div class="fixed bottom-0 left-1/2 transform -translate-x-1/2 w-full max-w-sm z-99">
<!-- Navigation Bar with Curved Inward Notch -->
<div class="relative backdrop-blur-lg border border-gray-200/50 rounded-t-3xl shadow-xl overflow-hidden">
<!-- Curved Notch using CSS -->
<div class="absolute -top-0 left-1/2 transform -translate-x-1/2 w-20 h-10">
<div class="w-full h-full bg-transparent relative">
<!-- Left curve -->
<div class="absolute left-0 top-0 w-10 h-10 backdrop-blur-lg rounded-br-full"></div>
<!-- Right curve -->
<div class="absolute right-0 top-0 w-10 h-10 backdrop-blur-lg rounded-bl-full"></div>
</div>
</div>
<!-- Navigation Content -->
<div class="flex justify-between items-center px-8 relative pt-6">
<!-- Home Button -->
<a href="@Url.Action("Index", "Home")" class="flex flex-col items-center gap-1 px-4 py-2 transition-all duration-300 hover:scale-105 group">
<div class="relative">
<i class="w-6 h-6 text-gray-400 group-hover:text-orange-500 transition-colors duration-300" data-lucide="home"></i>
<div class="absolute -bottom-0.5 left-1/2 transform -translate-x-1/2 w-0 h-0.5 bg-orange-500 group-hover:w-full transition-all duration-300"></div>
</div>
<span class="text-xs text-gray-600 group-hover:text-orange-500 font-medium transition-colors duration-300">Home</span>
</a>
<!-- Spacer for center FAB -->
<div class="w-12"></div>
<!-- Profile Button -->
<a href="@Url.Action("Index", "Profil")" class="flex flex-col items-center gap-1 px-4 py-2 transition-all duration-300 hover:scale-105 group">
<div class="relative">
<i class="w-6 h-6 text-gray-400 group-hover:text-orange-500 transition-colors duration-300" data-lucide="user"></i>
<div class="absolute -bottom-0.5 left-1/2 transform -translate-x-1/2 w-0 h-0.5 bg-orange-500 group-hover:w-full transition-all duration-300"></div>
</div>
<span class="text-xs text-gray-600 group-hover:text-orange-500 font-medium transition-colors duration-300">Profile</span>
</a>
</div>
</div>
<!-- Center Floating Action Button in Curved Notch -->
<div class="absolute -top-4 left-1/2 transform -translate-x-1/2">
<button id="truckBtn" class="w-14 h-14 bg-gradient-to-br from-orange-500 via-orange-400 to-orange-600 rounded-full shadow-xl flex items-center justify-center transition-all duration-300 hover:scale-110 hover:rotate-6 border-4 border-white ring-2 ring-orange-200">
<i class="w-6 h-6 text-white" data-lucide="truck"></i>
</button>
</div>
</div>
<div class="h-40"></div>
<!-- Modal Overlay -->
<div id="modalOverlay" class="fixed inset-0 bg-black/50 backdrop-blur-sm z-50 opacity-0 invisible transition-all duration-300 flex items-center justify-center">
<!-- Modal Content -->
<div id="modalContent" class="transform scale-95 opacity-0 transition-all duration-300 ease-out max-w-sm w-full mx-4">
<div class="bg-green-500 text-white px-6 py-6 rounded-2xl relative overflow-hidden shadow-2xl">
<!-- Background pattern -->
<div class="absolute right-0 bottom-0 opacity-30 pointer-events-none select-none" style="width: 160px; height: 160px;">
<!-- Tree SVG placeholder -->
<div class="w-full h-full bg-green-400/20 rounded-full flex items-center justify-center">
<img src="@Url.Content("~/tree.svg")" alt="tree" class="w-full h-full object-contain">
</div>
</div>
<div class="relative z-10">
<div class="flex justify-between items-center mb-4">
<h2 class="text-xl font-bold">Data SPJ</h2>
<div class="flex flex-col items-end mt-8">
<div class="bg-white text-green-600 px-4 py-2 rounded-full text-base font-bold shadow-md flex items-center gap-2">
<span>B 9632 TOR</span>
</div>
<div class="text-xs text-white mt-1 font-semibold tracking-wide opacity-80">(JRC 005)</div>
</div>
</div>
<div class="space-y-1 mt-2">
<p class="text-sm opacity-90">No. SPJ</p>
<p class="font-bold text-lg tracking-wide">SPJ/07-2025/PKM/000476</p>
<p class="text-sm opacity-90 mt-3">Tujuan Pembuangan</p>
<p class="font-bold text-lg tracking-wide">Taman Barito</p>
</div>
<!-- DLH logo -->
<div class="absolute bottom-2 right-4 opacity-80" style="width: 48px; height: 48px;">
<!-- DLH Logo placeholder -->
<div class="w-full h-full flex items-center justify-center">
<img src="@Url.Content("~/dlh_type.svg")" alt="DLH Logo" class="w-full h-full object-contain">
</div>
</div>
</div>
<!-- Close button -->
<button id="closeModal" class="absolute top-4 right-4 w-8 h-8 bg-white/20 hover:bg-white/30 rounded-full flex items-center justify-center transition-colors duration-200 hover:cursor-pointer">
<i class="w-4 h-4 text-white" data-lucide="x"></i>
</button>
</div>
</div>
</div>
<register-block dynamic-section="scripts" key="jsNav">
<script>
// Modal functionality
const truckBtn = document.getElementById('truckBtn');
const modalOverlay = document.getElementById('modalOverlay');
const modalContent = document.getElementById('modalContent');
const closeModal = document.getElementById('closeModal');
// Show modal
truckBtn.addEventListener('click', () => {
modalOverlay.classList.remove('opacity-0', 'invisible');
modalOverlay.classList.add('opacity-100', 'visible');
modalContent.classList.remove('scale-95', 'opacity-0');
modalContent.classList.add('scale-100', 'opacity-100');
});
// Hide modal
function hideModal() {
modalOverlay.classList.remove('opacity-100', 'visible');
modalOverlay.classList.add('opacity-0', 'invisible');
modalContent.classList.remove('scale-100', 'opacity-100');
modalContent.classList.add('scale-95', 'opacity-0');
}
// Close modal events
closeModal.addEventListener('click', hideModal);
modalOverlay.addEventListener('click', (e) => {
if (e.target === modalOverlay) {
hideModal();
}
});
</script>
</register-block>