{#- The organisation's mark: site.logo when it is set, else a monogram built from the name
("№5 орта мектеп" and "Средняя школа №12" give "№5", "№12", "Семей қаласының білім бөлімі" gives "СҚ").
Decorative: the name is always printed next to it. Optional: emblem_cls. -#}
{%- if site.logo -%}
{%- else -%}
{%- set words = site.name|replace('«', '')|replace('»', '')|replace('"', '')|replace('“', '')|replace('”', '')|trim|split -%}
{%- set w0 = words[0] if words else '' -%}
{%- set ns_mono = namespace(num='') -%}
{%- for w in words -%}{%- if not ns_mono.num and w[:1] == '№' -%}{%- set ns_mono.num = w[:4] -%}{%- endif -%}{%- endfor -%}
{%- if ns_mono.num -%}
{%- set mono = ns_mono.num -%}
{%- elif w0 and (w0[:1] == '#' or w0[:1] in '0123456789') -%}
{%- set mono = w0[:4] -%}
{%- else -%}
{%- set mono = (w0[:1] ~ (words[1][:1] if words|length > 1 else ''))|upper -%}
{%- endif -%}
{{ mono }}
{%- endif -%}