173 lines
7.1 KiB
PHP
173 lines
7.1 KiB
PHP
<!DOCTYPE html>
|
|
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}">
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
<meta name="csrf-token" content="{{ csrf_token() }}">
|
|
|
|
<title>@yield('title', config('app.name', 'LMS'))</title>
|
|
|
|
<!-- Bootstrap 5 CSS -->
|
|
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/css/bootstrap.min.css" rel="stylesheet">
|
|
<link href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.1/font/bootstrap-icons.css" rel="stylesheet">
|
|
|
|
<style>
|
|
:root {
|
|
--primary-color: #0d6efd;
|
|
--secondary-color: #6c757d;
|
|
}
|
|
|
|
body {
|
|
min-height: 100vh;
|
|
display: flex;
|
|
flex-direction: column;
|
|
}
|
|
|
|
.sidebar {
|
|
min-height: calc(100vh - 56px);
|
|
background-color: #f8f9fa;
|
|
border-right: 1px solid #dee2e6;
|
|
}
|
|
|
|
.sidebar .nav-link {
|
|
color: #333;
|
|
padding: 0.75rem 1rem;
|
|
}
|
|
|
|
.sidebar .nav-link:hover,
|
|
.sidebar .nav-link.active {
|
|
background-color: var(--primary-color);
|
|
color: white;
|
|
}
|
|
|
|
.main-content {
|
|
flex: 1;
|
|
padding: 2rem;
|
|
}
|
|
|
|
.card-stat {
|
|
border-left: 4px solid var(--primary-color);
|
|
}
|
|
|
|
.badge-purple {
|
|
background-color: #6f42c1;
|
|
color: white;
|
|
}
|
|
</style>
|
|
|
|
@stack('styles')
|
|
</head>
|
|
<body>
|
|
<!-- Navbar -->
|
|
<nav class="navbar navbar-expand-lg navbar-dark bg-primary">
|
|
<div class="container-fluid">
|
|
<a class="navbar-brand" href="{{ url('/dashboard') }}">
|
|
<i class="bi bi-mortarboard-fill"></i> LMS
|
|
</a>
|
|
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarNav">
|
|
<span class="navbar-toggler-icon"></span>
|
|
</button>
|
|
<div class="collapse navbar-collapse" id="navbarNav">
|
|
<ul class="navbar-nav me-auto">
|
|
@auth
|
|
<li class="nav-item">
|
|
<a class="nav-link" href="{{ route('dashboard') }}">
|
|
<i class="bi bi-speedometer2"></i> Панель управления
|
|
</a>
|
|
</li>
|
|
@if(Auth::user()->hasRole(['Administrator', 'Manager', 'Curator']))
|
|
<li class="nav-item">
|
|
<a class="nav-link" href="{{ route('admin.organizations.index') }}">
|
|
<i class="bi bi-gear"></i> Админка
|
|
</a>
|
|
</li>
|
|
@endif
|
|
<li class="nav-item">
|
|
<a class="nav-link" href="{{ route('student.courses.index') }}">
|
|
<i class="bi bi-book"></i> Мои курсы
|
|
</a>
|
|
</li>
|
|
<li class="nav-item">
|
|
<a class="nav-link" href="{{ route('student.tests.index') }}">
|
|
<i class="bi bi-file-earmark-text"></i> Тесты
|
|
</a>
|
|
</li>
|
|
@endauth
|
|
</ul>
|
|
<ul class="navbar-nav">
|
|
@auth
|
|
<li class="nav-item dropdown">
|
|
<a class="nav-link dropdown-toggle" href="#" id="userDropdown" role="button" data-bs-toggle="dropdown">
|
|
<i class="bi bi-person-circle"></i> {{ Auth::user()->name }}
|
|
</a>
|
|
<ul class="dropdown-menu dropdown-menu-end">
|
|
<li><span class="dropdown-item-text text-muted small">{{ Auth::user()->email }}</span></li>
|
|
<li><hr class="dropdown-divider"></li>
|
|
<li>
|
|
<form action="{{ route('logout') }}" method="POST">
|
|
@csrf
|
|
<button type="submit" class="dropdown-item">
|
|
<i class="bi bi-box-arrow-right"></i> Выйти
|
|
</button>
|
|
</form>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
@else
|
|
<li class="nav-item">
|
|
<button class="btn btn-outline-light" data-bs-toggle="modal" data-bs-target="#loginModal">
|
|
<i class="bi bi-box-arrow-in-right"></i> Войти
|
|
</button>
|
|
</li>
|
|
@endauth
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
</nav>
|
|
|
|
@if(!Auth::check())
|
|
<!-- Login Modal -->
|
|
<div class="modal fade" id="loginModal" tabindex="-1">
|
|
<div class="modal-dialog">
|
|
<div class="modal-content">
|
|
<form action="{{ route('login') }}" method="POST">
|
|
@csrf
|
|
<div class="modal-header">
|
|
<h5 class="modal-title"><i class="bi bi-box-arrow-in-right"></i> Вход в систему</h5>
|
|
<button type="button" class="btn-close" data-bs-dismiss="modal"></button>
|
|
</div>
|
|
<div class="modal-body">
|
|
<div class="mb-3">
|
|
<label class="form-label">Email</label>
|
|
<input type="email" name="email" class="form-control" required>
|
|
</div>
|
|
<div class="mb-3">
|
|
<label class="form-label">Пароль</label>
|
|
<input type="password" name="password" class="form-control" required>
|
|
</div>
|
|
<div class="mb-3 form-check">
|
|
<input type="checkbox" name="remember" class="form-check-input" id="remember">
|
|
<label class="form-check-label" for="remember">Запомнить меня</label>
|
|
</div>
|
|
@if(session('error'))
|
|
<div class="alert alert-danger">{{ session('error') }}</div>
|
|
@endif
|
|
</div>
|
|
<div class="modal-footer">
|
|
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Отмена</button>
|
|
<button type="submit" class="btn btn-primary">Войти</button>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
@endif
|
|
|
|
@yield('content')
|
|
|
|
<!-- Bootstrap 5 JS -->
|
|
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/js/bootstrap.bundle.min.js"></script>
|
|
@stack('scripts')
|
|
</body>
|
|
</html>
|