feat(templates): add _macros.html with config_field macro
This commit is contained in:
parent
5ca3db4a6e
commit
7963b69cb3
1 changed files with 10 additions and 0 deletions
10
l4d2web/l4d2web/templates/_macros.html
Normal file
10
l4d2web/l4d2web/templates/_macros.html
Normal file
|
|
@ -0,0 +1,10 @@
|
||||||
|
{# Reusable field-cell for the server-detail config grid and any future
|
||||||
|
key/value layouts. `value` is rendered as-is (caller can pass safe
|
||||||
|
HTML via `|safe` if needed). `editable` is a flag the caller may
|
||||||
|
use to switch rendering — currently informational only. #}
|
||||||
|
{% macro config_field(label, value, editable=False) %}
|
||||||
|
<div class="config-field">
|
||||||
|
<div class="config-field-label">{{ label }}</div>
|
||||||
|
<div class="config-field-value">{{ value }}</div>
|
||||||
|
</div>
|
||||||
|
{% endmacro %}
|
||||||
Loading…
Reference in a new issue