[ADD] Widget title partial to AA framework

This commit is contained in:
Peter Pfeufer
2024-05-26 16:46:03 +02:00
parent 747279b773
commit ede5540335
7 changed files with 154 additions and 133 deletions

View File

@@ -28,6 +28,27 @@ To ensure a unified style language throughout Alliance Auth and Community Apps,
we also provide a couple of template partials. This collection is bound to grow over
time, so best have an eye on this page.
### Dashboard Widget Title
To ensure the dashboard widgets have a unified style, we provide a template partial for the widget title.
To use it, you can use the following code in your dashboard widget template:
```django
<div id="my-app-dashboard-widget" class="col-12 align-self-stretch py-2">
<div class="card">
<div class="card-body">
{% translate "My Widget Title" as widget_title %}
{% include "framework/dashboard/widget-title.html" with title=widget_title %}
<div>
<p>My widget content</p>
</div>
</div>
</div>
</div>
```
### Page Header
On some pages you want to have a page header. To make this easier, we provide a template partial for this.