add infobox support
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
{%- from 'common/icons.html' import icn_info, icn_warn, icn_error -%}
|
||||
|
||||
{% macro timestamp(unix_ts) -%}
|
||||
<span class="timestamp" data-utc="{{ unix_ts }}">{{ unix_ts | ts_datetime('%Y-%m-%d %H:%M')}} <abbr title="Server Time">ST</abbr></span>
|
||||
{%- endmacro %}
|
||||
@@ -180,3 +182,20 @@
|
||||
{%- endif -%}
|
||||
</div>
|
||||
{%- endmacro %}
|
||||
|
||||
{% macro infobox(message, kind=InfoboxKind.INFO) -%}
|
||||
<div class="infobox plank top contain-svg horizontal {{InfoboxHTMLClass[kind]}}">
|
||||
{%- if kind == InfoboxKind.INFO -%}
|
||||
{{- icn_info() -}}
|
||||
{%- elif kind == InfoboxKind.WARN -%}
|
||||
{{- icn_warn() -}}
|
||||
{%- elif kind == InfoboxKind.ERROR -%}
|
||||
{{- icn_error() -}}
|
||||
{%- endif -%}
|
||||
{%- set m = message.split(';', maxsplit=1) -%}
|
||||
<strong>{{m[0]}}</strong>
|
||||
{%- if m[1] -%}
|
||||
{{m[1]}}
|
||||
{%- endif -%}
|
||||
</div>
|
||||
{%- endmacro %}
|
||||
|
||||
Reference in New Issue
Block a user