mirror of
https://github.com/ceratic/MediaCollectorLibary.git
synced 2026-05-14 08:06:47 +02:00
345 lines
12 KiB
Twig
345 lines
12 KiB
Twig
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title>{% block title %}Admin Panel - MediaLib{% endblock %}</title>
|
|
|
|
<!-- Bootstrap 5 CSS -->
|
|
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet">
|
|
|
|
<!-- Bootstrap Icons -->
|
|
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.1/font/bootstrap-icons.css">
|
|
|
|
<!-- Custom Admin CSS -->
|
|
<style>
|
|
:root {
|
|
--sidebar-width: 250px;
|
|
--header-height: 56px;
|
|
--primary-color: #4e73df;
|
|
--secondary-color: #858796;
|
|
--success-color: #1cc88a;
|
|
--info-color: #36b9cc;
|
|
--warning-color: #f6c23e;
|
|
--danger-color: #e74a3b;
|
|
--light-color: #f8f9fc;
|
|
--dark-color: #5a5c69;
|
|
}
|
|
|
|
body {
|
|
font-size: 0.9rem;
|
|
background-color: #f8f9fc;
|
|
}
|
|
|
|
/* Sidebar */
|
|
#sidebar {
|
|
width: var(--sidebar-width);
|
|
position: fixed;
|
|
top: 0;
|
|
left: 0;
|
|
height: 100vh;
|
|
z-index: 1000;
|
|
background: #fff;
|
|
box-shadow: 0 0.15rem 1.75rem 0 rgba(58, 59, 69, 0.15);
|
|
transition: all 0.3s;
|
|
}
|
|
|
|
.sidebar-brand {
|
|
height: var(--header-height);
|
|
text-decoration: none;
|
|
font-size: 1.2rem;
|
|
font-weight: 800;
|
|
padding: 1.5rem 1rem;
|
|
text-align: center;
|
|
text-transform: uppercase;
|
|
letter-spacing: 0.05rem;
|
|
z-index: 1;
|
|
color: var(--primary-color);
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
}
|
|
|
|
.sidebar-divider {
|
|
border-top: 1px solid rgba(0, 0, 0, 0.1);
|
|
margin: 0 1rem 1rem;
|
|
}
|
|
|
|
.sidebar-heading {
|
|
text-align: left;
|
|
padding: 0 1rem;
|
|
font-weight: 800;
|
|
font-size: 0.65rem;
|
|
color: var(--secondary-color);
|
|
text-transform: uppercase;
|
|
letter-spacing: 0.13em;
|
|
}
|
|
|
|
.nav-item {
|
|
position: relative;
|
|
}
|
|
|
|
.nav-link {
|
|
display: flex;
|
|
align-items: center;
|
|
padding: 0.75rem 1rem;
|
|
color: #d1d3e2;
|
|
text-decoration: none;
|
|
border-radius: 0.35rem;
|
|
margin: 0 0.5rem;
|
|
transition: all 0.3s;
|
|
}
|
|
|
|
.nav-link i {
|
|
margin-right: 0.5rem;
|
|
color: #b7b9cc;
|
|
}
|
|
|
|
.nav-link:hover, .nav-link.active {
|
|
background-color: rgba(255, 255, 255, 0.1);
|
|
color: #fff;
|
|
}
|
|
|
|
.nav-link:hover i, .nav-link.active i {
|
|
color: #fff;
|
|
}
|
|
|
|
/* Main Content */
|
|
#content {
|
|
width: calc(100% - var(--sidebar-width));
|
|
min-height: 100vh;
|
|
margin-left: var(--sidebar-width);
|
|
background-color: #f8f9fc;
|
|
}
|
|
|
|
/* Top Navigation */
|
|
.topbar {
|
|
height: var(--header-height);
|
|
box-shadow: 0 0.15rem 1.75rem 0 rgba(58, 59, 69, 0.15);
|
|
background-color: #fff;
|
|
padding: 0 1.5rem;
|
|
}
|
|
|
|
/* Cards */
|
|
.card {
|
|
border: none;
|
|
border-radius: 0.35rem;
|
|
box-shadow: 0 0.15rem 1.75rem 0 rgba(58, 59, 69, 0.1);
|
|
margin-bottom: 1.5rem;
|
|
}
|
|
|
|
.card-header {
|
|
background-color: #f8f9fc;
|
|
border-bottom: 1px solid #e3e6f0;
|
|
padding: 1rem 1.25rem;
|
|
font-weight: 700;
|
|
color: #4e73df;
|
|
}
|
|
|
|
/* Buttons */
|
|
.btn-primary {
|
|
background-color: var(--primary-color);
|
|
border-color: var(--primary-color);
|
|
}
|
|
|
|
.btn-primary:hover {
|
|
background-color: #2e59d9;
|
|
border-color: #2653d4;
|
|
}
|
|
|
|
/* Tables */
|
|
.table {
|
|
font-size: 0.85rem;
|
|
}
|
|
|
|
.table thead th {
|
|
border-bottom: 2px solid #e3e6f0;
|
|
font-weight: 700;
|
|
text-transform: uppercase;
|
|
font-size: 0.7rem;
|
|
letter-spacing: 0.04em;
|
|
color: #4e73df;
|
|
}
|
|
|
|
/* Responsive */
|
|
@media (max-width: 768px) {
|
|
#sidebar {
|
|
margin-left: -250px;
|
|
}
|
|
|
|
#content {
|
|
width: 100%;
|
|
margin-left: 0;
|
|
}
|
|
|
|
#sidebar.active {
|
|
margin-left: 0;
|
|
}
|
|
|
|
#content.active {
|
|
margin-left: 250px;
|
|
width: calc(100% - 250px);
|
|
}
|
|
}
|
|
</style>
|
|
|
|
{% block styles %}{% endblock %}
|
|
</head>
|
|
<body>
|
|
<!-- Sidebar -->
|
|
<div id="sidebar" class="bg-dark">
|
|
<a class="sidebar-brand" href="{{ path_for('admin.index') }}">
|
|
<i class="bi bi-collection-play-fill me-2"></i>MediaLib Admin
|
|
</a>
|
|
|
|
<div class="sidebar-divider"></div>
|
|
|
|
<!-- Navigation -->
|
|
<div class="p-3">
|
|
<div class="sidebar-heading">Core</div>
|
|
<ul class="nav flex-column">
|
|
<li class="nav-item">
|
|
<a class="nav-link {{ current_route == 'admin.index' ? 'active' : '' }}" href="{{ path_for('admin.index') }}">
|
|
<i class="bi bi-speedometer2"></i>
|
|
<span>Dashboard</span>
|
|
</a>
|
|
</li>
|
|
<li class="nav-item">
|
|
<a class="nav-link {{ current_route == 'admin.settings' ? 'active' : '' }}" href="{{ path_for('admin.settings') }}">
|
|
<i class="bi bi-gear"></i>
|
|
<span>Settings</span>
|
|
</a>
|
|
</li>
|
|
</ul>
|
|
|
|
<div class="sidebar-heading mt-4">Media</div>
|
|
<ul class="nav flex-column">
|
|
<li class="nav-item">
|
|
<a class="nav-link" href="{{ path_for('games.index') }}" target="_blank">
|
|
<i class="bi bi-joystick"></i>
|
|
<span>Games</span>
|
|
</a>
|
|
</li>
|
|
<li class="nav-item">
|
|
<a class="nav-link" href="{{ path_for('movies.index') }}" target="_blank">
|
|
<i class="bi bi-film"></i>
|
|
<span>Movies</span>
|
|
</a>
|
|
</li>
|
|
<li class="nav-item">
|
|
<a class="nav-link" href="{{ path_for('tvshows.index') }}" target="_blank">
|
|
<i class="bi bi-tv"></i>
|
|
<span>TV Shows</span>
|
|
</a>
|
|
</li>
|
|
<li class="nav-item">
|
|
<a class="nav-link" href="{{ path_for('music.index') }}" target="_blank">
|
|
<i class="bi bi-music-note-list"></i>
|
|
<span>Music</span>
|
|
</a>
|
|
</li>
|
|
</ul>
|
|
|
|
<div class="sidebar-heading mt-4">System</div>
|
|
<ul class="nav flex-column">
|
|
<li class="nav-item">
|
|
<a class="nav-link" href="{{ path_for('admin.sources') }}">
|
|
<i class="bi bi-hdd-rack"></i>
|
|
<span>Media Sources</span>
|
|
</a>
|
|
</li>
|
|
<li class="nav-item">
|
|
<a class="nav-link" href="{{ path_for('admin.sync') }}">
|
|
<i class="bi bi-arrow-repeat"></i>
|
|
<span>Sync Media</span>
|
|
</a>
|
|
</li>
|
|
<li class="nav-item">
|
|
<a class="nav-link" href="{{ path_for('admin.playnite.import') }}">
|
|
<i class="bi bi-upload"></i>
|
|
<span>Playnite Import</span>
|
|
</a>
|
|
</li>
|
|
<li class="nav-item">
|
|
<a class="nav-link" href="{{ path_for('home') }}" target="_blank">
|
|
<i bi bi-house-door"></i>
|
|
<span>View Site</span>
|
|
</a>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Content Wrapper -->
|
|
<div id="content">
|
|
<!-- Top Navigation -->
|
|
<nav class="navbar navbar-expand navbar-light bg-white topbar mb-4 static-top shadow">
|
|
<!-- Sidebar Toggle (Topbar) -->
|
|
<button id="sidebarToggleTop" class="btn btn-link d-md-none rounded-circle mr-3">
|
|
<i class="bi bi-list"></i>
|
|
</button>
|
|
|
|
<!-- Topbar Navbar -->
|
|
<ul class="navbar-nav ms-auto">
|
|
<!-- Nav Item - User Information -->
|
|
<li class="nav-item dropdown no-arrow">
|
|
<a class="nav-link dropdown-toggle" href="#" id="userDropdown" role="button" data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
|
<span class="me-2 d-none d-lg-inline text-gray-600 small">
|
|
{% if auth.check %}
|
|
{{ auth.user.username }}
|
|
{% else %}
|
|
Guest
|
|
{% endif %}
|
|
</span>
|
|
<i class="bi bi-person-circle" style="font-size: 1.5rem;"></i>
|
|
</a>
|
|
<!-- Dropdown - User Information -->
|
|
<div class="dropdown-menu dropdown-menu-right shadow animated--grow-in" aria-labelledby="userDropdown">
|
|
<a class="dropdown-item" href="{{ path_for('home') }}">
|
|
<i class="bi bi-house-door me-2 text-gray-400"></i>
|
|
Home
|
|
</a>
|
|
<div class="dropdown-divider"></div>
|
|
<a class="dropdown-item" href="{{ path_for('auth.logout') }}">
|
|
<i class="bi bi-box-arrow-right me-2 text-gray-400"></i>
|
|
Logout
|
|
</a>
|
|
</div>
|
|
</li>
|
|
</ul>
|
|
</nav>
|
|
<!-- End of Topbar -->
|
|
|
|
<!-- Begin Page Content -->
|
|
<div class="container-fluid">
|
|
{% block content %}{% endblock %}
|
|
</div>
|
|
<!-- /.container-fluid -->
|
|
</div>
|
|
<!-- End of Content Wrapper -->
|
|
|
|
<!-- Bootstrap core JavaScript -->
|
|
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js"></script>
|
|
|
|
<!-- Custom scripts -->
|
|
<script>
|
|
// Toggle the side navigation
|
|
document.getElementById('sidebarToggleTop').addEventListener('click', function(e) {
|
|
e.preventDefault();
|
|
document.body.classList.toggle('sidebar-toggled');
|
|
document.getElementById('sidebar').classList.toggle('toggled');
|
|
});
|
|
|
|
// Close any open menu accordions when window is resized below 768px
|
|
window.addEventListener('resize', function() {
|
|
if (window.innerWidth < 768) {
|
|
document.body.classList.add('sidebar-toggled');
|
|
document.getElementById('sidebar').classList.add('toggled');
|
|
}
|
|
});
|
|
</script>
|
|
|
|
{% block scripts %}{% endblock %}
|
|
</body>
|
|
</html>
|