move some templates into one macro

This commit is contained in:
Lera Elvoé 2025-06-30 16:55:44 +03:00
parent ea5ecc3a9f
commit a95200caf9
Signed by: yagich
SSH Key Fingerprint: SHA256:6xjGb6uA7lAVcULa7byPEN//rQ0wPoG+UzYVMfZnbvc
4 changed files with 13 additions and 12 deletions

View File

@ -1,4 +1,4 @@
{% from 'common/infobox.html' import infobox with context %}
{% from 'common/macros.html' import infobox with context %}
<!DOCTYPE HTML>
<html lang="en">
<head>

View File

@ -1,10 +0,0 @@
{% macro infobox(message, kind=InfoboxKind.INFO) %}
<div class="{{ "infobox " + InfoboxHTMLClass[kind] }}">
<span>
<div class="infobox-icon-container">
<img src="{{ InfoboxIcons[kind] }}">
</div>
{{ message }}
</span>
</div>
{% endmacro %}

View File

@ -27,3 +27,14 @@
{% endif %}
</div>
{% endmacro %}
{% macro infobox(message, kind=InfoboxKind.INFO) %}
<div class="{{ "infobox " + InfoboxHTMLClass[kind] }}">
<span>
<div class="infobox-icon-container">
<img src="{{ InfoboxIcons[kind] }}">
</div>
{{ message }}
</span>
</div>
{% endmacro %}

View File

@ -1,4 +1,4 @@
{% from 'common/pager.html' import pager %}
{% from 'common/macros.html' import pager %}
{% extends "base.html" %}
{% block title %}browsing topic {{ topic['name'] }}{% endblock %}
{% block content %}