{# /************************************************************* File name: includes/link-icon.html.twig Project: Villas3.com Copyright 2024 Michael J. Miller, All rights reserved Purpose: generate markup for a link icon Requires: link - a link record buffer Revision History: Date Version Details -------- -------- -------------------------------------------- 4/15/25 3.0b2 Created. **************************************************************/ #} {% set styles = link.icon_style ~ (link.icon_color ? 'color:'~link.icon_color ~ ';') %} {% set class_list = link.icon_class|split(" ") %} {% set icon_class = '' %} {% for class in class_list %} {% if class starts with 'fa-' %} {% set icon_class = icon_class~class~' ' %} {% else %} {% set icon_class = icon_class~'fa-'~class~' ' %} {% endif %} {% endfor %} {% set icon_list = link.icon|split(" ") %} {% set icon_glyph = '' %} {% for icon in icon_list %} {% if icon starts with 'fa-' %} {% set icon_glyph = icon_glyph~icon~' ' %} {% else %} {% set icon_glyph = icon_glyph~'fa-'~icon~' ' %} {% endif %} {% endfor %}