mirror of
https://gitlab.com/allianceauth/allianceauth.git
synced 2025-12-18 06:45:04 +01:00
[ADD] Widget title partial to AA framework
This commit is contained in:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user