221 lines
10 KiB
HTML
221 lines
10 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title>{% block title %}{{ app_name }}{% endblock %}</title>
|
|
|
|
<!-- Favicons -->
|
|
<link rel="icon" type="image/x-icon" href="{{ url_for('static', filename='favicon.ico') }}">
|
|
<link rel="icon" type="image/png" sizes="32x32" href="{{ url_for('static', filename='favicon-32x32.png') }}">
|
|
<link rel="icon" type="image/png" sizes="16x16" href="{{ url_for('static', filename='favicon-16x16.png') }}">
|
|
<link rel="apple-touch-icon" sizes="180x180" href="{{ url_for('static', filename='apple-touch-icon.png') }}">
|
|
|
|
<!-- Preconnect to CDNs for better performance -->
|
|
<link rel="preconnect" href="https://cdn.jsdelivr.net">
|
|
<link rel="preconnect" href="https://fonts.googleapis.com">
|
|
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
|
|
|
<!-- Google Fonts - Inter for modern look -->
|
|
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap" rel="stylesheet">
|
|
|
|
<!-- 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.0/font/bootstrap-icons.css">
|
|
|
|
<!-- Custom CSS -->
|
|
<link rel="stylesheet" href="{{ url_for('static', filename='css/style.css') }}">
|
|
|
|
{% block extra_css %}{% endblock %}
|
|
|
|
<!-- Meta description for SEO -->
|
|
<meta name="description" content="Organize and manage your LEGO instruction manuals with ease. Upload PDFs, search by theme, and integrate with Brickset API.">
|
|
<meta name="theme-color" content="#d11013">
|
|
</head>
|
|
<body>
|
|
<!-- Navigation -->
|
|
<nav class="navbar navbar-expand-lg navbar-dark bg-danger mb-4">
|
|
<div class="container">
|
|
<a class="navbar-brand" href="{{ url_for('main.index') }}">
|
|
<i class="bi bi-bricks"></i> {{ app_name }}
|
|
</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 ms-auto">
|
|
{% if current_user.is_authenticated %}
|
|
<li class="nav-item">
|
|
<a class="nav-link" href="{{ url_for('main.dashboard') }}">
|
|
<i class="bi bi-speedometer2"></i> Dashboard
|
|
</a>
|
|
</li>
|
|
<li class="nav-item">
|
|
<a class="nav-link" href="{{ url_for('sets.list_sets') }}">
|
|
<i class="bi bi-grid"></i> My Sets
|
|
</a>
|
|
</li>
|
|
<li class="nav-item dropdown">
|
|
<a class="nav-link dropdown-toggle" href="#" id="addDropdown" role="button" data-bs-toggle="dropdown">
|
|
<i class="bi bi-plus-circle"></i> Add New
|
|
</a>
|
|
<ul class="dropdown-menu">
|
|
<li>
|
|
<a class="dropdown-item" href="{{ url_for('sets.add_set') }}">
|
|
<i class="bi bi-box-seam"></i> Official LEGO Set
|
|
</a>
|
|
</li>
|
|
<li>
|
|
<a class="dropdown-item" href="{{ url_for('sets.add_set') }}?type=moc">
|
|
<i class="bi bi-star-fill text-warning"></i> MOC (Custom Build)
|
|
</a>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
<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> {{ current_user.username }}
|
|
</a>
|
|
<ul class="dropdown-menu dropdown-menu-end">
|
|
<li><a class="dropdown-item" href="{{ url_for('auth.profile') }}"><i class="bi bi-person"></i> Profile</a></li>
|
|
<li><hr class="dropdown-divider"></li>
|
|
<li><a class="dropdown-item" href="{{ url_for('auth.logout') }}"><i class="bi bi-box-arrow-right"></i> Logout</a></li>
|
|
</ul>
|
|
</li>
|
|
{% else %}
|
|
<li class="nav-item">
|
|
<a class="nav-link" href="{{ url_for('auth.login') }}">
|
|
<i class="bi bi-box-arrow-in-right"></i> Login
|
|
</a>
|
|
</li>
|
|
<li class="nav-item">
|
|
<a class="nav-link" href="{{ url_for('auth.register') }}">
|
|
<i class="bi bi-person-plus"></i> Register
|
|
</a>
|
|
</li>
|
|
{% endif %}
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
</nav>
|
|
|
|
<!-- Flash Messages -->
|
|
<div class="container">
|
|
{% with messages = get_flashed_messages(with_categories=true) %}
|
|
{% if messages %}
|
|
{% for category, message in messages %}
|
|
<div class="alert alert-{{ category }} alert-dismissible fade show" role="alert">
|
|
{% if category == 'success' %}
|
|
<i class="bi bi-check-circle-fill me-2"></i>
|
|
{% elif category == 'danger' %}
|
|
<i class="bi bi-exclamation-triangle-fill me-2"></i>
|
|
{% elif category == 'warning' %}
|
|
<i class="bi bi-exclamation-circle-fill me-2"></i>
|
|
{% elif category == 'info' %}
|
|
<i class="bi bi-info-circle-fill me-2"></i>
|
|
{% endif %}
|
|
{{ message }}
|
|
<button type="button" class="btn-close" data-bs-dismiss="alert"></button>
|
|
</div>
|
|
{% endfor %}
|
|
{% endif %}
|
|
{% endwith %}
|
|
</div>
|
|
|
|
<!-- Main Content -->
|
|
<main class="container">
|
|
{% block content %}{% endblock %}
|
|
</main>
|
|
|
|
<!-- Footer -->
|
|
<footer class="mt-5 py-4">
|
|
<div class="container text-center">
|
|
<p class="mb-2">
|
|
<i class="bi bi-bricks"></i> <strong>LEGO Instructions Manager</strong>
|
|
</p>
|
|
<p class="mb-2 small">
|
|
Organize, manage, and access all your LEGO instruction manuals
|
|
</p>
|
|
<p class="mb-0 small">
|
|
© 2024-{{ "now"|date("Y") }} LEGO Instructions Manager
|
|
{% if brickset_available %}
|
|
<span class="badge bg-success ms-2">
|
|
<i class="bi bi-check-circle"></i> Brickset Connected
|
|
</span>
|
|
{% endif %}
|
|
</p>
|
|
</div>
|
|
</footer>
|
|
|
|
<!-- Bootstrap 5 JS Bundle -->
|
|
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js"></script>
|
|
|
|
<!-- jQuery (for easier AJAX) -->
|
|
<script src="https://code.jquery.com/jquery-3.7.1.min.js"></script>
|
|
|
|
<!-- Custom JavaScript for enhancements -->
|
|
<script>
|
|
// Add smooth scroll behavior
|
|
document.querySelectorAll('a[href^="#"]').forEach(anchor => {
|
|
anchor.addEventListener('click', function (e) {
|
|
e.preventDefault();
|
|
const target = document.querySelector(this.getAttribute('href'));
|
|
if (target) {
|
|
target.scrollIntoView({ behavior: 'smooth', block: 'start' });
|
|
}
|
|
});
|
|
});
|
|
|
|
// Auto-hide flash messages after 5 seconds
|
|
setTimeout(function() {
|
|
const alerts = document.querySelectorAll('.alert');
|
|
alerts.forEach(alert => {
|
|
const bsAlert = new bootstrap.Alert(alert);
|
|
bsAlert.close();
|
|
});
|
|
}, 5000);
|
|
|
|
// Add loading state to buttons on form submit
|
|
document.querySelectorAll('form').forEach(form => {
|
|
form.addEventListener('submit', function(e) {
|
|
const submitBtn = this.querySelector('button[type="submit"]');
|
|
if (submitBtn && !submitBtn.disabled) {
|
|
submitBtn.disabled = true;
|
|
const originalText = submitBtn.innerHTML;
|
|
submitBtn.innerHTML = '<span class="spinner-border spinner-border-sm me-2"></span>Loading...';
|
|
|
|
// Re-enable after 10 seconds as fallback
|
|
setTimeout(() => {
|
|
submitBtn.disabled = false;
|
|
submitBtn.innerHTML = originalText;
|
|
}, 10000);
|
|
}
|
|
});
|
|
});
|
|
|
|
// Add ripple effect to buttons
|
|
document.querySelectorAll('.btn').forEach(button => {
|
|
button.addEventListener('click', function(e) {
|
|
const ripple = document.createElement('span');
|
|
const rect = this.getBoundingClientRect();
|
|
const size = Math.max(rect.width, rect.height);
|
|
const x = e.clientX - rect.left - size / 2;
|
|
const y = e.clientY - rect.top - size / 2;
|
|
|
|
ripple.style.width = ripple.style.height = size + 'px';
|
|
ripple.style.left = x + 'px';
|
|
ripple.style.top = y + 'px';
|
|
ripple.classList.add('ripple');
|
|
|
|
this.appendChild(ripple);
|
|
|
|
setTimeout(() => ripple.remove(), 600);
|
|
});
|
|
});
|
|
</script>
|
|
|
|
{% block extra_js %}{% endblock %}
|
|
</body>
|
|
</html> |