Adding navigation block to master template

This commit is contained in:
Michael Bergbauer 2025-06-12 21:50:06 +02:00
parent 39ceb520ba
commit a47ffa0b0b
3 changed files with 21 additions and 12 deletions

View File

@ -6,9 +6,9 @@
<link rel="stylesheet" href="{% static 'member/css/styles.css' %}">
</head>
<body>
{% block content %}
{% endblock %}
{% include "partials/sidebar.html" %}
<div class="main">
{% block content %}{% endblock %}
</div>
</body>
</html>

View File

@ -5,13 +5,15 @@
{% endblock %}
{% block content %}
<h1>Members</h1>
<ul>
{% for x in mymembers %}
<li><a href="details/{{x.id}}"> {{ x.vorname }} {{ x.nachname }}</a></li>
{% empty %}
<li>Keine Datensaetze gefunden</li>
{% endfor %}
</ul>
<div class="members-table">
<h3>Members</h3>
<ul>
{% for x in mymembers %}
<li><a href="details/{{x.id}}"> {{ x.vorname }} {{ x.nachname }}</a></li>
{% empty %}
<li>Keine Datensaetze gefunden</li>
{% endfor %}
</ul>
</div>
{% endblock %}

View File

@ -0,0 +1,7 @@
<div class="sidebar">
<h2>🧯 VERWALTUNG</h2>
<nav>
<a href={% url 'members' %} class="{% if request.path == '/members/' %}active{% endif %}">Mitglieder</a>
</nav>
</div>