Files
daynivo-kiosk-os/src/voxip_kiosk/web/templates/_macros.html
T
rothmanandClaude Opus 5.5 efc581e0ae
CI / test-bookworm (push) Failing after 4s
CI / test-latest (push) Successful in 31s
Move reload/restart/shutdown into an Acties menu in the top bar
The actions are now on every page in the same place instead of a button
row that differed per page.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-04 22:49:24 +01:00

20 lines
1002 B
HTML

{% macro badge(status, label, field=None) -%}
<span class="badge badge-{{ status }}" {% if field %}data-badge="{{ field }}"{% endif %}><span class="dot" aria-hidden="true"></span><span data-badge-label>{{ label }}</span></span>
{%- endmacro %}
{% macro menu_action(url, label, confirm=None, confirm_title=None, danger=False) -%}
<form method="post" action="{{ url }}" {% if confirm %}data-confirm="{{ confirm }}" data-confirm-title="{{ confirm_title or label }}"{% endif %}>
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}">
<button type="submit"{% if danger %} class="danger"{% endif %}>{{ label }}</button>
</form>
{%- endmacro %}
{% macro csrf() -%}
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}">
{%- endmacro %}
{# Width is applied by app.js: the CSP does not allow inline style attributes. #}
{% macro meter(percent, field) -%}
<div class="meter" role="presentation"><span data-meter="{{ field }}" data-pct="{{ percent }}"></span></div>
{%- endmacro %}