Compare commits
No commits in common. "c1332ee1f0aeeeb409b493b0345998c9590a4b55" and "caf98ba60b8a2b364405beeef15958695ae2351e" have entirely different histories.
c1332ee1f0
...
caf98ba60b
@ -1,48 +1,10 @@
|
|||||||
from ..models import Animal, RescueOrganization, AdoptionNotice, Species, Image
|
from ..models import AdoptionNotice
|
||||||
from rest_framework import serializers
|
from rest_framework import serializers
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
class AdoptionNoticeSerializer(serializers.HyperlinkedModelSerializer):
|
class AdoptionNoticeSerializer(serializers.HyperlinkedModelSerializer):
|
||||||
class Meta:
|
class Meta:
|
||||||
model = AdoptionNotice
|
model = AdoptionNotice
|
||||||
fields = ['created_at', 'last_checked', "searching_since", "name", "description", "further_information",
|
fields = ['created_at', 'last_checked', "searching_since", "name", "description", "further_information", "group_only"]
|
||||||
"group_only"]
|
|
||||||
|
|
||||||
|
|
||||||
class AnimalCreateSerializer(serializers.ModelSerializer):
|
|
||||||
class Meta:
|
|
||||||
model = Animal
|
|
||||||
fields = ["name", "date_of_birth", "description", "species", "sex", "adoption_notice"]
|
|
||||||
|
|
||||||
|
|
||||||
class AnimalGetSerializer(serializers.ModelSerializer):
|
|
||||||
class Meta:
|
|
||||||
model = Animal
|
|
||||||
fields = "__all__"
|
|
||||||
|
|
||||||
|
|
||||||
class RescueOrganizationSerializer(serializers.ModelSerializer):
|
|
||||||
class Meta:
|
|
||||||
model = RescueOrganization
|
|
||||||
exclude = ["internal_comment", "allows_using_materials"]
|
|
||||||
|
|
||||||
|
|
||||||
class ImageCreateSerializer(serializers.ModelSerializer):
|
|
||||||
@staticmethod
|
|
||||||
def _animal_or_an(value):
|
|
||||||
if not value in ["animal", "adoption_notice"]:
|
|
||||||
raise serializers.ValidationError(
|
|
||||||
'Set either animal or adoption_notice, depending on what type of object the image should be attached to.')
|
|
||||||
|
|
||||||
attach_to_type = serializers.CharField(validators=[_animal_or_an])
|
|
||||||
attach_to = serializers.IntegerField()
|
|
||||||
|
|
||||||
class Meta:
|
|
||||||
model = Image
|
|
||||||
exclude = ["owner"]
|
|
||||||
|
|
||||||
|
|
||||||
class SpeciesSerializer(serializers.ModelSerializer):
|
|
||||||
class Meta:
|
|
||||||
model = Species
|
|
||||||
fields = "__all__"
|
|
||||||
|
@ -1,16 +1,8 @@
|
|||||||
from django.urls import path
|
from django.urls import path
|
||||||
from .views import (
|
from .views import (
|
||||||
AdoptionNoticeApiView,
|
AdoptionNoticeApiView
|
||||||
AnimalApiView, RescueOrganizationApiView, AddImageApiView, SpeciesApiView
|
|
||||||
)
|
)
|
||||||
|
|
||||||
urlpatterns = [
|
urlpatterns = [
|
||||||
path("adoption_notice", AdoptionNoticeApiView.as_view(), name="api-adoption-notice-list"),
|
path('adoption_notice', AdoptionNoticeApiView.as_view()),
|
||||||
path("adoption_notice/<int:id>/", AdoptionNoticeApiView.as_view(), name="api-adoption-notice-detail"),
|
|
||||||
path("animals/", AnimalApiView.as_view(), name="api-animal-list"),
|
|
||||||
path("animals/<int:id>/", AnimalApiView.as_view(), name="api-animal-detail"),
|
|
||||||
path("organizations/", RescueOrganizationApiView.as_view(), name="api-organization-list"),
|
|
||||||
path("organizations/<int:id>/", RescueOrganizationApiView.as_view(), name="api-organization-detail"),
|
|
||||||
path("images/", AddImageApiView.as_view(), name="api-add-image"),
|
|
||||||
path("species/", SpeciesApiView.as_view(), name="api-species-list"),
|
|
||||||
]
|
]
|
||||||
|
@ -7,36 +7,18 @@ from rest_framework.permissions import IsAuthenticated
|
|||||||
from django.db import transaction
|
from django.db import transaction
|
||||||
from fellchensammlung.models import AdoptionNotice, Animal, Log, TrustLevel
|
from fellchensammlung.models import AdoptionNotice, Animal, Log, TrustLevel
|
||||||
from fellchensammlung.tasks import add_adoption_notice_location
|
from fellchensammlung.tasks import add_adoption_notice_location
|
||||||
from rest_framework import status
|
from .serializers import AdoptionNoticeSerializer
|
||||||
from rest_framework.permissions import IsAuthenticated
|
|
||||||
from .serializers import (
|
|
||||||
AnimalGetSerializer,
|
|
||||||
AnimalCreateSerializer,
|
|
||||||
RescueOrganizationSerializer,
|
|
||||||
AdoptionNoticeSerializer,
|
|
||||||
ImageCreateSerializer,
|
|
||||||
SpeciesSerializer,
|
|
||||||
)
|
|
||||||
from fellchensammlung.models import Animal, RescueOrganization, AdoptionNotice, Species, Image
|
|
||||||
|
|
||||||
|
|
||||||
class AdoptionNoticeApiView(APIView):
|
class AdoptionNoticeApiView(APIView):
|
||||||
permission_classes = [IsAuthenticated]
|
permission_classes = [permissions.IsAuthenticated]
|
||||||
|
|
||||||
def get(self, request, *args, **kwargs):
|
def get(self, request, *args, **kwargs):
|
||||||
"""
|
serializer_context = {
|
||||||
Retrieve adoption notices with their related animals and images.
|
'request': request,
|
||||||
"""
|
}
|
||||||
adoption_notice_id = kwargs.get("id")
|
|
||||||
if adoption_notice_id:
|
|
||||||
try:
|
|
||||||
adoption_notice = AdoptionNotice.objects.get(pk=adoption_notice_id)
|
|
||||||
serializer = AdoptionNoticeSerializer(adoption_notice, context={"request": request})
|
|
||||||
return Response(serializer.data, status=status.HTTP_200_OK)
|
|
||||||
except AdoptionNotice.DoesNotExist:
|
|
||||||
return Response({"error": "Adoption notice not found."}, status=status.HTTP_404_NOT_FOUND)
|
|
||||||
adoption_notices = AdoptionNotice.objects.all()
|
adoption_notices = AdoptionNotice.objects.all()
|
||||||
serializer = AdoptionNoticeSerializer(adoption_notices, many=True, context={"request": request})
|
serializer = AdoptionNoticeSerializer(adoption_notices, many=True, context=serializer_context)
|
||||||
return Response(serializer.data, status=status.HTTP_200_OK)
|
return Response(serializer.data, status=status.HTTP_200_OK)
|
||||||
|
|
||||||
@transaction.atomic
|
@transaction.atomic
|
||||||
@ -71,96 +53,3 @@ class AdoptionNoticeApiView(APIView):
|
|||||||
{"message": "Adoption notice created successfully!", "id": adoption_notice.pk},
|
{"message": "Adoption notice created successfully!", "id": adoption_notice.pk},
|
||||||
status=status.HTTP_201_CREATED,
|
status=status.HTTP_201_CREATED,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
class AnimalApiView(APIView):
|
|
||||||
permission_classes = [IsAuthenticated]
|
|
||||||
|
|
||||||
def get(self, request, *args, **kwargs):
|
|
||||||
"""
|
|
||||||
Get list of animals or a specific animal by ID.
|
|
||||||
"""
|
|
||||||
animal_id = kwargs.get("id")
|
|
||||||
if animal_id:
|
|
||||||
try:
|
|
||||||
animal = Animal.objects.get(pk=animal_id)
|
|
||||||
serializer = AnimalGetSerializer(animal, context={"request": request})
|
|
||||||
return Response(serializer.data, status=status.HTTP_200_OK)
|
|
||||||
except Animal.DoesNotExist:
|
|
||||||
return Response({"error": "Animal not found."}, status=status.HTTP_404_NOT_FOUND)
|
|
||||||
animals = Animal.objects.all()
|
|
||||||
serializer = AnimalGetSerializer(animals, many=True, context={"request": request})
|
|
||||||
return Response(serializer.data, status=status.HTTP_200_OK)
|
|
||||||
|
|
||||||
@transaction.atomic
|
|
||||||
def post(self, request, *args, **kwargs):
|
|
||||||
"""
|
|
||||||
Create a new animal.
|
|
||||||
"""
|
|
||||||
serializer = AnimalCreateSerializer(data=request.data, context={"request": request})
|
|
||||||
if serializer.is_valid():
|
|
||||||
animal = serializer.save(owner=request.user)
|
|
||||||
return Response(
|
|
||||||
{"message": "Animal created successfully!", "id": animal.id},
|
|
||||||
status=status.HTTP_201_CREATED,
|
|
||||||
)
|
|
||||||
return Response(serializer.errors, status=status.HTTP_400_BAD_REQUEST)
|
|
||||||
|
|
||||||
|
|
||||||
class RescueOrganizationApiView(APIView):
|
|
||||||
permission_classes = [IsAuthenticated]
|
|
||||||
|
|
||||||
def get(self, request, *args, **kwargs):
|
|
||||||
"""
|
|
||||||
Get list of rescue organizations or a specific organization by ID.
|
|
||||||
"""
|
|
||||||
org_id = kwargs.get("id")
|
|
||||||
if org_id:
|
|
||||||
try:
|
|
||||||
organization = RescueOrganization.objects.get(pk=org_id)
|
|
||||||
serializer = RescueOrganizationSerializer(organization, context={"request": request})
|
|
||||||
return Response(serializer.data, status=status.HTTP_200_OK)
|
|
||||||
except RescueOrganization.DoesNotExist:
|
|
||||||
return Response({"error": "Organization not found."}, status=status.HTTP_404_NOT_FOUND)
|
|
||||||
organizations = RescueOrganization.objects.all()
|
|
||||||
serializer = RescueOrganizationSerializer(organizations, many=True, context={"request": request})
|
|
||||||
return Response(serializer.data, status=status.HTTP_200_OK)
|
|
||||||
|
|
||||||
|
|
||||||
class AddImageApiView(APIView):
|
|
||||||
permission_classes = [IsAuthenticated]
|
|
||||||
|
|
||||||
@transaction.atomic
|
|
||||||
def post(self, request, *args, **kwargs):
|
|
||||||
"""
|
|
||||||
Add an image to an animal or adoption notice.
|
|
||||||
"""
|
|
||||||
serializer = ImageCreateSerializer(data=request.data, context={"request": request})
|
|
||||||
if serializer.is_valid():
|
|
||||||
if serializer.validated_data["attach_to_type"] == "animal":
|
|
||||||
object_to_attach_to = Animal.objects.get(id=serializer.validated_data["attach_to"])
|
|
||||||
elif serializer.fields["attach_to_type"] == "adoption_notice":
|
|
||||||
object_to_attach_to = AdoptionNotice.objects.get(id=serializer.validated_data["attach_to"])
|
|
||||||
else:
|
|
||||||
raise ValueError("Unknown attach_to_type given, should not happen. Check serializer")
|
|
||||||
serializer.validated_data.pop('attach_to_type', None)
|
|
||||||
serializer.validated_data.pop('attach_to', None)
|
|
||||||
image = serializer.save(owner=request.user)
|
|
||||||
object_to_attach_to.photos.add(image)
|
|
||||||
return Response(
|
|
||||||
{"message": "Image added successfully!", "id": image.id},
|
|
||||||
status=status.HTTP_201_CREATED,
|
|
||||||
)
|
|
||||||
return Response(serializer.errors, status=status.HTTP_400_BAD_REQUEST)
|
|
||||||
|
|
||||||
|
|
||||||
class SpeciesApiView(APIView):
|
|
||||||
permission_classes = [IsAuthenticated]
|
|
||||||
|
|
||||||
def get(self, request, *args, **kwargs):
|
|
||||||
"""
|
|
||||||
Retrieve a list of species.
|
|
||||||
"""
|
|
||||||
species = Species.objects.all()
|
|
||||||
serializer = SpeciesSerializer(species, many=True, context={"request": request})
|
|
||||||
return Response(serializer.data, status=status.HTTP_200_OK)
|
|
||||||
|
@ -22,7 +22,6 @@
|
|||||||
--text-three: var(--primary-light-one);
|
--text-three: var(--primary-light-one);
|
||||||
--shadow-three: var(--primary-dark-one);
|
--shadow-three: var(--primary-dark-one);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**************************/
|
/**************************/
|
||||||
/* TAG SETTINGS (GENERAL) */
|
/* TAG SETTINGS (GENERAL) */
|
||||||
/**************************/
|
/**************************/
|
||||||
@ -141,8 +140,9 @@ textarea {
|
|||||||
|
|
||||||
.profile-card {
|
.profile-card {
|
||||||
display: flex;
|
display: flex;
|
||||||
|
border-radius: 0px 0px 8px 8px;
|
||||||
|
background-color: var(--highlight-two);
|
||||||
color: var(--highlight-one-text);
|
color: var(--highlight-one-text);
|
||||||
align-items: center;
|
|
||||||
|
|
||||||
.btn2 {
|
.btn2 {
|
||||||
height: 40px;
|
height: 40px;
|
||||||
@ -211,6 +211,8 @@ select, .button {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*********************/
|
/*********************/
|
||||||
/* UNIQUE COMPONENTS */
|
/* UNIQUE COMPONENTS */
|
||||||
/*********************/
|
/*********************/
|
||||||
@ -224,142 +226,62 @@ select, .button {
|
|||||||
background-color: var(--background-two);
|
background-color: var(--background-two);
|
||||||
border-bottom-left-radius: 15px;
|
border-bottom-left-radius: 15px;
|
||||||
border-bottom-right-radius: 15px;
|
border-bottom-right-radius: 15px;
|
||||||
|
|
||||||
display: flex;
|
|
||||||
flex-direction: row;
|
|
||||||
align-items: center;
|
|
||||||
justify-content: space-between;
|
|
||||||
/* W3C, IE 10+/ Edge, Firefox 16+, Chrome 26+, Opera 12+, Safari 7+ */
|
|
||||||
color: #FFF;
|
|
||||||
height: 50px;
|
|
||||||
padding: 1em;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#main-menu {
|
.nav-link {
|
||||||
order: -1;
|
color: var(--text-one);
|
||||||
|
text-align: center;
|
||||||
|
text-decoration: none;
|
||||||
|
border-radius: 4px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.menu {
|
.header a, .header form {
|
||||||
display: flex;
|
float: left;
|
||||||
flex-direction: row;
|
padding: 5px 12px 5px 12px;
|
||||||
list-style-type: none;
|
line-height: 25px;
|
||||||
margin: 0;
|
|
||||||
padding: 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.menu > li {
|
.header a:hover {
|
||||||
margin: 0 1rem;
|
background-color: var(--highlight-one);
|
||||||
overflow: hidden;
|
color: var(--highlight-one-text);
|
||||||
}
|
}
|
||||||
|
|
||||||
.menu-button-container {
|
.header a.active {
|
||||||
display: none;
|
background-color: dodgerblue;
|
||||||
height: 100%;
|
|
||||||
width: 30px;
|
|
||||||
cursor: pointer;
|
|
||||||
flex-direction: column;
|
|
||||||
justify-content: center;
|
|
||||||
align-items: center;
|
|
||||||
background: #4ab457;
|
|
||||||
padding: 20px;
|
|
||||||
border-radius: 8px;
|
|
||||||
}
|
|
||||||
|
|
||||||
#menu-toggle {
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
.menu-button,
|
|
||||||
.menu-button::before,
|
|
||||||
.menu-button::after {
|
|
||||||
display: block;
|
|
||||||
background-color: #fff;
|
|
||||||
position: absolute;
|
|
||||||
height: 4px;
|
|
||||||
width: 30px;
|
|
||||||
transition: transform 400ms cubic-bezier(0.23, 1, 0.32, 1);
|
|
||||||
border-radius: 2px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.menu-button::before {
|
|
||||||
content: '';
|
|
||||||
margin-top: -8px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.menu-button::after {
|
|
||||||
content: '';
|
|
||||||
margin-top: 8px;
|
|
||||||
}
|
|
||||||
|
|
||||||
#menu-toggle:checked + .menu-button-container .menu-button::before {
|
|
||||||
margin-top: 0px;
|
|
||||||
transform: rotate(405deg);
|
|
||||||
}
|
|
||||||
|
|
||||||
#menu-toggle:checked + .menu-button-container .menu-button {
|
|
||||||
background: rgba(255, 255, 255, 0);
|
|
||||||
}
|
|
||||||
|
|
||||||
#menu-toggle:checked + .menu-button-container .menu-button::after {
|
|
||||||
margin-top: 0px;
|
|
||||||
transform: rotate(-405deg);
|
|
||||||
}
|
|
||||||
|
|
||||||
@media (max-width: 700px) {
|
|
||||||
.menu-button-container {
|
|
||||||
display: flex;
|
|
||||||
}
|
|
||||||
|
|
||||||
.menu {
|
|
||||||
position: absolute;
|
|
||||||
top: 0;
|
|
||||||
margin-top: 50px;
|
|
||||||
left: 0;
|
|
||||||
flex-direction: column;
|
|
||||||
width: 100%;
|
|
||||||
justify-content: center;
|
|
||||||
align-items: center;
|
|
||||||
}
|
|
||||||
|
|
||||||
#menu-toggle ~ nav .menu li {
|
|
||||||
height: 0;
|
|
||||||
margin: 0;
|
|
||||||
padding: 0;
|
|
||||||
border: 0;
|
|
||||||
transition: height 400ms cubic-bezier(0.23, 1, 0.32, 1);
|
|
||||||
}
|
|
||||||
|
|
||||||
#menu-toggle:checked ~ nav .menu li {
|
|
||||||
height: 3em;
|
|
||||||
padding: 1em;
|
|
||||||
transition: height 400ms cubic-bezier(0.23, 1, 0.32, 1);
|
|
||||||
}
|
|
||||||
|
|
||||||
.header {
|
|
||||||
border-radius: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.menu > li {
|
|
||||||
display: flex;
|
|
||||||
justify-content: center;
|
|
||||||
margin: 0;
|
|
||||||
padding: 0.5em 0;
|
|
||||||
width: 100%;
|
|
||||||
color: white;
|
color: white;
|
||||||
background-color: var(--background-two);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.menu > li:not(:last-child) {
|
|
||||||
border-bottom: 1px solid #444;
|
|
||||||
|
.header-right select.option {
|
||||||
|
color: #000;
|
||||||
|
background-color: var(--highlight-one);
|
||||||
|
border: 1px;
|
||||||
}
|
}
|
||||||
|
|
||||||
#header-sign-out, #header-change-language {
|
.header-right {
|
||||||
display: none;
|
float: right;
|
||||||
|
display: flex;
|
||||||
|
border-radius: 0px 0px 15px 15px;
|
||||||
|
background-color: var(--highlight-two);
|
||||||
|
color: var(--highlight-one-text);
|
||||||
|
padding: 5px 5px 0px 5px;
|
||||||
|
height: 67px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@media screen and (max-width: 500px) {
|
||||||
|
.header a {
|
||||||
|
float: none;
|
||||||
|
display: block;
|
||||||
|
text-align: left;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.header-right {
|
||||||
|
float: none;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.logo img {
|
.logo img {
|
||||||
height: 40px;
|
height: 40px;
|
||||||
@ -509,6 +431,9 @@ select, .button {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.photos {
|
.photos {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
@ -574,6 +499,7 @@ select, .button {
|
|||||||
.btn-notification {
|
.btn-notification {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
position: relative;
|
position: relative;
|
||||||
|
padding: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Make the badge float in the top right corner of the button */
|
/* Make the badge float in the top right corner of the button */
|
||||||
@ -654,6 +580,7 @@ select, .button {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.form-comments {
|
.form-comments {
|
||||||
.btn {
|
.btn {
|
||||||
margin: 5px;
|
margin: 5px;
|
||||||
|
@ -1,16 +1,21 @@
|
|||||||
{% load static %}
|
{% load static %}
|
||||||
{% load i18n %}
|
{% load i18n %}
|
||||||
|
|
||||||
<section class="header">
|
<div class="header">
|
||||||
<div>
|
|
||||||
<a href="{% url "index" %}" class="logo"><img src={% static 'fellchensammlung/img/logo_transparent.png' %}></a>
|
<a href="{% url "index" %}" class="logo"><img src={% static 'fellchensammlung/img/logo_transparent.png' %}></a>
|
||||||
</div>
|
<nav id="nav" class="nav justify-content-center">
|
||||||
|
<a class="nav-link " href="{% url "search" %}"><i class="fas fa-search"></i> {% translate 'Suchen' %}</a>
|
||||||
|
<a class="nav-link " href="{% url "add-adoption" %}"><i
|
||||||
|
class="fas fa-feather"></i> {% translate 'Vermittlung hinzufügen' %}</a>
|
||||||
|
<a class="nav-link " href="{% url "about" %}"><i class="fas fa-info"></i> {% translate 'Über uns' %}</a>
|
||||||
|
<a class="nav-link " href="{% url "rss" %}"><i class="fa-solid fa-rss"></i> {% translate 'RSS' %}</a>
|
||||||
|
|
||||||
|
</nav>
|
||||||
|
<div class="header-right">
|
||||||
<div class="profile-card">
|
<div class="profile-card">
|
||||||
<div id="header-change-language">
|
|
||||||
{% include "fellchensammlung/forms/change_language.html" %}
|
{% include "fellchensammlung/forms/change_language.html" %}
|
||||||
</div>
|
|
||||||
{% if user.is_authenticated %}
|
{% if user.is_authenticated %}
|
||||||
|
|
||||||
<div class="btn2 button_darken btn-notification">
|
<div class="btn2 button_darken btn-notification">
|
||||||
<a href="{{ user.get_notifications_url }}">
|
<a href="{{ user.get_notifications_url }}">
|
||||||
<i class="fa fa-bell" aria-hidden="true"></i>
|
<i class="fa fa-bell" aria-hidden="true"></i>
|
||||||
@ -18,10 +23,11 @@
|
|||||||
{% if user.get_num_unread_notifications > 0 %}
|
{% if user.get_num_unread_notifications > 0 %}
|
||||||
<span class="button__badge">{{ user.get_num_unread_notifications }}</span>
|
<span class="button__badge">{{ user.get_num_unread_notifications }}</span>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<a class="btn2" href="{% url 'user-me' %}"><i aria-hidden="true" class="fas fa-user"></i></a>
|
<a class="btn2" href="{% url 'user-me' %}"><i aria-hidden="true" class="fas fa-user"></i></a>
|
||||||
<form class="btn2 button_darken" id="header-sign-out" action="{% url 'logout' %}" method="post">
|
<form class="btn2 button_darken" action="{% url 'logout' %}" method="post">
|
||||||
{% csrf_token %}
|
{% csrf_token %}
|
||||||
<button class="button" type="submit"><i aria-hidden="true" class="fas fa-sign-out"></i></button>
|
<button class="button" type="submit"><i aria-hidden="true" class="fas fa-sign-out"></i></button>
|
||||||
</form>
|
</form>
|
||||||
@ -29,29 +35,7 @@
|
|||||||
<a class="btn2" href="{% url "django_registration_register" %}">{% translate "Registrieren" %}</a>
|
<a class="btn2" href="{% url "django_registration_register" %}">{% translate "Registrieren" %}</a>
|
||||||
<a class="btn2" href="{% url "login" %}"><i class="fa fa-sign-in" aria-hidden="true"></i></a>
|
<a class="btn2" href="{% url "login" %}"><i class="fa fa-sign-in" aria-hidden="true"></i></a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<input id="menu-toggle" type="checkbox"/>
|
|
||||||
<label class='menu-button-container' for="menu-toggle">
|
|
||||||
<div class='menu-button'></div>
|
|
||||||
</label>
|
|
||||||
|
|
||||||
<nav id="main-menu">
|
|
||||||
<ul class="menu">
|
|
||||||
<li>
|
|
||||||
<a class="nav-link " href="{% url "search" %}"><i
|
|
||||||
class="fas fa-search"></i> {% translate 'Suchen' %}
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
<li><a class="nav-link " href="{% url "add-adoption" %}"><i
|
|
||||||
class="fas fa-feather"></i> {% translate 'Vermittlung hinzufügen' %}</a></li>
|
|
||||||
<li><a class="nav-link " href="{% url "about" %}"><i
|
|
||||||
class="fas fa-info"></i> {% translate 'Über uns' %}
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
<li><a class="nav-link " href="{% url "rss" %}"><i
|
|
||||||
class="fa-solid fa-rss"></i> {% translate 'RSS' %}
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
</nav>
|
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</div>
|
||||||
|
</div>
|
Loading…
Reference in New Issue
Block a user