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' %}"> <link rel="stylesheet" href="{% static 'member/css/styles.css' %}">
</head> </head>
<body> <body>
{% include "partials/sidebar.html" %}
{% block content %} <div class="main">
{% endblock %} {% block content %}{% endblock %}
</div>
</body> </body>
</html> </html>

View File

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