add new guide service

This commit is contained in:
team2
2026-02-26 20:40:42 +01:00
parent 12f2a48f88
commit a68f5182e4
11 changed files with 1017 additions and 12 deletions

View File

@@ -4,9 +4,11 @@
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>{% block title %}Admin{% endblock %}</title>
<link href="/assets/styles/bootstrap.min.css" rel="stylesheet"/>
<link rel="stylesheet" href="/assets/styles/base.css">
{% block stylesheets %}
<link href="/assets/styles/bootstrap.min.css" rel="stylesheet"/>
<link rel="stylesheet" href="/assets/styles/base.css">
<link rel="stylesheet" href="{{ asset('/assets/styles/admin-markdown.css') }}">
{% endblock %}
</head>
<body class="bg-dark text-light">
@@ -111,6 +113,15 @@
href="{{ path('admin_model_config_list') }}">
Modell-Generierung
</a>
<hr class="border-secondary">
<div class="text-info text-uppercase small mb-2">
System-Guiide
</div>
<a class="nav-link text-light {% if route starts with 'admin_model_config' %}active fw-bold{% endif %}"
href="{{ path('admin_guides_index') }}">
How-To & Leitfäden
</a>
</nav>
</aside>

View File

@@ -0,0 +1,54 @@
{% extends 'admin/base.html.twig' %}
{% block title %}Guides{% endblock %}
{% block body %}
<div class="d-flex justify-content-between align-items-center mb-4 text-light">
<div>
<h1 class="h3 mb-0">How-To & Leitfäden</h1>
<small class="text-muted">
{{ guides|length }} Guide{{ guides|length == 1 ? '' : 's' }} verfügbar
</small>
</div>
</div>
<div class="card bg-black border-secondary shadow-sm text-light">
<div class="card-body p-0">
{% if guides is empty %}
<div class="p-4 text-center text-light">
Keine Guides vorhanden.
</div>
{% else %}
<div class="list-group list-group-flush">
{% for guide in guides %}
<a href="{{ path('admin_guides_view', {slug: guide.slug}) }}"
class="list-group-item list-group-item-action bg-black border-secondary guide-item">
<div class="d-flex justify-content-between align-items-center">
<div>
<div class="fw-semibold text-light">
{{ guide.title }}
</div>
<small class="text-light">
{{ guide.slug }}
</small>
</div>
<span class="text-muted small">
</span>
</div>
</a>
{% endfor %}
</div>
{% endif %}
</div>
</div>
{% endblock %}

View File

@@ -0,0 +1,15 @@
{% extends 'admin/base.html.twig' %}
{% block title %}Guide{% endblock %}
{% block body %}
<a href="{{ path('admin_guides_index') }}" class="btn btn-sm btn-outline-secondary mb-3">
← Zurück
</a>
<div class="card bg-black border-secondary">
<div class="card-body markdown-content">
{{ html|raw }}
</div>
</div>
{% endblock %}