Static pages

This commit is contained in:
Jannis Portmann 2023-04-06 14:24:16 +02:00
parent 1246c86691
commit 7d0d9add77
4 changed files with 14 additions and 12 deletions

View file

@ -1,4 +1,4 @@
{% extends 'base.html.twig' %}
{% extends 'base.html' %}
{% block title %}Privacy Policy{% endblock %}
{% block content %}
<h1>Privacy Policy</h1>

View file

@ -25,6 +25,9 @@
<link href="{% static 'fontawesomefree/css/solid.css' %}"
rel="stylesheet"
type="text/css">
<link href="{% static 'fontawesomefree/css/regular.css' %}"
rel="stylesheet"
type="text/css">
<link href="{% static 'base.css' %}" rel="stylesheet" type="text/css">
{% block head %}{% endblock %}
</head>
@ -131,23 +134,23 @@
<footer class="mt-auto p-4 align-items-center bg-body-tertiary">
<div class="container d-flex justify-content-around align-items-center">
<p>
<a href="#" class="me-3"><i class="fab fa-mastodon"></i></a>
<a href="#" class="me-3"><i class="fab fa-git-alt"></i></a>
<a href="https://mastodon.social/@pflaenzli" class="me-3"><i class="fab fa-mastodon"></i></a>
<a href="https://git.thisfro.ch/thisfro/pflaenz.li" class="me-3"><i class="fab fa-git-alt"></i></a>
</p>
<p>
<i class="me-1 fa-regular fa-copyright"></i> pflänz.li
<i class="me-1 fa-regular fa-copyright"></i>Pflänz.li
</p>
<div>
<h2 class="h5">Links</h2>
<ul style="list-style-type: none;" class="m-0 p-0">
<li>
<a href="#">Home</a>
<a href="{% url 'index' %}">Home</a>
</li>
<li>
<a href="#">FAQ</a>
<a href="{% url 'faq' %}">FAQ</a>
</li>
<li>
<a href="#">Imprint</a>
<a href="{% url 'imprint' %}">Imprint</a>
</li>
</ul>
</div>

View file

@ -2,11 +2,12 @@ from django.conf import settings
from django.conf.urls.static import static
from django.contrib.auth import views as auth_views
from django.urls import path, include
from django.views.generic import TemplateView
from . import views
urlpatterns = [
path("", views.index, name="index"),
path("", TemplateView.as_view(template_name='app/index.html'), name="index"),
path("offers/", views.list_offers, name="list_offers"),
path("offer/create/", views.create_offer, name="create_offer"),
path("offer/<int:offer_id>/", views.offer_detail, name="offer_detail"),
@ -18,4 +19,6 @@ urlpatterns = [
path('accounts/profile/', auth_views.LoginView.as_view(template_name='user/detail.html'), name='user_profile'),
path('accounts/register/', views.register_user, name='register_user'),
path('accounts/', include('django.contrib.auth.urls')),
path("faq/", TemplateView.as_view(template_name='app/faq.html'), name="faq"),
path("imprint/", TemplateView.as_view(template_name='app/imprint.html'), name="imprint"),
]

View file

@ -12,10 +12,6 @@ from .mail import send_offer_email
from .upload import generate_unique_filename
def index(request):
return render(request, "app/index.html")
def list_offers(request, filters=None):
offers = Offer.objects.all()
return render(request, "offer/search.html", {"offers": offers})