mail/app/templates/_icons.html
deeily 5024bf9a8d init: full mail stack — phases 0..8 (web client, admin, IMAP/SMTP,
sieve, search, sessions, dramatiq, deploy/install, ELK, monitoring)
2026-04-29 16:30:43 +03:00

57 lines
6.3 KiB
HTML

{#
Inline SVG иконки в стиле web_template:
viewBox 0 0 16 16, stroke currentColor, stroke-width 1.5, fill none.
Использование: {{ icon('inbox', 'nav-icon') }}
#}
{% macro icon(name, cls='nav-icon') %}
{% if name == 'inbox' %}
<svg class="{{ cls }}" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><path d="M2 9v4a1 1 0 0 0 1 1h10a1 1 0 0 0 1-1V9"/><path d="M2 9l2-6h8l2 6"/><path d="M2 9h3l1 2h4l1-2h3"/></svg>
{% elif name == 'send' %}
<svg class="{{ cls }}" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><path d="M14 2L7 9"/><path d="M14 2l-4 12-3-5-5-3 12-4z"/></svg>
{% elif name == 'draft' %}
<svg class="{{ cls }}" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><path d="M3 2h6l4 4v8a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V3a1 1 0 0 1 1-1z"/><path d="M9 2v4h4"/></svg>
{% elif name == 'clock' %}
<svg class="{{ cls }}" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><circle cx="8" cy="8" r="6"/><path d="M8 5v3l2 1.5"/></svg>
{% elif name == 'alert' %}
<svg class="{{ cls }}" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><path d="M8 2L1.5 13.5h13L8 2z"/><path d="M8 7v3"/><circle cx="8" cy="12" r=".5" fill="currentColor"/></svg>
{% elif name == 'trash' %}
<svg class="{{ cls }}" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><path d="M2.5 4h11"/><path d="M6 4V2.5A.5.5 0 0 1 6.5 2h3a.5.5 0 0 1 .5.5V4"/><path d="M4 4l.8 9a1 1 0 0 0 1 .9h4.4a1 1 0 0 0 1-.9L12 4"/></svg>
{% elif name == 'users' %}
<svg class="{{ cls }}" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><circle cx="6" cy="6" r="2.5"/><path d="M2 14c0-2.2 1.8-4 4-4s4 1.8 4 4"/><path d="M10 4.5a2.5 2.5 0 0 1 0 5"/><path d="M14 13.5c0-1.7-1-3.2-2.5-3.5"/></svg>
{% elif name == 'filter' %}
<svg class="{{ cls }}" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><path d="M2 3h12l-4.5 6v4l-3 1.5V9L2 3z"/></svg>
{% elif name == 'server' %}
<svg class="{{ cls }}" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><rect x="2" y="3" width="12" height="4" rx="1"/><rect x="2" y="9" width="12" height="4" rx="1"/><path d="M5 5h.01M5 11h.01"/></svg>
{% elif name == 'settings' %}
<svg class="{{ cls }}" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><circle cx="8" cy="8" r="2"/><path d="M8 1.5v2M8 12.5v2M1.5 8h2M12.5 8h2M3.3 3.3l1.4 1.4M11.3 11.3l1.4 1.4M3.3 12.7l1.4-1.4M11.3 4.7l1.4-1.4"/></svg>
{% elif name == 'search' %}
<svg class="{{ cls }}" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><circle cx="7" cy="7" r="4.5"/><path d="M10.5 10.5l3 3"/></svg>
{% elif name == 'paperclip' %}
<svg class="{{ cls }}" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><path d="M12 7l-5 5a2.5 2.5 0 1 1-3.5-3.5l6-6a2 2 0 0 1 3 3l-6 6a1.5 1.5 0 1 1-2-2L10 5"/></svg>
{% elif name == 'star' %}
<svg class="{{ cls }}" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><path d="M8 2l1.9 3.9 4.3.6-3.1 3 .7 4.2L8 11.8 4.2 13.7l.7-4.2-3.1-3 4.3-.6L8 2z"/></svg>
{% elif name == 'star-filled' %}
<svg class="{{ cls }}" viewBox="0 0 16 16" fill="#efb800" stroke="#efb800" stroke-width="1" stroke-linejoin="round"><path d="M8 2l1.9 3.9 4.3.6-3.1 3 .7 4.2L8 11.8 4.2 13.7l.7-4.2-3.1-3 4.3-.6L8 2z"/></svg>
{% elif name == 'reply' %}
<svg class="{{ cls }}" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><path d="M7 4L3 8l4 4"/><path d="M3 8h7a4 4 0 0 1 0 8"/></svg>
{% elif name == 'forward' %}
<svg class="{{ cls }}" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><path d="M9 4l4 4-4 4"/><path d="M13 8H6a4 4 0 0 0 0 8"/></svg>
{% elif name == 'pencil' %}
<svg class="{{ cls }}" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><path d="M2 14l1-3 8-8 2 2-8 8-3 1z"/><path d="M10 4l2 2"/></svg>
{% elif name == 'important' %}
<svg class="{{ cls }} icon-important" viewBox="0 0 16 16"><rect x="6.5" y="2" width="3" height="7" rx="1.4" fill="#c0392b"/><circle cx="8" cy="12.5" r="1.6" fill="#c0392b"/></svg>
{% elif name == 'folder' %}
<svg class="{{ cls }}" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><path d="M2 4a1 1 0 0 1 1-1h3l2 2h5a1 1 0 0 1 1 1v6a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V4z"/></svg>
{% elif name == 'menu' %}
<svg class="{{ cls }}" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"><path d="M2 4h12M2 8h12M2 12h12"/></svg>
{% elif name == 'sun' %}
<svg class="{{ cls }}" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"><circle cx="8" cy="8" r="3"/><path d="M8 1.5v1.5M8 13v1.5M1.5 8H3M13 8h1.5M3.3 3.3l1 1M11.7 11.7l1 1M3.3 12.7l1-1M11.7 4.3l1-1"/></svg>
{% elif name == 'moon' %}
<svg class="{{ cls }}" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linejoin="round"><path d="M13 9.5A5.5 5.5 0 0 1 6.5 3a5.5 5.5 0 1 0 6.5 6.5z"/></svg>
{% elif name == 'arrow-right' %}
<svg class="{{ cls }}" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><path d="M3 8h10"/><path d="M9 4l4 4-4 4"/></svg>
{% elif name == 'globe' %}
<svg class="{{ cls }}" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><circle cx="8" cy="8" r="6"/><path d="M2 8h12"/><path d="M8 2c2 2 2 10 0 12M8 2c-2 2-2 10 0 12"/></svg>
{% endif %}
{% endmacro %}