style: adopt ep-design 1.2.0 dashboard cards and replace the hover dropdown with a click menu
This commit is contained in:
1 parent
99e6119311
commit
6dbc6efa78
16 files changed
+381
-554
No files matched your search
@@ -0,0 +1,25 @@
|
||||
{#-
|
||||
A card of entries, as on a dashboard. `title`; optional `meta` (a short count beside the title,
|
||||
such as "3 neu, 2 in Bearbeitung"), `emptyText` and `scroll` (for work queues that would grow the
|
||||
card without limit); the `actions` block goes to the right of the header, typically "alle anzeigen".
|
||||
-#}
|
||||
{% set emptyText = emptyText ?? 'Keine Einträge vorhanden.' %}
|
||||
{% set meta = meta ?? null %}
|
||||
{% set scroll = scroll ?? false %}
|
||||
{% set entries %}{% block content %}{% endblock %}{% endset %}
|
||||
<section {{ attributes.defaults({class: 'card p-5'}).without('title', 'meta', 'emptyText', 'scroll') }}>
|
||||
<div class="flex flex-wrap items-baseline justify-between gap-x-4 gap-y-1 pb-3">
|
||||
<h2 class="section-title">{{ title }}</h2>
|
||||
<div class="flex items-baseline gap-x-4">
|
||||
{% if meta %}<span class="text-sm text-muted">{{ meta }}</span>{% endif %}
|
||||
{% block actions %}{% endblock %}
|
||||
</div>
|
||||
</div>
|
||||
{% if entries|trim is empty %}
|
||||
{% block empty %}
|
||||
<p class="text-sm text-muted">{{ emptyText }}</p>
|
||||
{% endblock %}
|
||||
{% else %}
|
||||
<ul class="entry-list {{ scroll ? 'entry-list--scroll' }}">{{ entries }}</ul>
|
||||
{% endif %}
|
||||
</section>
|
||||
Reference in new issue
Block a user