diff options
| author | Karan Jayachandra <karan.jayachandra@nxp.com> | 2024-10-16 23:36:56 +0200 |
|---|---|---|
| committer | Karan Jayachandra <karan.jayachandra@nxp.com> | 2024-10-16 23:36:56 +0200 |
| commit | 310c54caffb137af593e710b2437c2639863574d (patch) | |
| tree | 6d678db08c6d6df65e0e7c7cbe91b5531e6bf6ab /templates | |
| parent | 156056e9c31468564fb53ca284996a5de41471fb (diff) | |
Added a few more j2 macros
Diffstat (limited to 'templates')
| -rw-r--r-- | templates/macros.j2 | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/templates/macros.j2 b/templates/macros.j2 index b4767be..7117d11 100644 --- a/templates/macros.j2 +++ b/templates/macros.j2 @@ -8,4 +8,16 @@ <button class="button is-medium is-responsive {% if status %}is-success{% else %}is-danger {% endif %}" hx-post="{{ "/player-toggle/" ~ id}}" hx-swap="outerHTML"> {{ name }} </button> +{%- endmacro %} + +{% macro guests(count) -%} +<div class="control" id="guests"> + <input class="input is-large is-responsive" type="text" style="text-align:center" value="{{ count }} Guests" disabled> +</div> +{%- endmacro %} + +{% macro timer(mins, secs) -%} +<div hx-get="/time" hx-swap="outerHTML" hx-trigger="every 1s"> + <p class="title">Timer: {{mins}}:{{secs}}</p> +</div> {%- endmacro %}
\ No newline at end of file |
