You are here

libraries-ui.html.twig in Libraries UI 8

{#
Setting Up Variables
#}
{% set libraries_ui = element.libraries_ui %}
 {% for project_name,group_name in libraries_ui %}
     <details>
         <summary>{{ project_name }}</summary>
         <div class="details-wrapper">
             {% for group_name,breakpoint_info in group_name %}
                 <strong>{{ group_name }}</strong>
                 <ul>
                     {% for key,value in breakpoint_info %}
                         {% if value is not null and value is not empty %}
                             <li>
                                <strong>{{ key }}</strong>{{ ':' }}
                                     {% if key ==  ('css' or 'js' ) %}
                                         {% for assets_key, assets_value in value %}
                                            {% for assets_key, assets_value in assets_value %}
                                            <ul>
                                                {% if assets_value is not null and assets_value is not empty %}
                                                    {% if assets_key == 'minified' %}
                                                        {% set assets_value = 'yes' %}
                                                    {% endif %}
                                                    <li>
                                                         <strong>{{ assets_key }}: </strong>{{ assets_value }}
                                                    </li>
                                                {% endif %}
                                            </ul>
                                        {% endfor %}
                                    {% endfor %}
                                {% if key ==  ('license' or 'dependencies')%}
                                        {% for license_key, license_value in value %}
                                     <ul>
                                         {% if license_value is not null and license_value is not empty %}
                                         <li>
                                             {% if key ==  'license'%} <strong>{{ license_key }}: </strong>{% endif %}
                                             {{ license_value }}
                                         </li>
                                         {% endif %}
                                     </ul>
                                 {% endfor %}
                                {% endif %}
                                {% else %}
                                     {{ value }}
                                {% endif %}
                         {% endif %}
                         </li>
                     {% endfor %}
                 </ul>
             {% endfor %}
         </div>
     </details>
 {% endfor %}

File

templates/libraries-ui.html.twig
View source
  1. {#
  2. Setting Up Variables
  3. #}
  4. {% set libraries_ui = element.libraries_ui %}
  5. {% for project_name,group_name in libraries_ui %}
  6. <details>
  7. <summary>{{ project_name }}</summary>
  8. <div class="details-wrapper">
  9. {% for group_name,breakpoint_info in group_name %}
  10. <strong>{{ group_name }}</strong>
  11. <ul>
  12. {% for key,value in breakpoint_info %}
  13. {% if value is not null and value is not empty %}
  14. <li>
  15. <strong>{{ key }}</strong>{{ ':' }}
  16. {% if key == ('css' or 'js' ) %}
  17. {% for assets_key, assets_value in value %}
  18. {% for assets_key, assets_value in assets_value %}
  19. <ul>
  20. {% if assets_value is not null and assets_value is not empty %}
  21. {% if assets_key == 'minified' %}
  22. {% set assets_value = 'yes' %}
  23. {% endif %}
  24. <li>
  25. <strong>{{ assets_key }}: </strong>{{ assets_value }}
  26. </li>
  27. {% endif %}
  28. </ul>
  29. {% endfor %}
  30. {% endfor %}
  31. {% if key == ('license' or 'dependencies')%}
  32. {% for license_key, license_value in value %}
  33. <ul>
  34. {% if license_value is not null and license_value is not empty %}
  35. <li>
  36. {% if key == 'license'%} <strong>{{ license_key }}: </strong>{% endif %}
  37. {{ license_value }}
  38. </li>
  39. {% endif %}
  40. </ul>
  41. {% endfor %}
  42. {% endif %}
  43. {% else %}
  44. {{ value }}
  45. {% endif %}
  46. {% endif %}
  47. </li>
  48. {% endfor %}
  49. </ul>
  50. {% endfor %}
  51. </div>
  52. </details>
  53. {% endfor %}