Initial commit - Help Service for Coolify
This commit is contained in:
33
templates/404.html
Normal file
33
templates/404.html
Normal file
@@ -0,0 +1,33 @@
|
||||
{% extends "base.html" %}
|
||||
|
||||
{% block title %}Nicht gefunden{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div class="container-fluid">
|
||||
<div class="row justify-content-center">
|
||||
<div class="col-md-6">
|
||||
<div class="card text-center py-5">
|
||||
<div class="card-body">
|
||||
<i class="bi bi-question-circle text-warning display-1 mb-4"></i>
|
||||
<h2>Seite nicht gefunden</h2>
|
||||
<p class="text-muted mb-4">
|
||||
{% if topic_id %}
|
||||
Das Hilfethema <code>{{ topic_id }}</code> existiert nicht.
|
||||
{% else %}
|
||||
Das gesuchte Hilfethema existiert leider nicht.
|
||||
{% endif %}
|
||||
</p>
|
||||
<div class="d-flex gap-2 justify-content-center">
|
||||
<a href="/" class="btn btn-primary">
|
||||
<i class="bi bi-house me-2"></i>Zur Startseite
|
||||
</a>
|
||||
<a href="/search" class="btn btn-outline-secondary">
|
||||
<i class="bi bi-search me-2"></i>Suchen
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
370
templates/base.html
Normal file
370
templates/base.html
Normal file
@@ -0,0 +1,370 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="de" data-bs-theme="dark">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>{% block title %}Hilfe{% endblock %} - Kurs-Booking</title>
|
||||
|
||||
<!-- Bootstrap 5 CSS -->
|
||||
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/css/bootstrap.min.css" rel="stylesheet">
|
||||
<!-- Bootstrap Icons -->
|
||||
<link href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.1/font/bootstrap-icons.css" rel="stylesheet">
|
||||
|
||||
<style>
|
||||
:root {
|
||||
--kb-primary: #6366f1;
|
||||
--kb-primary-hover: #4f46e5;
|
||||
--kb-success: #22c55e;
|
||||
--kb-warning: #f59e0b;
|
||||
--kb-danger: #ef4444;
|
||||
}
|
||||
|
||||
body {
|
||||
min-height: 100vh;
|
||||
background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
|
||||
}
|
||||
|
||||
.sidebar {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 280px;
|
||||
height: 100vh;
|
||||
background: rgba(30, 30, 46, 0.95);
|
||||
border-right: 1px solid rgba(255,255,255,0.1);
|
||||
overflow-y: auto;
|
||||
z-index: 1000;
|
||||
}
|
||||
|
||||
.sidebar-brand {
|
||||
padding: 1.5rem;
|
||||
border-bottom: 1px solid rgba(255,255,255,0.1);
|
||||
background: linear-gradient(135deg, var(--kb-primary), #8b5cf6);
|
||||
}
|
||||
|
||||
.sidebar-brand h4 {
|
||||
margin: 0;
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
.sidebar-nav {
|
||||
padding: 1rem 0;
|
||||
}
|
||||
|
||||
.nav-section {
|
||||
padding: 0.5rem 1.5rem;
|
||||
font-size: 0.75rem;
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 0.05em;
|
||||
color: rgba(255,255,255,0.5);
|
||||
margin-top: 1rem;
|
||||
}
|
||||
|
||||
.nav-link {
|
||||
padding: 0.6rem 1.5rem;
|
||||
color: rgba(255,255,255,0.8);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 0.75rem;
|
||||
transition: all 0.2s;
|
||||
border-left: 3px solid transparent;
|
||||
}
|
||||
|
||||
.nav-link:hover {
|
||||
background: rgba(255,255,255,0.05);
|
||||
color: #fff;
|
||||
border-left-color: var(--kb-primary);
|
||||
}
|
||||
|
||||
.nav-link.active {
|
||||
background: rgba(99, 102, 241, 0.2);
|
||||
color: #fff;
|
||||
border-left-color: var(--kb-primary);
|
||||
}
|
||||
|
||||
.nav-link i {
|
||||
font-size: 1.1rem;
|
||||
width: 1.5rem;
|
||||
}
|
||||
|
||||
.main-content {
|
||||
margin-left: 280px;
|
||||
padding: 2rem;
|
||||
min-height: 100vh;
|
||||
}
|
||||
|
||||
.search-box {
|
||||
padding: 1rem 1.5rem;
|
||||
}
|
||||
|
||||
.search-box .form-control {
|
||||
background: rgba(255,255,255,0.05);
|
||||
border: 1px solid rgba(255,255,255,0.1);
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.search-box .form-control:focus {
|
||||
background: rgba(255,255,255,0.1);
|
||||
border-color: var(--kb-primary);
|
||||
box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.25);
|
||||
}
|
||||
|
||||
.card {
|
||||
background: rgba(30, 30, 46, 0.8);
|
||||
border: 1px solid rgba(255,255,255,0.1);
|
||||
border-radius: 12px;
|
||||
}
|
||||
|
||||
.card-header {
|
||||
background: rgba(255,255,255,0.05);
|
||||
border-bottom: 1px solid rgba(255,255,255,0.1);
|
||||
}
|
||||
|
||||
.topic-card {
|
||||
transition: transform 0.2s, box-shadow 0.2s;
|
||||
}
|
||||
|
||||
.topic-card:hover {
|
||||
transform: translateY(-2px);
|
||||
box-shadow: 0 8px 25px rgba(0,0,0,0.3);
|
||||
}
|
||||
|
||||
.badge-section {
|
||||
background: var(--kb-primary);
|
||||
font-size: 0.7rem;
|
||||
}
|
||||
|
||||
.content-body h3 {
|
||||
color: var(--kb-primary);
|
||||
margin-top: 1.5rem;
|
||||
margin-bottom: 1rem;
|
||||
}
|
||||
|
||||
.content-body h4 {
|
||||
color: #a5b4fc;
|
||||
margin-top: 1.25rem;
|
||||
}
|
||||
|
||||
.content-body table {
|
||||
width: 100%;
|
||||
margin: 1rem 0;
|
||||
}
|
||||
|
||||
.content-body table th,
|
||||
.content-body table td {
|
||||
padding: 0.75rem;
|
||||
border: 1px solid rgba(255,255,255,0.1);
|
||||
}
|
||||
|
||||
.content-body table th {
|
||||
background: rgba(99, 102, 241, 0.2);
|
||||
}
|
||||
|
||||
.content-body code {
|
||||
background: rgba(99, 102, 241, 0.2);
|
||||
padding: 0.2rem 0.4rem;
|
||||
border-radius: 4px;
|
||||
color: #a5b4fc;
|
||||
}
|
||||
|
||||
.content-body pre {
|
||||
background: rgba(0,0,0,0.3);
|
||||
padding: 1rem;
|
||||
border-radius: 8px;
|
||||
overflow-x: auto;
|
||||
}
|
||||
|
||||
.content-body ul, .content-body ol {
|
||||
padding-left: 1.5rem;
|
||||
}
|
||||
|
||||
.content-body li {
|
||||
margin-bottom: 0.5rem;
|
||||
}
|
||||
|
||||
.tip-box {
|
||||
background: rgba(34, 197, 94, 0.1);
|
||||
border-left: 4px solid var(--kb-success);
|
||||
padding: 1rem;
|
||||
border-radius: 0 8px 8px 0;
|
||||
margin: 1rem 0;
|
||||
}
|
||||
|
||||
.warning-box {
|
||||
background: rgba(245, 158, 11, 0.1);
|
||||
border-left: 4px solid var(--kb-warning);
|
||||
padding: 1rem;
|
||||
border-radius: 0 8px 8px 0;
|
||||
margin: 1rem 0;
|
||||
}
|
||||
|
||||
@media (max-width: 991px) {
|
||||
.sidebar {
|
||||
transform: translateX(-100%);
|
||||
transition: transform 0.3s;
|
||||
}
|
||||
|
||||
.sidebar.show {
|
||||
transform: translateX(0);
|
||||
}
|
||||
|
||||
.main-content {
|
||||
margin-left: 0;
|
||||
}
|
||||
|
||||
.mobile-toggle {
|
||||
display: block !important;
|
||||
}
|
||||
}
|
||||
|
||||
.mobile-toggle {
|
||||
display: none;
|
||||
position: fixed;
|
||||
top: 1rem;
|
||||
left: 1rem;
|
||||
z-index: 1001;
|
||||
}
|
||||
|
||||
/* Scrollbar */
|
||||
::-webkit-scrollbar {
|
||||
width: 8px;
|
||||
}
|
||||
|
||||
::-webkit-scrollbar-track {
|
||||
background: rgba(0,0,0,0.2);
|
||||
}
|
||||
|
||||
::-webkit-scrollbar-thumb {
|
||||
background: rgba(255,255,255,0.2);
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
||||
::-webkit-scrollbar-thumb:hover {
|
||||
background: rgba(255,255,255,0.3);
|
||||
}
|
||||
|
||||
/* Sticky TOC Sidebar */
|
||||
.toc-sidebar {
|
||||
position: sticky;
|
||||
top: 2rem;
|
||||
max-height: calc(100vh - 4rem);
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
.toc-nav {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.toc-link {
|
||||
display: block;
|
||||
padding: 0.4rem 0.75rem;
|
||||
color: rgba(255,255,255,0.7);
|
||||
text-decoration: none;
|
||||
font-size: 0.875rem;
|
||||
border-left: 2px solid transparent;
|
||||
transition: all 0.2s ease;
|
||||
}
|
||||
|
||||
.toc-link:hover {
|
||||
color: #fff;
|
||||
background: rgba(255,255,255,0.05);
|
||||
}
|
||||
|
||||
.toc-link.active {
|
||||
color: var(--kb-primary);
|
||||
border-left-color: var(--kb-primary);
|
||||
background: rgba(99, 102, 241, 0.1);
|
||||
}
|
||||
|
||||
.toc-link-sub {
|
||||
padding-left: 1.5rem;
|
||||
font-size: 0.8125rem;
|
||||
}
|
||||
|
||||
.toc-card {
|
||||
border: 1px solid rgba(99, 102, 241, 0.3);
|
||||
}
|
||||
|
||||
/* Smooth scroll */
|
||||
html {
|
||||
scroll-behavior: smooth;
|
||||
}
|
||||
|
||||
/* Scroll offset for sticky header */
|
||||
[id] {
|
||||
scroll-margin-top: 1rem;
|
||||
}
|
||||
|
||||
@media (max-width: 991px) {
|
||||
.toc-sidebar {
|
||||
position: static;
|
||||
max-height: none;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<!-- Mobile Toggle -->
|
||||
<button class="btn btn-primary mobile-toggle" onclick="document.querySelector('.sidebar').classList.toggle('show')">
|
||||
<i class="bi bi-list"></i>
|
||||
</button>
|
||||
|
||||
<!-- Sidebar -->
|
||||
<nav class="sidebar">
|
||||
<a href="/" class="sidebar-brand text-decoration-none text-white d-block">
|
||||
<h4><i class="bi bi-book me-2"></i>Kurs-Booking</h4>
|
||||
<small class="text-white-50">Hilfe & Dokumentation</small>
|
||||
</a>
|
||||
|
||||
<div class="search-box">
|
||||
<form action="/search" method="get">
|
||||
<div class="input-group">
|
||||
<span class="input-group-text bg-transparent border-end-0">
|
||||
<i class="bi bi-search text-muted"></i>
|
||||
</span>
|
||||
<input type="text" name="q" class="form-control border-start-0"
|
||||
placeholder="Suchen..." value="{{ request.args.get('q', '') }}">
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<div class="sidebar-nav">
|
||||
<a href="/" class="nav-link {% if request.path == '/' %}active{% endif %}">
|
||||
<i class="bi bi-house"></i>
|
||||
<span>Startseite</span>
|
||||
</a>
|
||||
|
||||
{% for section in content.sections %}
|
||||
<div class="nav-section">{{ section.title }}</div>
|
||||
{% for topic in section.topics %}
|
||||
<a href="/topic/{{ topic.id }}" class="nav-link {% if request.path == '/topic/' + topic.id %}active{% endif %}">
|
||||
<i class="bi bi-{{ topic.icon|default('file-text') }}"></i>
|
||||
<span>{{ topic.title }}</span>
|
||||
</a>
|
||||
{% endfor %}
|
||||
{% endfor %}
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<!-- Main Content -->
|
||||
<main class="main-content">
|
||||
{% block content %}{% endblock %}
|
||||
</main>
|
||||
|
||||
<!-- Bootstrap JS -->
|
||||
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/js/bootstrap.bundle.min.js"></script>
|
||||
|
||||
<!-- Auto-scroll sidebar to active menu item -->
|
||||
<script>
|
||||
document.addEventListener('DOMContentLoaded', function() {
|
||||
const activeLink = document.querySelector('.sidebar .nav-link.active');
|
||||
if (activeLink) {
|
||||
activeLink.scrollIntoView({ block: 'center', behavior: 'instant' });
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
{% block scripts %}{% endblock %}
|
||||
</body>
|
||||
</html>
|
||||
143
templates/index.html
Normal file
143
templates/index.html
Normal file
@@ -0,0 +1,143 @@
|
||||
{% extends "base.html" %}
|
||||
|
||||
{% block title %}Startseite{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div class="container-fluid">
|
||||
<!-- Header -->
|
||||
<div class="row mb-4">
|
||||
<div class="col-12">
|
||||
<div class="card">
|
||||
<div class="card-body text-center py-5">
|
||||
<h1 class="display-5 mb-3">
|
||||
<i class="bi bi-life-preserver text-primary me-3"></i>
|
||||
Willkommen zur Hilfe
|
||||
</h1>
|
||||
<p class="lead text-muted mb-4">
|
||||
Alles was Sie ueber das Kurs-Booking Plugin wissen muessen
|
||||
</p>
|
||||
<form action="/search" method="get" class="d-flex justify-content-center">
|
||||
<div class="input-group" style="max-width: 500px;">
|
||||
<input type="text" name="q" class="form-control form-control-lg"
|
||||
placeholder="Was moechten Sie wissen?">
|
||||
<button class="btn btn-primary btn-lg" type="submit">
|
||||
<i class="bi bi-search"></i>
|
||||
</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Quick Links -->
|
||||
<div class="row mb-4">
|
||||
<div class="col-12">
|
||||
<h4 class="mb-3"><i class="bi bi-lightning me-2"></i>Schnellstart</h4>
|
||||
</div>
|
||||
<div class="col-md-3 mb-3">
|
||||
<a href="/topic/buchungsfelder-uebersicht" class="text-decoration-none">
|
||||
<div class="card topic-card h-100">
|
||||
<div class="card-body text-center">
|
||||
<i class="bi bi-ui-checks-grid text-primary display-4 mb-3"></i>
|
||||
<h5>Buchungsfelder</h5>
|
||||
<p class="text-muted small mb-0">Formularfelder verwalten</p>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
<div class="col-md-3 mb-3">
|
||||
<a href="/topic/produktarten" class="text-decoration-none">
|
||||
<div class="card topic-card h-100">
|
||||
<div class="card-body text-center">
|
||||
<i class="bi bi-tags text-success display-4 mb-3"></i>
|
||||
<h5>Produktarten</h5>
|
||||
<p class="text-muted small mb-0">Kurs, Workshop, Webinar</p>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
<div class="col-md-3 mb-3">
|
||||
<a href="/topic/email-vorlagen" class="text-decoration-none">
|
||||
<div class="card topic-card h-100">
|
||||
<div class="card-body text-center">
|
||||
<i class="bi bi-envelope text-warning display-4 mb-3"></i>
|
||||
<h5>E-Mail Vorlagen</h5>
|
||||
<p class="text-muted small mb-0">Templates anpassen</p>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
<div class="col-md-3 mb-3">
|
||||
<a href="/topic/sevdesk" class="text-decoration-none">
|
||||
<div class="card topic-card h-100">
|
||||
<div class="card-body text-center">
|
||||
<i class="bi bi-receipt text-info display-4 mb-3"></i>
|
||||
<h5>sevDesk</h5>
|
||||
<p class="text-muted small mb-0">Rechnungen erstellen</p>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- All Sections -->
|
||||
{% for section in content.sections %}
|
||||
<div class="row mb-4">
|
||||
<div class="col-12">
|
||||
<h4 class="mb-3">
|
||||
<i class="bi bi-{{ section.icon|default('folder') }} me-2"></i>
|
||||
{{ section.title }}
|
||||
</h4>
|
||||
</div>
|
||||
{% for topic in section.topics %}
|
||||
<div class="col-md-4 mb-3">
|
||||
<a href="/topic/{{ topic.id }}" class="text-decoration-none">
|
||||
<div class="card topic-card h-100">
|
||||
<div class="card-body">
|
||||
<div class="d-flex align-items-start">
|
||||
<i class="bi bi-{{ topic.icon|default('file-text') }} text-primary me-3 fs-4"></i>
|
||||
<div>
|
||||
<h6 class="mb-1">{{ topic.title }}</h6>
|
||||
<p class="text-muted small mb-0">{{ topic.description }}</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endfor %}
|
||||
|
||||
<!-- Interner Bereich -->
|
||||
<div class="row mt-5">
|
||||
<div class="col-12">
|
||||
<a href="/intern/" class="text-decoration-none">
|
||||
<div class="card border-danger bg-danger bg-opacity-10">
|
||||
<div class="card-body d-flex align-items-center">
|
||||
<i class="bi bi-shield-lock text-danger display-6 me-3"></i>
|
||||
<div>
|
||||
<h5 class="mb-1 text-danger">Interner Bereich</h5>
|
||||
<p class="text-muted mb-0">API-Dokumentation, DevOps & Troubleshooting fuer Entwickler (passwortgeschuetzt)</p>
|
||||
</div>
|
||||
<i class="bi bi-arrow-right text-danger ms-auto fs-4"></i>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Footer -->
|
||||
<div class="row mt-5">
|
||||
<div class="col-12 text-center">
|
||||
<hr class="border-secondary">
|
||||
<p class="text-muted small">
|
||||
<i class="bi bi-info-circle me-1"></i>
|
||||
Kurs-Booking Plugin v1.3.1 •
|
||||
<a href="https://web-werkstatt.at" target="_blank" class="text-muted">web-werkstatt.at</a>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
24
templates/intern/404.html
Normal file
24
templates/intern/404.html
Normal file
@@ -0,0 +1,24 @@
|
||||
{% extends "intern/base.html" %}
|
||||
|
||||
{% block title %}Nicht gefunden{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div class="container-fluid">
|
||||
<div class="row justify-content-center">
|
||||
<div class="col-md-6">
|
||||
<div class="card text-center">
|
||||
<div class="card-body py-5">
|
||||
<i class="bi bi-exclamation-triangle text-danger display-1 mb-4"></i>
|
||||
<h2>Seite nicht gefunden</h2>
|
||||
<p class="text-muted">
|
||||
Das Thema <code>{{ topic_id }}</code> existiert nicht.
|
||||
</p>
|
||||
<a href="/intern/" class="btn btn-danger">
|
||||
<i class="bi bi-arrow-left me-2"></i>Zurueck zur Uebersicht
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
254
templates/intern/base.html
Normal file
254
templates/intern/base.html
Normal file
@@ -0,0 +1,254 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="de" data-bs-theme="dark">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>{% block title %}Intern{% endblock %} - Kurs-Booking (Intern)</title>
|
||||
|
||||
<!-- Bootstrap 5 CSS -->
|
||||
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/css/bootstrap.min.css" rel="stylesheet">
|
||||
<!-- Bootstrap Icons -->
|
||||
<link href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.1/font/bootstrap-icons.css" rel="stylesheet">
|
||||
|
||||
<style>
|
||||
:root {
|
||||
--kb-primary: #dc2626;
|
||||
--kb-primary-hover: #b91c1c;
|
||||
--kb-success: #22c55e;
|
||||
--kb-warning: #f59e0b;
|
||||
--kb-danger: #ef4444;
|
||||
}
|
||||
|
||||
body {
|
||||
min-height: 100vh;
|
||||
background: linear-gradient(135deg, #1a1a2e 0%, #2d1f1f 100%);
|
||||
}
|
||||
|
||||
.sidebar {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 280px;
|
||||
height: 100vh;
|
||||
background: rgba(30, 20, 20, 0.95);
|
||||
border-right: 1px solid rgba(220, 38, 38, 0.3);
|
||||
overflow-y: auto;
|
||||
z-index: 1000;
|
||||
}
|
||||
|
||||
.sidebar-brand {
|
||||
padding: 1.5rem;
|
||||
border-bottom: 1px solid rgba(220, 38, 38, 0.3);
|
||||
background: linear-gradient(135deg, #dc2626, #991b1b);
|
||||
}
|
||||
|
||||
.sidebar-brand h4 {
|
||||
margin: 0;
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
.sidebar-nav {
|
||||
padding: 1rem 0;
|
||||
}
|
||||
|
||||
.nav-section {
|
||||
padding: 0.5rem 1.5rem;
|
||||
font-size: 0.75rem;
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 0.05em;
|
||||
color: rgba(255,255,255,0.5);
|
||||
margin-top: 1rem;
|
||||
}
|
||||
|
||||
.nav-link {
|
||||
padding: 0.6rem 1.5rem;
|
||||
color: rgba(255,255,255,0.8);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 0.75rem;
|
||||
transition: all 0.2s;
|
||||
border-left: 3px solid transparent;
|
||||
}
|
||||
|
||||
.nav-link:hover {
|
||||
background: rgba(220, 38, 38, 0.1);
|
||||
color: #fff;
|
||||
border-left-color: var(--kb-primary);
|
||||
}
|
||||
|
||||
.nav-link.active {
|
||||
background: rgba(220, 38, 38, 0.2);
|
||||
color: #fff;
|
||||
border-left-color: var(--kb-primary);
|
||||
}
|
||||
|
||||
.nav-link i {
|
||||
font-size: 1.1rem;
|
||||
width: 1.5rem;
|
||||
}
|
||||
|
||||
.main-content {
|
||||
margin-left: 280px;
|
||||
padding: 2rem;
|
||||
min-height: 100vh;
|
||||
}
|
||||
|
||||
.card {
|
||||
background: rgba(30, 20, 20, 0.8);
|
||||
border: 1px solid rgba(220, 38, 38, 0.2);
|
||||
border-radius: 12px;
|
||||
}
|
||||
|
||||
.card-header {
|
||||
background: rgba(220, 38, 38, 0.1);
|
||||
border-bottom: 1px solid rgba(220, 38, 38, 0.2);
|
||||
}
|
||||
|
||||
.topic-card {
|
||||
transition: transform 0.2s, box-shadow 0.2s;
|
||||
}
|
||||
|
||||
.topic-card:hover {
|
||||
transform: translateY(-2px);
|
||||
box-shadow: 0 8px 25px rgba(220, 38, 38, 0.2);
|
||||
}
|
||||
|
||||
.content-body h2 {
|
||||
color: var(--kb-primary);
|
||||
border-bottom: 1px solid rgba(220, 38, 38, 0.3);
|
||||
padding-bottom: 0.5rem;
|
||||
margin-top: 2rem;
|
||||
}
|
||||
|
||||
.content-body h3 {
|
||||
color: #fca5a5;
|
||||
margin-top: 1.5rem;
|
||||
}
|
||||
|
||||
.content-body table {
|
||||
width: 100%;
|
||||
margin: 1rem 0;
|
||||
}
|
||||
|
||||
.content-body table th,
|
||||
.content-body table td {
|
||||
padding: 0.75rem;
|
||||
border: 1px solid rgba(220, 38, 38, 0.2);
|
||||
}
|
||||
|
||||
.content-body table th {
|
||||
background: rgba(220, 38, 38, 0.2);
|
||||
}
|
||||
|
||||
.content-body code {
|
||||
background: rgba(220, 38, 38, 0.2);
|
||||
padding: 0.2rem 0.4rem;
|
||||
border-radius: 4px;
|
||||
color: #fca5a5;
|
||||
}
|
||||
|
||||
.content-body pre {
|
||||
background: rgba(0,0,0,0.4);
|
||||
padding: 1rem;
|
||||
border-radius: 8px;
|
||||
overflow-x: auto;
|
||||
border: 1px solid rgba(220, 38, 38, 0.2);
|
||||
}
|
||||
|
||||
.intern-badge {
|
||||
background: var(--kb-primary);
|
||||
color: white;
|
||||
padding: 0.25rem 0.75rem;
|
||||
border-radius: 20px;
|
||||
font-size: 0.75rem;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.toc-sidebar {
|
||||
position: sticky;
|
||||
top: 2rem;
|
||||
}
|
||||
|
||||
.toc-link {
|
||||
display: block;
|
||||
padding: 0.4rem 0.75rem;
|
||||
color: rgba(255,255,255,0.7);
|
||||
text-decoration: none;
|
||||
font-size: 0.875rem;
|
||||
border-left: 2px solid transparent;
|
||||
}
|
||||
|
||||
.toc-link:hover {
|
||||
color: #fff;
|
||||
background: rgba(220, 38, 38, 0.1);
|
||||
}
|
||||
|
||||
.toc-link.active {
|
||||
color: var(--kb-primary);
|
||||
border-left-color: var(--kb-primary);
|
||||
}
|
||||
|
||||
@media (max-width: 991px) {
|
||||
.sidebar {
|
||||
transform: translateX(-100%);
|
||||
transition: transform 0.3s;
|
||||
}
|
||||
.sidebar.show {
|
||||
transform: translateX(0);
|
||||
}
|
||||
.main-content {
|
||||
margin-left: 0;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<!-- Sidebar -->
|
||||
<nav class="sidebar">
|
||||
<a href="/intern/" class="sidebar-brand text-decoration-none text-white d-block">
|
||||
<h4><i class="bi bi-shield-lock me-2"></i>Intern</h4>
|
||||
<small class="text-white-50">Entwickler-Dokumentation</small>
|
||||
</a>
|
||||
|
||||
<div class="sidebar-nav">
|
||||
<a href="/intern/" class="nav-link {% if request.path == '/intern/' %}active{% endif %}">
|
||||
<i class="bi bi-house"></i>
|
||||
<span>Uebersicht</span>
|
||||
</a>
|
||||
|
||||
<a href="/" class="nav-link text-warning">
|
||||
<i class="bi bi-arrow-left"></i>
|
||||
<span>Zurueck zur Hilfe</span>
|
||||
</a>
|
||||
|
||||
{% for section in content.sections %}
|
||||
<div class="nav-section">{{ section.title }}</div>
|
||||
{% for topic in section.topics %}
|
||||
<a href="/intern/topic/{{ topic.id }}" class="nav-link {% if request.path == '/intern/topic/' + topic.id %}active{% endif %}">
|
||||
<i class="bi bi-{{ topic.icon|default('file-lock') }}"></i>
|
||||
<span>{{ topic.title }}</span>
|
||||
</a>
|
||||
{% endfor %}
|
||||
{% endfor %}
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<!-- Main Content -->
|
||||
<main class="main-content">
|
||||
{% block content %}{% endblock %}
|
||||
</main>
|
||||
|
||||
<!-- Bootstrap JS -->
|
||||
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/js/bootstrap.bundle.min.js"></script>
|
||||
|
||||
<!-- Auto-scroll sidebar to active menu item -->
|
||||
<script>
|
||||
document.addEventListener('DOMContentLoaded', function() {
|
||||
const activeLink = document.querySelector('.sidebar .nav-link.active');
|
||||
if (activeLink) {
|
||||
activeLink.scrollIntoView({ block: 'center', behavior: 'instant' });
|
||||
}
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
116
templates/intern/index.html
Normal file
116
templates/intern/index.html
Normal file
@@ -0,0 +1,116 @@
|
||||
{% extends "intern/base.html" %}
|
||||
|
||||
{% block title %}Uebersicht{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div class="container-fluid">
|
||||
<!-- Header -->
|
||||
<div class="row mb-4">
|
||||
<div class="col-12">
|
||||
<div class="card">
|
||||
<div class="card-body text-center py-5">
|
||||
<span class="intern-badge mb-3 d-inline-block">INTERNER BEREICH</span>
|
||||
<h1 class="display-5 mb-3">
|
||||
<i class="bi bi-shield-lock text-danger me-3"></i>
|
||||
Entwickler-Dokumentation
|
||||
</h1>
|
||||
<p class="lead text-muted mb-0">
|
||||
Technische Referenz, API, DevOps und Troubleshooting
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Quick Access -->
|
||||
<div class="row mb-4">
|
||||
<div class="col-12">
|
||||
<h4 class="mb-3"><i class="bi bi-lightning me-2"></i>Schnellzugriff</h4>
|
||||
</div>
|
||||
<div class="col-md-3 mb-3">
|
||||
<a href="/intern/topic/api/hooks" class="text-decoration-none">
|
||||
<div class="card topic-card h-100">
|
||||
<div class="card-body text-center">
|
||||
<i class="bi bi-code-slash text-danger display-4 mb-3"></i>
|
||||
<h5>Hooks & Filter</h5>
|
||||
<p class="text-muted small mb-0">Actions & Filters</p>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
<div class="col-md-3 mb-3">
|
||||
<a href="/intern/topic/api/meta-felder" class="text-decoration-none">
|
||||
<div class="card topic-card h-100">
|
||||
<div class="card-body text-center">
|
||||
<i class="bi bi-database text-warning display-4 mb-3"></i>
|
||||
<h5>Meta-Felder</h5>
|
||||
<p class="text-muted small mb-0">Alle Post Meta Keys</p>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
<div class="col-md-3 mb-3">
|
||||
<a href="/intern/topic/devops/docker" class="text-decoration-none">
|
||||
<div class="card topic-card h-100">
|
||||
<div class="card-body text-center">
|
||||
<i class="bi bi-box text-info display-4 mb-3"></i>
|
||||
<h5>Docker</h5>
|
||||
<p class="text-muted small mb-0">Container & Ports</p>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
<div class="col-md-3 mb-3">
|
||||
<a href="/intern/topic/troubleshooting/debug" class="text-decoration-none">
|
||||
<div class="card topic-card h-100">
|
||||
<div class="card-body text-center">
|
||||
<i class="bi bi-bug text-success display-4 mb-3"></i>
|
||||
<h5>Debugging</h5>
|
||||
<p class="text-muted small mb-0">Logs & Fehlersuche</p>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- All Sections -->
|
||||
{% for section in content.sections %}
|
||||
<div class="row mb-4">
|
||||
<div class="col-12">
|
||||
<h4 class="mb-3">
|
||||
<i class="bi bi-{{ section.icon|default('folder') }} me-2"></i>
|
||||
{{ section.title }}
|
||||
</h4>
|
||||
</div>
|
||||
{% for topic in section.topics %}
|
||||
<div class="col-md-4 mb-3">
|
||||
<a href="/intern/topic/{{ topic.id }}" class="text-decoration-none">
|
||||
<div class="card topic-card h-100">
|
||||
<div class="card-body">
|
||||
<div class="d-flex align-items-start">
|
||||
<i class="bi bi-{{ topic.icon|default('file-lock') }} text-danger me-3 fs-4"></i>
|
||||
<div>
|
||||
<h6 class="mb-1">{{ topic.title }}</h6>
|
||||
<p class="text-muted small mb-0">{{ topic.description }}</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endfor %}
|
||||
|
||||
<!-- Footer -->
|
||||
<div class="row mt-5">
|
||||
<div class="col-12 text-center">
|
||||
<hr class="border-danger opacity-25">
|
||||
<p class="text-muted small">
|
||||
<i class="bi bi-shield-lock me-1"></i>
|
||||
Interner Bereich - Nur fuer autorisierte Entwickler
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
94
templates/intern/topic.html
Normal file
94
templates/intern/topic.html
Normal file
@@ -0,0 +1,94 @@
|
||||
{% extends "intern/base.html" %}
|
||||
|
||||
{% block title %}{{ topic.title }}{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
<!-- Main Content -->
|
||||
<div class="col-lg-9">
|
||||
<!-- Breadcrumb -->
|
||||
<nav aria-label="breadcrumb" class="mb-3">
|
||||
<ol class="breadcrumb">
|
||||
<li class="breadcrumb-item"><a href="/intern/" class="text-danger">Intern</a></li>
|
||||
{% if parent_topic %}
|
||||
<li class="breadcrumb-item"><a href="/intern/topic/{{ parent_topic.id }}" class="text-danger">{{ parent_topic.title }}</a></li>
|
||||
{% endif %}
|
||||
<li class="breadcrumb-item active">{{ topic.title }}</li>
|
||||
</ol>
|
||||
</nav>
|
||||
|
||||
<!-- Topic Card -->
|
||||
<div class="card">
|
||||
<div class="card-header d-flex justify-content-between align-items-center">
|
||||
<h1 class="h3 mb-0">
|
||||
<i class="bi bi-{{ topic.icon|default('file-lock') }} text-danger me-2"></i>
|
||||
{{ topic.title }}
|
||||
</h1>
|
||||
<span class="intern-badge">INTERN</span>
|
||||
</div>
|
||||
<div class="card-body content-body">
|
||||
{% if topic.description %}
|
||||
<p class="lead text-muted">{{ topic.description }}</p>
|
||||
<hr class="border-danger opacity-25">
|
||||
{% endif %}
|
||||
|
||||
{{ topic.content|safe }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Child Topics -->
|
||||
{% if child_topics %}
|
||||
<div class="card mt-4">
|
||||
<div class="card-header">
|
||||
<h5 class="mb-0"><i class="bi bi-folder2-open me-2"></i>Unterseiten</h5>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="row">
|
||||
{% for child in child_topics %}
|
||||
<div class="col-md-6 mb-3">
|
||||
<a href="/intern/topic/{{ child.id }}" class="text-decoration-none">
|
||||
<div class="card topic-card h-100">
|
||||
<div class="card-body">
|
||||
<div class="d-flex align-items-start">
|
||||
<i class="bi bi-{{ child.icon|default('file-lock') }} text-danger me-3 fs-4"></i>
|
||||
<div>
|
||||
<h6 class="mb-1">{{ child.title }}</h6>
|
||||
<p class="text-muted small mb-0">{{ child.description }}</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
<!-- TOC Sidebar -->
|
||||
<div class="col-lg-3 d-none d-lg-block">
|
||||
{% if topic.toc %}
|
||||
<div class="toc-sidebar">
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<h6 class="mb-0"><i class="bi bi-list-ul me-2"></i>Inhalt</h6>
|
||||
</div>
|
||||
<div class="card-body p-2">
|
||||
<nav class="toc-nav">
|
||||
{% for item in topic.toc %}
|
||||
<a href="#{{ item.id }}" class="toc-link {% if item.level == 3 %}ps-4{% endif %}">
|
||||
{{ item.title }}
|
||||
</a>
|
||||
{% endfor %}
|
||||
</nav>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
84
templates/search.html
Normal file
84
templates/search.html
Normal file
@@ -0,0 +1,84 @@
|
||||
{% extends "base.html" %}
|
||||
|
||||
{% block title %}Suche: {{ query }}{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div class="container-fluid">
|
||||
<!-- Search Header -->
|
||||
<div class="row mb-4">
|
||||
<div class="col-12">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<h2 class="mb-3">
|
||||
<i class="bi bi-search me-2"></i>
|
||||
Suchergebnisse
|
||||
</h2>
|
||||
<form action="/search" method="get">
|
||||
<div class="input-group" style="max-width: 600px;">
|
||||
<input type="text" name="q" class="form-control form-control-lg"
|
||||
placeholder="Suchbegriff eingeben..." value="{{ query }}">
|
||||
<button class="btn btn-primary btn-lg" type="submit">
|
||||
<i class="bi bi-search"></i> Suchen
|
||||
</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Results -->
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
{% if query %}
|
||||
{% if results %}
|
||||
<p class="text-muted mb-4">
|
||||
{{ results|length }} Ergebnis{% if results|length != 1 %}se{% endif %} fuer "{{ query }}"
|
||||
</p>
|
||||
|
||||
{% for result in results %}
|
||||
<div class="card mb-3 topic-card">
|
||||
<div class="card-body">
|
||||
<a href="/topic/{{ result.id }}" class="text-decoration-none">
|
||||
<div class="d-flex align-items-start">
|
||||
<i class="bi bi-file-text text-primary me-3 fs-4"></i>
|
||||
<div>
|
||||
<h5 class="mb-1">{{ result.title }}</h5>
|
||||
<p class="text-muted mb-2">{{ result.description }}</p>
|
||||
<span class="badge bg-secondary">{{ result.section }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
|
||||
{% else %}
|
||||
<div class="card">
|
||||
<div class="card-body text-center py-5">
|
||||
<i class="bi bi-search text-muted display-1 mb-3"></i>
|
||||
<h4>Keine Ergebnisse gefunden</h4>
|
||||
<p class="text-muted">
|
||||
Fuer "{{ query }}" wurden keine passenden Hilfethemen gefunden.
|
||||
</p>
|
||||
<a href="/" class="btn btn-primary">
|
||||
<i class="bi bi-house me-2"></i>Zur Startseite
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% else %}
|
||||
<div class="card">
|
||||
<div class="card-body text-center py-5">
|
||||
<i class="bi bi-search text-muted display-1 mb-3"></i>
|
||||
<h4>Geben Sie einen Suchbegriff ein</h4>
|
||||
<p class="text-muted">
|
||||
Durchsuchen Sie die gesamte Hilfe nach Stichworten.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
241
templates/topic.html
Normal file
241
templates/topic.html
Normal file
@@ -0,0 +1,241 @@
|
||||
{% extends "base.html" %}
|
||||
|
||||
{% block title %}{{ topic.title }}{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div class="container-fluid">
|
||||
<!-- Breadcrumb -->
|
||||
<nav aria-label="breadcrumb" class="mb-4">
|
||||
<ol class="breadcrumb">
|
||||
<li class="breadcrumb-item"><a href="/">Startseite</a></li>
|
||||
{% if parent_topic %}
|
||||
<li class="breadcrumb-item"><a href="/topic/{{ parent_topic.id }}">{{ parent_topic.title }}</a></li>
|
||||
{% endif %}
|
||||
<li class="breadcrumb-item active">{{ topic.title }}</li>
|
||||
</ol>
|
||||
</nav>
|
||||
|
||||
<!-- Topic Header -->
|
||||
<div class="row mb-4">
|
||||
<div class="col-12">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<div class="d-flex align-items-center mb-3">
|
||||
<i class="bi bi-{{ topic.icon|default('file-text') }} text-primary display-4 me-3"></i>
|
||||
<div>
|
||||
<h1 class="mb-1">{{ topic.title }}</h1>
|
||||
<p class="text-muted mb-0">{{ topic.description }}</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% if topic.tags %}
|
||||
<div class="mt-3">
|
||||
{% for tag in topic.tags %}
|
||||
<span class="badge bg-secondary me-1">{{ tag }}</span>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Topic Content -->
|
||||
<div class="row">
|
||||
<div class="col-lg-9">
|
||||
<div class="card">
|
||||
<div class="card-body content-body">
|
||||
{{ topic.content|safe }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Child Topics / Subpages -->
|
||||
{% if child_topics %}
|
||||
<div class="card mt-4">
|
||||
<div class="card-header bg-primary bg-opacity-10">
|
||||
<h5 class="mb-0"><i class="bi bi-folder2-open me-2"></i>Unterseiten</h5>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="row">
|
||||
{% for child in child_topics %}
|
||||
<div class="col-md-6 mb-3">
|
||||
<a href="/topic/{{ child.id }}" class="text-decoration-none">
|
||||
<div class="card h-100 hover-shadow">
|
||||
<div class="card-body py-3">
|
||||
<div class="d-flex align-items-center">
|
||||
<i class="bi bi-{{ child.icon|default('file-text') }} text-primary me-3 fs-4"></i>
|
||||
<div>
|
||||
<h6 class="mb-1">{{ child.title }}</h6>
|
||||
{% if child.description %}
|
||||
<small class="text-muted">{{ child.description }}</small>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
<!-- Related Topics -->
|
||||
{% if topic.related %}
|
||||
<div class="card mt-4">
|
||||
<div class="card-header">
|
||||
<h5 class="mb-0"><i class="bi bi-link-45deg me-2"></i>Verwandte Themen</h5>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="row">
|
||||
{% for related_id in topic.related %}
|
||||
{% for section in content.sections %}
|
||||
{% for t in section.topics %}
|
||||
{% if t.id == related_id %}
|
||||
<div class="col-md-6 mb-2">
|
||||
<a href="/topic/{{ t.id }}" class="text-decoration-none">
|
||||
<div class="d-flex align-items-center p-2 rounded hover-bg">
|
||||
<i class="bi bi-{{ t.icon|default('file-text') }} text-primary me-2"></i>
|
||||
<span>{{ t.title }}</span>
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
{% endfor %}
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
<!-- Sidebar (Sticky) -->
|
||||
<div class="col-lg-3">
|
||||
<div class="toc-sidebar">
|
||||
<!-- Table of Contents -->
|
||||
{% if topic.toc %}
|
||||
<div class="card mb-4 toc-card">
|
||||
<div class="card-header">
|
||||
<h6 class="mb-0"><i class="bi bi-list-ul me-2"></i>Inhalt</h6>
|
||||
</div>
|
||||
<div class="card-body py-2">
|
||||
<nav class="toc-nav" id="toc-nav">
|
||||
{% for item in topic.toc %}
|
||||
<a href="#{{ item.id }}" class="toc-link {% if item.level == 3 %}toc-link-sub{% endif %}" data-target="{{ item.id }}">
|
||||
{{ item.title }}
|
||||
</a>
|
||||
{% endfor %}
|
||||
</nav>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
<!-- Quick Tips -->
|
||||
{% if topic.tips %}
|
||||
<div class="card">
|
||||
<div class="card-header bg-success bg-opacity-25">
|
||||
<h6 class="mb-0 text-success"><i class="bi bi-lightbulb me-2"></i>Tipps</h6>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<ul class="list-unstyled mb-0">
|
||||
{% for tip in topic.tips %}
|
||||
<li class="mb-2">
|
||||
<i class="bi bi-check-circle text-success me-1"></i>
|
||||
{{ tip }}
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Navigation -->
|
||||
<div class="row mt-4">
|
||||
<div class="col-12">
|
||||
<div class="d-flex justify-content-between">
|
||||
<a href="/" class="btn btn-outline-secondary">
|
||||
<i class="bi bi-arrow-left me-2"></i>Zurueck zur Uebersicht
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
{% block scripts %}
|
||||
<script>
|
||||
// Scroll-Spy for TOC
|
||||
document.addEventListener('DOMContentLoaded', function() {
|
||||
const tocNav = document.getElementById('toc-nav');
|
||||
if (!tocNav) return;
|
||||
|
||||
const tocLinks = tocNav.querySelectorAll('.toc-link');
|
||||
if (tocLinks.length === 0) return;
|
||||
|
||||
// Get all headings that are in the TOC
|
||||
const headingIds = Array.from(tocLinks).map(link => link.getAttribute('data-target'));
|
||||
const headings = headingIds.map(id => document.getElementById(id)).filter(el => el);
|
||||
|
||||
if (headings.length === 0) return;
|
||||
|
||||
function updateActiveLink() {
|
||||
const scrollPos = window.scrollY + 100; // Offset for better UX
|
||||
|
||||
let activeIndex = 0;
|
||||
|
||||
// Find the heading that is currently in view
|
||||
for (let i = 0; i < headings.length; i++) {
|
||||
if (headings[i].offsetTop <= scrollPos) {
|
||||
activeIndex = i;
|
||||
}
|
||||
}
|
||||
|
||||
// Update active state
|
||||
tocLinks.forEach((link, index) => {
|
||||
if (index === activeIndex) {
|
||||
link.classList.add('active');
|
||||
} else {
|
||||
link.classList.remove('active');
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// Throttle scroll events
|
||||
let ticking = false;
|
||||
window.addEventListener('scroll', function() {
|
||||
if (!ticking) {
|
||||
window.requestAnimationFrame(function() {
|
||||
updateActiveLink();
|
||||
ticking = false;
|
||||
});
|
||||
ticking = true;
|
||||
}
|
||||
});
|
||||
|
||||
// Initial update
|
||||
updateActiveLink();
|
||||
|
||||
// Smooth scroll with offset when clicking TOC links
|
||||
tocLinks.forEach(link => {
|
||||
link.addEventListener('click', function(e) {
|
||||
e.preventDefault();
|
||||
const targetId = this.getAttribute('data-target');
|
||||
const target = document.getElementById(targetId);
|
||||
if (target) {
|
||||
const offset = 20;
|
||||
const targetPos = target.offsetTop - offset;
|
||||
window.scrollTo({
|
||||
top: targetPos,
|
||||
behavior: 'smooth'
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
</script>
|
||||
{% endblock %}
|
||||
Reference in New Issue
Block a user