e-katalog/resources/views/layouts/app3.blade.php

339 lines
9.8 KiB
PHP

<!DOCTYPE html>
<html lang="id">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>@yield('title', 'Admin Space - Space Casual Store')</title>
<link rel="icon" href="{{ asset('images/logo.png') }}?v=1" type="image/png">
{{-- Fonts & CSS Frameworks --}}
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700;800&display=swap"
rel="stylesheet">
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css" rel="stylesheet">
<link href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.3/font/bootstrap-icons.min.css" rel="stylesheet">
<style>
:root {
--navy: #0F1C2E;
--sky: #2D9CDB;
--white: #ffffff;
--bg: #F8F9FA;
--border: #E5E7EB;
--text-dark: #0F1C2E;
--text-grey: #6B7280;
}
body {
font-family: 'Poppins', sans-serif;
background-color: var(--bg);
margin: 0;
padding: 0;
}
/* ============================================
HEADER
Hanya bagian ini yang berwarna putih & sticky.
Navbar TIDAK ikut di sini.
============================================ */
.admin-header {
background-color: var(--white);
border-bottom: 1px solid var(--border);
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
padding: 14px 0;
position: sticky;
top: 0;
z-index: 100;
}
.header-inner {
display: flex;
align-items: center;
justify-content: space-between;
gap: 16px;
}
/* Brand */
.brand-link {
display: flex;
align-items: center;
gap: 10px;
text-decoration: none;
flex-shrink: 0;
}
.brand-logo {
width: 50px;
height: 50px;
border-radius: 50%;
overflow: hidden;
}
/* 1. Ini adalah pembungkus logonya (ukurannya diatur di sini) */
.brand-logo {
width: 50px;
height: 50px;
border-radius: 50%;
overflow: hidden;
flex-shrink: 0;
/* Mencegah logo mengecil sendiri saat bersandingan dengan teks */
}
/* 2. Ini adalah gambarnya (dibuat responsif 100% mengikuti pembungkus) */
.brand-logo img {
width: 100%;
height: 100%;
object-fit: cover;
/* Memastikan gambar tidak gepeng */
display: block;
}
.brand-name {
font-size: 20px;
font-weight: 800;
color: var(--text-dark);
margin: 0;
white-space: nowrap;
letter-spacing: -0.3px;
}
/* Profile Button */
.profile-dropdown .dropdown-toggle {
background-color: var(--white);
border: 1.5px solid var(--border);
border-radius: 10px;
font-family: 'Poppins', sans-serif;
font-size: 14px;
font-weight: 600;
color: var(--text-dark);
padding: 7px 13px 7px 9px;
display: inline-flex;
align-items: center;
gap: 9px;
box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
transition: background-color 0.2s, border-color 0.2s, box-shadow 0.2s;
}
.profile-dropdown .dropdown-toggle::after {
display: none;
}
.profile-dropdown .dropdown-toggle:hover,
.profile-dropdown .dropdown-toggle:focus,
.profile-dropdown .dropdown-toggle.show {
background-color: #F9FAFB;
border-color: #CBD5E1;
outline: none;
box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.15);
}
.profile-avatar {
width: 30px;
height: 30px;
border-radius: 50%;
background: linear-gradient(135deg, #2563EB, var(--sky));
display: flex;
align-items: center;
justify-content: center;
flex-shrink: 0;
}
.profile-avatar i {
font-size: 17px;
color: var(--white);
line-height: 1;
}
.profile-chevron {
font-size: 13px;
color: var(--text-grey);
transition: transform 0.2s;
}
.profile-dropdown .dropdown-toggle.show .profile-chevron {
transform: rotate(180deg);
}
.profile-dropdown .dropdown-menu {
min-width: 170px;
border: 1px solid var(--border);
border-radius: 12px;
box-shadow: 0 8px 24px rgba(0, 0, 0, 0.10);
padding: 6px;
margin-top: 6px !important;
}
.profile-dropdown .dropdown-item {
border-radius: 8px;
padding: 10px 14px;
font-size: 14px;
font-weight: 500;
color: #374151;
display: flex;
align-items: center;
gap: 8px;
transition: background-color 0.15s;
}
.profile-dropdown .dropdown-item:hover {
background-color: #FEF2F2;
color: #DC2626;
}
.profile-dropdown .dropdown-item i {
font-size: 16px;
}
/* Ruang isi konten agar tidak terlalu mepet ke header */
main {
padding: 24px 0;
}
/* ============================================
RESPONSIVE
============================================ */
@media (max-width: 992px) {
.admin-nav-item {
font-size: 14px;
}
}
@media (max-width: 768px) {
.brand-name {
font-size: 17px;
}
.admin-navbar-section {
padding-top: 16px;
}
.admin-navbar {
flex-direction: column;
border-radius: 12px;
}
.admin-nav-item {
padding: 13px 20px;
justify-content: flex-start;
border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.admin-nav-item:last-child {
border-bottom: none;
}
/* Navbar vertikal: full fill semua */
.admin-nav-item:first-child.active::before,
.admin-nav-item:nth-child(2).active::before,
.admin-nav-item:last-child.active::before {
left: 0;
right: 0;
border-radius: 0;
}
.page-title-text {
font-size: 22px;
}
.page-title-section {
padding: 20px 0 16px;
}
}
@media (max-width: 480px) {
.brand-name {
display: none;
}
.brand-logo {
width: 36px;
height: 36px;
}
.profile-dropdown .dropdown-toggle>span:not(.profile-avatar) {
display: none;
}
.profile-dropdown .dropdown-toggle {
padding: 7px 8px;
gap: 0;
}
.page-title-text {
font-size: 20px;
}
}
@media (min-width: 1400px) {
.brand-name {
font-size: 22px;
}
.admin-nav-item {
font-size: 16px;
padding: 20px 24px;
}
.page-title-text {
font-size: 28px;
}
}
</style>
@stack('styles')
</head>
<body>
{{-- =====================================================
HEADER Putih & Sticky, berdiri sendiri
.container Bootstrap memastikan konten rata
dengan navbar di bawahnya.
===================================================== --}}
<header class="admin-header">
<div class="container">
<div class="header-inner">
<a href="{{ url('/dashboard') }}" class="brand-link">
<div class="brand-logo">
<img src="{{ asset('images/logo.png') }}" alt="Space Casual Store">
</div>
<h1 class="brand-name">Space Casual Store</h1>
</a>
<div class="dropdown profile-dropdown">
<button class="btn dropdown-toggle" type="button" id="profileDropdown" data-bs-toggle="dropdown"
aria-expanded="false">
<span class="profile-avatar">
<i class="bi bi-person-fill"></i>
</span>
<span>Admin Space</span>
<i class="bi bi-chevron-down profile-chevron"></i>
</button>
<ul class="dropdown-menu dropdown-menu-end" aria-labelledby="profileDropdown">
<li>
<a class="dropdown-item" href="{{ url('/login') }}">
<i class="bi bi-box-arrow-right"></i>
Keluar
</a>
</li>
</ul>
</div>
</div>
</div>
</header>
{{-- KONTEN UTAMA --}}
<main>
<div class="container">
@yield('content')
</div>
</main>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/js/bootstrap.bundle.min.js"></script>
@stack('scripts')
</body>
</html>