matrix-spec/scripts/templating/matrix_templates/templates/events.tmpl

33 lines
735 B
Cheetah
Raw Normal View History

{% import 'tables.tmpl' as tables -%}
{% if (event.type_with_msgtype) %}
``{{event.type_with_msgtype}}``
{{(4 + event.type_with_msgtype | length) * title_kind}}
{% endif -%}
{% if (not event.type_with_msgtype) %}
``{{event.type}}``
{{(4 + event.type | length) * title_kind}}
{% endif -%}
{% if (event.typeof | length) %}
*{{event.typeof}}*
{{event.typeof_info | indent_block(4)}}
{% endif -%}
{{event.desc}}
2016-02-23 15:43:36 +01:00
{% for table in event.content_fields %}
2018-08-30 18:01:27 +02:00
{{ tables.paramtable(table.rows, [(table.title or "Content") ~ " Key", "Type", "Description"], (table.title or "")) }}
{% endfor %}
2015-10-28 16:00:53 +01:00
Example{% if examples | length > 1 %}s{% endif %}:
2015-10-28 16:00:53 +01:00
{% for example in examples %}
.. code:: json
{{example | jsonify(4, 4)}}
2015-10-28 16:00:53 +01:00
{% endfor %}