{% comment %} The messaging-platform glyph. There is exactly ONE of these. DEVIATION 3 of the L1-B brief. Studio ships two copies that have genuinely drifted apart: templates/partials/_platform_icon.html (hard-coded brand hex, a semantic sm/md size API, a globe fallback) and templates/social_accounts/partials/_platform_icon.html (currentColor, raw Tailwind numeral sizes, NO fallback, and a 3.5 KB base64 JPEG raster for one platform). Their Instagram, Bluesky, Mastodon and Pinterest paths are all subtly different, and only one of them knows about Twitter. This one takes the union of what each did better: * `currentColor`, so the caller tints per context. A chat channel shows up on a white sidebar row, on a coloured chip, inside a filter dropdown and in a conversation header — a brand-hex-only icon can only serve the first. Pair with .pi- (tinted chip, white glyph) or .pi-ink- (brand-coloured glyph, no chip) from the design system. * the named sm/md size API rather than raw Tailwind numerals, so a caller cannot ask for a size the Tailwind build never generated. * a real fallback, so an unrecognised platform key renders a neutral glyph instead of an empty box. Usage: {% include "partials/_platform_icon.html" with platform="telegram" size="md" %} Args: platform: one of telegram, instagram, messenger, whatsapp, sms, email. size: "sm" (16px, default), "md" (20px) or "lg" (28px). "lg" is the connect pages' hero mark and pairs with .pi-chip-hero. The branch list below must stay in step with PLATFORMS in apps/common/templatetags/common_extras.py, which decides the chip colour. A key with a glyph here but no entry there renders on a neutral chip; a key with an entry there but no glyph here renders the fallback on a coloured one. Telegram draws two shapes and CSS shows one. Its mark is a plane cut out of a filled circle, which on a .pi-chip renders as a white disc filling a blue square, with no blue around it. Inside a chip it is the plane alone (.bb-glyph-chip), scaled from its 13-unit width up to the size the other glyphs are drawn at and centred; everywhere else it is the full mark (.bb-glyph-mark). Never build a chip class as `pi-{{ key }}`: use the platform_class filter, or an unrecognised key produces a class no stylesheet defines and .pi-chip's white glyph disappears against the panel. {% endcomment %}{% spaceless %} {% with px=size|default:"sm" %} {% if platform == "telegram" %} {% elif platform == "instagram" %} {% elif platform == "messenger" %} {% elif platform == "whatsapp" %} {% elif platform == "sms" %} {% elif platform == "email" %} {% else %} {% endif %} {% endwith %} {% endspaceless %}