social_links.html 1.2 KB

123456789101112131415161718192021222324252627282930313233
  1. {% if SOCIAL %}
  2. {% if not SOCIAL_PROFILE_LABEL %}
  3. {% set SOCIAL_PROFILE_LABEL ='Contact' %}
  4. {% endif %}
  5. <h4>{{ SOCIAL_PROFILE_LABEL }}</h4>
  6. {% for entry in SOCIAL %}
  7. {% set f_entry = [] %}
  8. {%for item in entry %}
  9. {# first is for name #}
  10. {% if f_entry.append(item) %}{% endif %}
  11. {% if loop.first %}
  12. {% set link_title = 'My ' + item + ' Profile' %}
  13. {% set link_icon = item.lower() %}
  14. {% if item.lower() == 'email' %}
  15. {% set link_title = 'My ' + item + ' Address' %}
  16. {% set link_icon = 'envelope' %}
  17. {% endif %}
  18. {% if f_entry.insert(0, link_title) %}{% endif %}
  19. {% if f_entry.insert(1, link_icon) %}{% endif %}
  20. {% elif loop.index0 == 1 %}
  21. {% set url = item|e %}
  22. {% if f_entry.insert(2, url) %}{% endif %}
  23. {% elif loop.index0 == 2 %}
  24. {% set link_icon = item.lower() %}
  25. {% if f_entry.insert(1, link_icon) %}{% endif %}
  26. {% endif %}
  27. {% endfor %}
  28. <a href="{{f_entry[2]}}" title="{{f_entry[0]}}" class="sidebar-social-links" target="_blank">
  29. <i class="fa fa-{{f_entry[1]}} sidebar-social-links"></i></a>
  30. {% endfor %}
  31. {% endif %}