styling fixes, progress on homepage

This commit is contained in:
Jonas Heinrich 2025-05-19 10:23:10 +02:00
parent fbdb6e779f
commit b95a3abca3
4 changed files with 31 additions and 2 deletions

View file

@ -0,0 +1,7 @@
from .models import GovernmentPlan
def plans_context(request):
if request.path == "/": # nur auf der Startseite
plans = GovernmentPlan.objects.filter(public=True)
return {"plans": plans}
return {}

View file

@ -258,6 +258,7 @@
</head> </head>
<body {% if request.user.is_authenticated %}data-user="{{ request.user.id }}" data-useremail="{{ request.user.email }}"{% endif %}{% block body_extra_attributes %}{% endblock %}> <body {% if request.user.is_authenticated %}data-user="{{ request.user.id }}" data-useremail="{{ request.user.email }}"{% endif %}{% block body_extra_attributes %}{% endblock %}>
<div style="overflow-x: hidden;">
{% cms_toolbar %} {% cms_toolbar %}
{% block body_tag %}{% block body %}{% block main %}{% endblock %}{% endblock %}{% endblock %} {% block body_tag %}{% block body %}{% block main %}{% endblock %}{% endblock %}{% endblock %}
{% block extra_footer %}{% endblock %} {% block extra_footer %}{% endblock %}
@ -359,5 +360,6 @@ Xe();
{% render_block "js" %} {% render_block "js" %}
{% block below_scripts %}{% endblock %} {% block below_scripts %}{% endblock %}
</div>
</body> </body>
</html> </html>

View file

@ -129,17 +129,36 @@
<main> <main>
{% if request.path == '/' %} {% if request.path == '/' %}
<div style="margin: 6rem 0;"> <div class="py-5">
<h1 class="text-body-emphasis">Wir bringen Licht ins Dunkel der Behörden</h1> <h1 class="text-body-emphasis">Wir bringen Licht ins Dunkel der Behörden</h1>
<p class="fs-5 col-md-8"> <p class="fs-5 col-md-8">
Mit unserem Verwaltungstracker können Sie die Arbeit der Stadtverwaltung Karlsruhe live verfolgen: Welche Vorhaben werden umgesetzt? Wo wird gebremst? Wie sieht der Stand in einzelnen Themenbereichen aus? Mit unserem Verwaltungstracker können Sie die Arbeit der Stadtverwaltung Karlsruhe live verfolgen: Welche Vorhaben werden umgesetzt? Wo wird gebremst? Wie sieht der Stand in einzelnen Themenbereichen aus?
</p> </p>
<div class="row justify-content-center mb-5">
<div class="col col-lg-12">
<div class="box-card border-yellow md:shadow-yellow bg-body mw-100 col-md-8">
<div class="mt-4">
{% include "froide_govplan/plugins/progress_row.html" with object_list=plans %}
<p class="small text-body-secondary mt-3 no-hyphens">
<span class="text-nowrap me-1"><i class="fa fa-circle text-light"></i>&nbsp;nicht begonnen</span>
<span class="text-nowrap me-1"><i class="fa fa-circle text-primary"></i>&nbsp;begonnen</span>
<span class="text-nowrap me-1"><i class="fa fa-circle text-warning"></i>&nbsp;teilweise umgesetzt</span>
<span class="text-nowrap me-1"><i class="fa fa-circle text-success"></i>&nbsp;umgesetzt</span>
<span class="text-nowrap me-1"><i class="fa fa-circle text-danger"></i>&nbsp;verschoben</span>
</p>
</div>
</div>
</div>
</div>
</div> </div>
{% endif %} {% endif %}
{% static_alias "govplan_header" %} {% static_alias "govplan_header" %}
{% block app_body %} {% block app_body %}
{% placeholder "content" %} {% placeholder "content" %}
{% endblock app_body %} {% endblock app_body %}
@ -176,7 +195,7 @@
</main> </main>
<footer class="pt-5 text-body-secondary border-top"> <footer class="pt-5 text-body-secondary border-top mt-5">
<div class="row"> <div class="row">
<div class="col-12 col-md-8"> <div class="col-12 col-md-8">

View file

@ -97,6 +97,7 @@ TEMPLATES = [
"sekizai.context_processors.sekizai", "sekizai.context_processors.sekizai",
"cms.context_processors.cms_settings", "cms.context_processors.cms_settings",
"froide.helper.context_processors.site_settings", "froide.helper.context_processors.site_settings",
"froide_govplan.context_processors.plans_context",
], ],
}, },
}, },