233 lines
9.6 KiB
PHP
233 lines
9.6 KiB
PHP
{{-- resources/views/layouts/user.blade.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', 'RedGuard') — Sistem Pakar Tanaman</title>
|
|
{{-- SESUDAH --}}
|
|
<link href="https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=DM+Sans:ital,wght@0,300;0,400;0,500;0,600;1,400&display=swap" rel="stylesheet"> <style>
|
|
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
|
|
:root {
|
|
--gd: #1A4D2E;
|
|
--gm: #2D7A4F;
|
|
--gl: #4CAF72;
|
|
--gp: #EAFAF1;
|
|
--gpl: #F4FDF7;
|
|
--rd: #8B2020;
|
|
--rm: #C0392B;
|
|
--rp: #FEF0EF;
|
|
--cream: #FAFDF7;
|
|
--white: #fff;
|
|
--border: rgba(76,175,114,0.18);
|
|
--text: #1C2E1E;
|
|
--text2: #4A6B52;
|
|
--text3: #8AAD92;
|
|
--shadow-sm: 0 2px 8px rgba(45,122,79,0.08);
|
|
--shadow-md: 0 8px 24px rgba(45,122,79,0.12);
|
|
--shadow-lg: 0 20px 48px rgba(45,122,79,0.16);
|
|
--nav-h: 64px;
|
|
}
|
|
html, body { height: 100%; font-family: 'DM Sans', sans-serif; background: var(--gpl); color: var(--text); }
|
|
|
|
/* NAV */
|
|
.navbar {
|
|
position: sticky; top: 0; z-index: 100;
|
|
height: var(--nav-h);
|
|
background: rgba(255,255,255,0.92);
|
|
backdrop-filter: blur(12px);
|
|
border-bottom: 1px solid var(--border);
|
|
display: flex; align-items: center; justify-content: space-between;
|
|
padding: 0 5%;
|
|
box-shadow: var(--shadow-sm);
|
|
}
|
|
.navbar-brand { display: flex; align-items: center; gap: 8px; text-decoration: none; }
|
|
.brand-chili { font-size: 22px; filter: drop-shadow(0 2px 4px rgba(192,57,43,0.25)); }
|
|
.brand-name { font-family: 'Plus Jakarta Sans', sans-serif; font-size: 16px; font-weight: 800; color: var(--text); }
|
|
.brand-name span { color: var(--gl); }
|
|
.navbar-links { display: flex; align-items: center; gap: 4px; }
|
|
.nav-link {
|
|
font-size: 13px; font-weight: 500; color: var(--text2);
|
|
padding: 8px 14px; border-radius: 100px; text-decoration: none;
|
|
transition: all 0.2s;
|
|
}
|
|
.nav-link:hover { background: var(--gp); color: var(--gd); }
|
|
.nav-link.active { background: var(--gp); color: var(--gd); font-weight: 600; }
|
|
.navbar-right { display: flex; align-items: center; gap: 10px; }
|
|
.user-name { font-size: 13px; color: var(--text2); font-weight: 500; }
|
|
.avatar {
|
|
width: 36px; height: 36px; border-radius: 50%;
|
|
background: var(--rm); color: #fff;
|
|
display: flex; align-items: center; justify-content: center;
|
|
font-family: 'Plus Jakarta Sans', sans-serif; font-size: 13px; font-weight: 700;
|
|
text-decoration: none; overflow: hidden;
|
|
box-shadow: 0 2px 8px rgba(192,57,43,0.25);
|
|
transition: transform 0.2s;
|
|
}
|
|
.avatar:hover { transform: scale(1.08); }
|
|
.avatar img { width: 100%; height: 100%; object-fit: cover; }
|
|
.btn-logout {
|
|
font-size: 12px; padding: 7px 16px; border-radius: 100px;
|
|
border: 1.5px solid var(--border); background: var(--white);
|
|
color: var(--text2); cursor: pointer; font-family: 'DM Sans', sans-serif;
|
|
font-weight: 500; transition: all 0.2s; text-decoration: none;
|
|
}
|
|
.btn-logout:hover { background: var(--rp); color: var(--rm); border-color: #FADBD8; }
|
|
.nav-toggle { display: none; flex-direction: column; gap: 5px; cursor: pointer; padding: 4px; }
|
|
.nav-toggle span { display: block; width: 20px; height: 2px; background: var(--text); border-radius: 2px; transition: all 0.3s; }
|
|
|
|
html, body {
|
|
width: 100%;
|
|
overflow-x: hidden;
|
|
margin: 0;
|
|
padding: 0;
|
|
}
|
|
|
|
/* PAGE WRAPPER */
|
|
.page-wrap {
|
|
min-height: calc(100vh - var(--nav-h) - 60px);
|
|
padding: 2rem 5% 3rem;
|
|
width: 100%;
|
|
margin: 0;
|
|
}
|
|
/* CARDS */
|
|
.card {
|
|
background: var(--white); border-radius: 16px;
|
|
border: 1px solid var(--border); overflow: hidden;
|
|
box-shadow: var(--shadow-sm);
|
|
}
|
|
.card-header {
|
|
padding: 14px 20px; border-bottom: 1px solid var(--border);
|
|
display: flex; align-items: center; justify-content: space-between;
|
|
}
|
|
.card-title { font-family: 'Plus Jakarta Sans', sans-serif; font-size: 14px; font-weight: 700; color: var(--gd); }
|
|
.card-body { padding: 20px; }
|
|
|
|
/* PAGE HEADER */
|
|
.page-header { margin-bottom: 1.5rem; }
|
|
.page-header h1 { font-family: 'Plus Jakarta Sans', sans-serif; font-size: 22px; font-weight: 800; color: var(--text); margin-bottom: 4px; }
|
|
.page-header p { font-size: 14px; color: var(--text2); }
|
|
.breadcrumb { font-size: 12px; color: var(--text3); margin-bottom: 6px; }
|
|
.breadcrumb a { color: var(--rm); text-decoration: none; font-weight: 500; }
|
|
.breadcrumb a:hover { text-decoration: underline; }
|
|
|
|
/* ALERTS */
|
|
.alert { padding: 12px 16px; border-radius: 12px; font-size: 13px; margin-bottom: 1rem; display: flex; align-items: center; gap: 10px; }
|
|
.alert-success { background: var(--gp); color: var(--gd); border: 1px solid rgba(76,175,114,0.25); }
|
|
.alert-danger { background: var(--rp); color: var(--rd); border: 1px solid #FADBD8; }
|
|
|
|
/* BUTTONS */
|
|
.btn {
|
|
display: inline-flex; align-items: center; gap: 7px;
|
|
padding: 10px 20px; border-radius: 10px; font-size: 13px; font-weight: 600;
|
|
font-family: 'DM Sans', sans-serif; cursor: pointer; border: none;
|
|
text-decoration: none; transition: all 0.2s;
|
|
}
|
|
.btn-primary { background: var(--rm); color: #fff; box-shadow: 0 4px 12px rgba(192,57,43,0.2); }
|
|
.btn-primary:hover { background: var(--rd); transform: translateY(-1px); box-shadow: 0 6px 16px rgba(192,57,43,0.28); }
|
|
.btn-green { background: var(--gm); color: #fff; box-shadow: 0 4px 12px rgba(45,122,79,0.2); }
|
|
.btn-green:hover { background: var(--gd); transform: translateY(-1px); }
|
|
.btn-outline { background: var(--white); color: var(--gm); border: 1.5px solid rgba(76,175,114,0.35); }
|
|
.btn-outline:hover { background: var(--gp); border-color: var(--gl); }
|
|
.btn-sm { padding: 7px 14px; font-size: 12px; border-radius: 8px; }
|
|
|
|
/* BADGE */
|
|
.badge { display: inline-flex; align-items: center; font-size: 11px; font-weight: 600; padding: 3px 10px; border-radius: 100px; }
|
|
.badge-red { background: var(--rp); color: var(--rm); border: 1px solid #FADBD8; }
|
|
.badge-green { background: var(--gp); color: var(--gd); border: 1px solid rgba(76,175,114,0.25); }
|
|
.badge-gray { background: #F4F5F7; color: #5A7A50; border: 1px solid #E0E7E3; }
|
|
|
|
/* FOOTER */
|
|
footer {
|
|
background: var(--gd);
|
|
padding: 20px 5%;
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
flex-wrap: wrap;
|
|
gap: 10px;
|
|
border-top: 3px solid var(--rm);
|
|
width: 100vw; /* tambah ini */
|
|
position: relative; /* tambah ini */
|
|
left: 50%; /* tambah ini */
|
|
transform: translateX(-50%); /* tambah ini */
|
|
box-sizing: border-box;
|
|
}
|
|
.foot-brand { display: flex; align-items: center; gap: 7px; }
|
|
.foot-brand-name { font-family: 'Plus Jakarta Sans', sans-serif; font-size: 14px; font-weight: 800; color: #fff; }
|
|
.foot-brand-name span { color: var(--gl); }
|
|
footer p { font-size: 12px; color: rgba(255,255,255,0.45); }
|
|
|
|
/* MOBILE */
|
|
@media (max-width: 768px) {
|
|
.navbar { padding: 0 16px; }
|
|
.navbar-links { display: none; }
|
|
.navbar-links.open {
|
|
display: flex; flex-direction: column;
|
|
position: fixed; top: var(--nav-h); left: 0; right: 0;
|
|
background: var(--white); padding: 16px;
|
|
box-shadow: var(--shadow-md); border-bottom: 1px solid var(--border); gap: 4px; z-index: 99;
|
|
}
|
|
.nav-toggle { display: flex; }
|
|
.user-name { display: none; }
|
|
|
|
footer { flex-direction: column; text-align: center; }
|
|
}
|
|
|
|
@stack('styles-raw')
|
|
</style>
|
|
@stack('styles')
|
|
</head>
|
|
<body>
|
|
|
|
<nav class="navbar">
|
|
<a class="navbar-brand" href="{{ route('konsultasi.index') }}">
|
|
<span class="brand-chili">🌶️</span>
|
|
<span class="brand-name">Red<span>Guard</span></span>
|
|
</a>
|
|
<div class="navbar-links" id="navLinks">
|
|
<a href="{{ route('konsultasi.index') }}" class="nav-link {{ request()->routeIs('konsultasi.index') ? 'active' : '' }}">Beranda</a>
|
|
<a href="{{ route('konsultasi.index') }}" class="nav-link {{ request()->routeIs('konsultasi.create') ? 'active' : '' }}">Diagnosa</a>
|
|
<a href="{{ route('user.riwayat') }}" class="nav-link {{ request()->routeIs('user.riwayat') ? 'active' : '' }}">Riwayat</a>
|
|
</div>
|
|
<div class="navbar-right">
|
|
@auth
|
|
<span class="user-name">{{ auth()->user()->name }}</span>
|
|
<a href="{{ route('user.profil') }}" class="avatar">
|
|
@if(auth()->user()->foto)
|
|
<img src="{{ asset('storage/' . auth()->user()->foto) }}" alt="foto">
|
|
@else
|
|
{{ strtoupper(substr(auth()->user()->name, 0, 2)) }}
|
|
@endif
|
|
</a>
|
|
@else
|
|
<a href="{{ route('login') }}" class="btn btn-outline btn-sm">Masuk</a>
|
|
<a href="{{ route('register') }}" class="btn btn-primary btn-sm">Daftar</a>
|
|
@endauth
|
|
</div>
|
|
<div class="nav-toggle" id="navToggle" onclick="document.getElementById('navLinks').classList.toggle('open')">
|
|
<span></span><span></span><span></span>
|
|
</div>
|
|
</nav>
|
|
|
|
<main class="page-wrap">
|
|
@if(session('success'))
|
|
<div class="alert alert-success">✅ {{ session('success') }}</div>
|
|
@endif
|
|
@if(session('error'))
|
|
<div class="alert alert-danger">⚠️ {{ session('error') }}</div>
|
|
@endif
|
|
@yield('content')
|
|
</main>
|
|
|
|
<footer> {{-- footer di luar main --}}
|
|
<div class="foot-brand">
|
|
<span style="font-size:18px;">🌶️</span>
|
|
<span class="foot-brand-name">Red<span>Guard</span></span>
|
|
</div>
|
|
<p>© {{ date('Y') }} RedGuard — Sistem Pakar Tanaman Cabai</p>
|
|
</footer>
|
|
|
|
@stack('scripts')
|
|
</body>
|
|
</html> |